From 395734c9fa2c0d9b2b435d14f7fb21d4fb02b0ce Mon Sep 17 00:00:00 2001 From: Arvind Iyengar Date: Fri, 28 Oct 2022 14:05:27 -0700 Subject: [PATCH 01/20] Add rebase script --- Makefile | 3 + scripts/charts-build-scripts/rebase | 485 ++++++++++++++++++++++++++++ 2 files changed, 488 insertions(+) create mode 100755 scripts/charts-build-scripts/rebase diff --git a/Makefile b/Makefile index 2179d568..ca0f440a 100644 --- a/Makefile +++ b/Makefile @@ -17,6 +17,9 @@ $(TARGETS): .dapper pull-scripts: ./scripts/charts-build-scripts/pull-scripts +rebase: + ./scripts/charts-build-scripts/rebase + CHARTS_BUILD_SCRIPTS_TARGETS := prepare patch clean clean-cache charts list index unzip zip standardize template $(CHARTS_BUILD_SCRIPTS_TARGETS): diff --git a/scripts/charts-build-scripts/rebase b/scripts/charts-build-scripts/rebase new file mode 100755 index 00000000..75ab2baa --- /dev/null +++ b/scripts/charts-build-scripts/rebase @@ -0,0 +1,485 @@ +#!/bin/bash + +set -e + +cd $(dirname $0) +cd .. +cd .. + +if [[ -z ${PACKAGE} ]] || [[ -z ${TO_COMMIT} ]] ; then + echo "USAGE: PACKAGE= [TO_DIR=] TO_COMMIT= [TO_REMOTE=] ./scripts/rebase" + exit 1 +fi + +# Basic environment variables +STAGING_BRANCH=staging-${RANDOM} + +FROM_REMOTE_NAME=from-remote-${RANDOM} +FROM_BRANCH=from-${RANDOM} +TO_REMOTE_NAME=to-remote-${RANDOM} +TO_BRANCH=to-${RANDOM} + +GC_DIRECTORY=packages/${PACKAGE}/generated-changes +EXCLUDE_DIRECTORY=${GC_DIRECTORY}/exclude +CHARTS_ORIGINAL_DIRECTORY=packages/${PACKAGE}/charts-original +CRD_CHART_DIRECTORY=packages/${PACKAGE}/charts-crd # TODO: get from package.yaml +CRDS_DIRECTORY=crd-manifest # TODO: get from package.yaml +PACKAGE_YAML_PATH=packages/${PACKAGE}/package.yaml + +# Grab environment variables from package.yaml +FROM_REMOTE=$(yq e '.url' ${PACKAGE_YAML_PATH}) +if [[ "${FROM_REMOTE}" != *.git ]]; then + echo "./scripts/rebase can only be done on Git-based packages, found url: ${FROM_REMOTE}" + exit 1 +fi +if [[ -z "${TO_REMOTE}" ]]; then + TO_REMOTE=${FROM_REMOTE} +fi +FROM_COMMIT=$(yq e '.commit' ${PACKAGE_YAML_PATH}) +if [[ -z ${FROM_COMMIT} ]]; then + echo "Unable to find 'commit' in ${PACKAGE_YAML_PATH}" +fi +FROM_DIR=$(yq e '.subdirectory' ${PACKAGE_YAML_PATH}) +if [[ -z ${FROM_DIR} ]]; then + FROM_DIR="." +fi +if [[ -z "${TO_DIR}" ]]; then + TO_DIR=${FROM_DIR} +fi + +CHARTS_WORKING_DIRECTORY=$(yq e '.workingDir' ${PACKAGE_YAML_PATH}) +if [ -z "${CHARTS_WORKING_DIRECTORY}" ] || [ "${CHARTS_WORKING_DIRECTORY}" == "null" ]; then + DEST_DIRECTORY=packages/${PACKAGE}/charts +else + DEST_DIRECTORY=packages/${PACKAGE}/${CHARTS_WORKING_DIRECTORY} +fi + +IGNORE_DEPS=$(yq e '.ignoreDependencies' ${PACKAGE_YAML_PATH} -o p | cut -d ' ' -f3) + +# Start rebase process +if [ -z "${FROM_DIR}" ] && [ -z "${TO_DIR}" ]; then + echo "Attempting to rebase ${PACKAGE} from commit ${FROM_COMMIT} to ${TO_DIR}" +elif [ -z "${FROM_DIR}" ] && [ -n "${TO_DIR}" ]; then + echo "Attempting to rebase ${PACKAGE} from commit ${FROM_COMMIT} to ${TO_DIR} at subdirectory ${TO_DIR}" +elif [ -n "${FROM_DIR}" ] && [ -z "${TO_DIR}" ]; then + echo "Attempting to rebase ${PACKAGE} from commit ${FROM_COMMIT} at subdirectory ${FROM_DIR} to ${TO_DIR}" +else + echo "Attempting to rebase ${PACKAGE} from commit ${FROM_COMMIT} at subdirectory ${FROM_DIR} to ${TO_DIR} at subdirectory ${TO_DIR}" +fi +echo "" + +# Pre-rebase checks + +echo "Running pre-flight checks..." + +echo "> Checking if Git is clean..." +if [[ -n "$(git status --porcelain)" ]]; then + echo "Cannot run rebase on unclean repository:" + git status --porcelain + exit 1 +fi + +echo "> Checking if ${DEST_DIRECTORY} exists..." +if [ -d "${DEST_DIRECTORY}" ]; then + echo "Destination directory ${DEST_DIRECTORY} already exists" + exit 1 +fi + +remotes=$(git remote) +echo "> Checking if ${FROM_REMOTE_NAME} exists..." +if echo ${remotes} | grep -q ${FROM_REMOTE_NAME}; then + echo "Remote ${FROM_REMOTE_NAME} already exists" + exit 1 +fi + +echo "> Checking if ${TO_REMOTE_NAME} exists..." +if echo ${remotes} | grep -q ${TO_REMOTE_NAME}; then + echo "Remote ${TO_REMOTE_NAME} already exists" + exit 1 +fi + +# Ensure branches doesn't already exist +echo "> Checking if sandbox branches (${STAGING_BRANCH}, ${FROM_BRANCH}, ${TO_BRANCH}) exist..." +branches=$(git show-ref --heads | cut -d/ -f3-) +if echo ${branches} | grep -q ${STAGING_BRANCH}; then + echo "Branch ${STAGING_BRANCH} already exists" + exit 1 +elif echo ${branches} | grep -q ${FROM_BRANCH}; then + echo "Branch ${FROM_BRANCH} already exists" + exit 1 +elif echo ${branches} | grep -q ${TO_BRANCH}; then + echo "Branch ${TO_BRANCH} already exists" + exit 1 +fi + +CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD) + +# Cleanup logic + +trap 'cleanup' EXIT + +cleanup() { + # Execute all cleanup even if there is failures + echo "" + echo "Cleaning up Git remotes and branches created by this script..." + set +e + git remote rm ${FROM_REMOTE_NAME} 2>/dev/null + git remote rm ${TO_REMOTE_NAME} 2>/dev/null + git clean -df 1>/dev/null 2>/dev/null + git reset --hard 1>/dev/null 2>/dev/null + git checkout ${CURRENT_BRANCH} 2>/dev/null + git branch -D ${STAGING_BRANCH} 2>/dev/null + git branch -D ${FROM_BRANCH} 2>/dev/null + git branch -D ${TO_BRANCH} 2>/dev/null +} + +echo "" +echo "Preparing Git for rebase..." + +# Start rebase +echo "> Checking out a new branch at ${STAGING_BRANCH} to sandbox changes..." +git checkout -b ${STAGING_BRANCH} 1>/dev/null 2>/dev/null + +# Add provided remotes to git +echo "> Adding ${FROM_REMOTE} as a remote ${FROM_REMOTE_NAME} on Git" +git remote add ${FROM_REMOTE_NAME} ${FROM_REMOTE} 1>/dev/null 2>/dev/null +echo "> Fetching ${FROM_COMMIT} from ${FROM_REMOTE_NAME} on Git" +git fetch --depth=1 ${FROM_REMOTE_NAME} ${FROM_COMMIT} +echo "> Adding ${TO_REMOTE} as a remote ${TO_REMOTE_NAME} on Git" +git remote add ${TO_REMOTE_NAME} ${TO_REMOTE} 1>/dev/null 2>/dev/null +echo "> Fetching ${TO_COMMIT} from ${TO_REMOTE_NAME} on Git" +git fetch --depth=1 ${TO_REMOTE_NAME} ${TO_COMMIT} + +# Checkout the provided tag from that remote into the FROM_BRANCH +echo "> Checking out a new branch at ${FROM_BRANCH} tracking ${FROM_REMOTE} at ${FROM_COMMIT}..." +git checkout ${FROM_COMMIT} -b ${FROM_BRANCH} 1>/dev/null 2>/dev/null + +# Fail if subdirectory specified does not exist on remote +echo "> Checking if ${FROM_REMOTE} at ${FROM_COMMIT} has subdirectory '${FROM_DIR}'..." +if [ ! -d "${FROM_DIR}" ]; then + echo "${FROM_REMOTE} at ${FROM_COMMIT} does not contain subdirectory ${FROM_DIR}" + exit 1 +fi + +# Copy subdirectory into a special folder +mkdir -p .rebase/from +cp -R ${FROM_DIR}/* .rebase/from +git add .rebase/from 1>/dev/null 2>/dev/null +git commit -m "Temporarily moving ${FROM_DIR} to .rebase/from" 1>/dev/null 2>/dev/null + +# Checkout the provided tag from that remote into the TO_BRANCH +echo "> Checking out a new branch at ${TO_BRANCH} tracking ${TO_REMOTE} at ${TO_COMMIT}..." +git checkout ${TO_COMMIT} -b ${TO_BRANCH} 1>/dev/null 2>/dev/null + +# Fail if subdirectory specified does not exist on remote +echo "> Checking if ${TO_REMOTE} at ${TO_COMMIT} has subdirectory '${TO_DIR}'..." +if [ ! -d "${TO_DIR}" ]; then + echo "${TO_REMOTE} at ${TO_COMMIT} does not contain subdirectory ${TO_DIR}" + exit 1 +fi + +# Copy subdirectory into a special folder +mkdir -p .rebase/to +cp -R ${TO_DIR}/* .rebase/to +git add .rebase/to 1>/dev/null 2>/dev/null +git commit -m "Temporarily moving ${TO_DIR} to .rebase/to" 1>/dev/null 2>/dev/null + +# Pull charts into directory in order +git checkout ${STAGING_BRANCH} 1>/dev/null 2>/dev/null +PACKAGE=${PACKAGE} USE_CACHE=${USE_CACHE} make prepare 1>/dev/null 2>/dev/null +chmod 644 $(find ${DEST_DIRECTORY} -type f | xargs) + +# Save changes added by developer +if [ -d "${CRD_CHART_DIRECTORY}" ]; then + git add ${DEST_DIRECTORY} ${CRD_CHART_DIRECTORY} +else + git add ${DEST_DIRECTORY} +fi +git commit -m "Add changes saved in generated-changes" 1>/dev/null 2>/dev/null + +# Keep track of commits that need to be dropped entirely +GC_COMMIT=$(git rev-parse --short HEAD) + +if [ -d "${CRD_CHART_DIRECTORY}" ]; then + # Move CRDs back into main chart so that you can rebase changes to CRDs as well + mv ${CRD_CHART_DIRECTORY}/${CRDS_DIRECTORY} ${DEST_DIRECTORY}/crds + git add ${CRD_CHART_DIRECTORY}/${CRDS_DIRECTORY} ${DEST_DIRECTORY}/crds + git commit -m "Move CRDs back into main chart" 1>/dev/null 2>/dev/null +fi + +if [ -d "${EXCLUDE_DIRECTORY}" ]; then + # Calculate excluded files and directories + EXCLUDE_DIRECTORIES=$(find ${EXCLUDE_DIRECTORY}/* -type d | sed "s/${EXCLUDE_DIRECTORY//\//\\/}\///") + EXCLUDE_FILES=$(find ${EXCLUDE_DIRECTORY}/* -type f | sed "s/${EXCLUDE_DIRECTORY//\//\\/}\///") +fi + +git checkout ${FROM_BRANCH} -- .rebase/from 1>/dev/null 2>/dev/null +git checkout ${TO_BRANCH} -- .rebase/to 1>/dev/null 2>/dev/null + +ADDED_PATHS=$(diff -rq .rebase/to .rebase/from | grep 'Only in .rebase/to' | cut -d ' ' -f3- | sed 's/: /\//g' || true) +REMOVED_PATHS=$(diff -rq .rebase/to .rebase/from | grep 'Only in .rebase/from' | cut -d ' ' -f3- | sed 's/: /\//g' || true) + +git reset HEAD 1>/dev/null 2>/dev/null +git add .rebase/from 1>/dev/null 2>/dev/null +git commit -m "Add .rebase/from" 1>/dev/null 2>/dev/null +mv .rebase/from .rebase/from-copy +mv .rebase/to .rebase/from + +if [[ -n ${IGNORE_DEPS} ]]; then + IGNORE_DEPS_DIFF_ARGS=$(echo "${IGNORE_DEPS}" | tr ' ' '\n' | sed 's:\(.*\):\:!.rebase/from/charts/\1/*:g' | xargs) +else + unset IGNORE_DEPS_DIFF_ARGS +fi +if [[ -n ${EXCLUDE_FILES} ]]; then + EXCLUDE_FILES_DIFF_ARGS=$(echo "${EXCLUDE_FILES}" | tr ' ' '\n' | sed 's:\(.*\):\:!.rebase/from/\1:g' | xargs) +else + unset EXCLUDE_FILES_DIFF_ARGS +fi +git diff -- ${IGNORE_DEPS_DIFF_ARGS} ${EXCLUDE_FILES_DIFF_ARGS} > diff.patch + +git reset HEAD~1 +git checkout -- . + +sed -i.bak -e "s:diff \(.*\) a/.rebase/from/\(.*\) b/.rebase/from/\(.*\):diff \1 a/${DEST_DIRECTORY}/\2 b/${DEST_DIRECTORY}/\3 :g" diff.patch +sed -i.bak "s:--- a/.rebase/from/\(.*\):--- a/${DEST_DIRECTORY}/\1:g" diff.patch +sed -i.bak "s:+++ b/.rebase/from/\(.*\):+++ b/${DEST_DIRECTORY}/\1:g" diff.patch +sed -i.bak "s:index \(.*\) \(.*\):index \1 100644:g" diff.patch +rm diff.patch.bak + +echo "> Applying difference in three-way merge..." +git apply --reject diff.patch 1>/dev/null 2>/dev/null || true +for to_path in ${ADDED_PATHS}; do + from_paths=$(echo ${to_path} | sed "s:.rebase/to:.rebase/from:g") + [[ -d ${from_paths} ]] && from_paths=$(find ${from_paths} -type f) + for from_path in ${from_paths}; do + unset should_continue + for ignored_dep in ${IGNORE_DEPS}; do + if echo ${from_path} | grep ".rebase/from/charts/${ignored_dep}" 1>/dev/null 2>/dev/null; then + should_continue=1; + break + fi + done + [[ -n ${should_continue} ]] && continue + chart_path=$(echo ${from_path} | sed "s:.rebase/from:${DEST_DIRECTORY}:g") + mkdir -p $(dirname ${chart_path}) + cp ${from_path} ${chart_path} + done +done + +for to_path in ${REMOVED_PATHS}; do + from_paths=$(echo ${to_path} | sed "s:.rebase/to:.rebase/from:g") + [[ -d ${from_paths} ]] && from_paths=$(find ${from_paths} -type f) + for from_path in ${from_paths}; do + unset should_continue + for ignored_dep in ${IGNORE_DEPS}; do + if echo ${from_path} | grep ".rebase/from/charts/${ignored_dep}" 1>/dev/null 2>/dev/null; then + should_continue=1; + break + fi + done + [[ -n ${should_continue} ]] && continue + chart_path=$(echo ${from_path} | sed "s:.rebase/from/::g") + rm ${DEST_DIRECTORY}/${chart_path} 1>/dev/null 2>/dev/null || true + done +done + + +if [ -d "${EXCLUDE_DIRECTORY}" ]; then + # Move modified excluded files into excludes directory + for d in ${EXCLUDE_DIRECTORIES}; do + mkdir -p ${EXCLUDE_DIRECTORY}/${d} + done + for f in ${EXCLUDE_FILES}; do + # the file might be removed in upstream + if [ -f .rebase/from-copy/${f} ]; then + mv .rebase/from-copy/${f} ${EXCLUDE_DIRECTORY}/${f} + fi + done + unset EXCLUDE_DIRECTORIES + unset EXCLUDE_FILES +fi +if [ -d "${CRD_CHART_DIRECTORY}" ]; then + # Move CRDs back back into CRD chart since changes would have been tracked there + git reset HEAD~1 1>/dev/null 2>/dev/null + mv ${DEST_DIRECTORY}/crds ${CRD_CHART_DIRECTORY}/${CRDS_DIRECTORY} +fi + +rm diff.patch +rm -rf .rebase + +# Clean up empty directories from the merge +find ${DEST_DIRECTORY} -type d -empty -delete 1>/dev/null 2>/dev/null + +echo "" +echo "INTERACTIVE REBASE SHELL" +echo "===" +echo "" +echo "The changes have been loaded into your working directory." +echo "" +echo "Please look through each file that was changed and remove .rej files using an editor of your choice." +echo "" +echo "Once you have manually resolved the .rej files or added any additonal necessary changes, do the following:" +if [ -d "${CRD_CHART_DIRECTORY}" ]; then + echo "1) Add all changes to ${DEST_DIRECTORY}, ${EXCLUDE_DIRECTORY}, and ${CRD_CHART_DIRECTORY} to staging (e.g. git add)" +else + echo "1) Add all changes to ${DEST_DIRECTORY} and ${EXCLUDE_DIRECTORY} to staging (e.g. git add)" +fi +echo "2) Commit all other changes to save them (e.g. 'git add ; git commit -m \"message\"')" +echo "Note: Any additional commits you make will show up in your branch at the end of the rebase, so committing changes from 'make patch' could be helpful" +echo "" +if [ -d "${CRD_CHART_DIRECTORY}" ]; then + echo "Once you have added all changes to ${DEST_DIRECTORY}, ${EXCLUDE_DIRECTORY} or ${CRD_CHART_DIRECTORY}, exit out of the shell to move to the next commit." +else + echo "Once you have added all changes to ${DEST_DIRECTORY} or ${EXCLUDE_DIRECTORY}, exit out of the shell to move to the next commit." +fi +echo "" +echo "To force abort the rebase and discard your changes at any time, run 'abort'" +set +e +CURR_DIR=$(pwd) +bash --rcfile <(echo "PS1='(interactive-rebase-shell) '; alias abort='touch .abort_rebase; exit'") -i +set -e +cd ${CURR_DIR} 1>/dev/null 2>/dev/null + +# Ensure additional commits do not contain changes to DEST_DIRECTORY, EXCLUDE_DIRECTORY, or CRD_CHART_DIRECTORY +BAD_COMMITS=$(git log --first-parent --oneline ${GC_COMMIT}..HEAD -- ${DEST_DIRECTORY} ${EXCLUDE_DIRECTORY} ${CRD_CHART_DIRECTORY}) +# Ensure that changes are only added or modified to DEST_DIRECTORY, EXCLUDE_DIRECTORY, or CRD_CHART_DIRECTORY +BAD_CHANGES=$( + git status --porcelain \ + | grep -v "A ${DEST_DIRECTORY}" \ + | grep -v "M ${DEST_DIRECTORY}" \ + | grep -v "R ${DEST_DIRECTORY}" \ + | grep -v "D ${DEST_DIRECTORY}" \ + | grep -v "A ${EXCLUDE_DIRECTORY}" \ + | grep -v "M ${EXCLUDE_DIRECTORY}" \ + | grep -v "R ${EXCLUDE_DIRECTORY}" \ + | grep -v "D ${EXCLUDE_DIRECTORY}" \ + | grep -v "A ${CRD_CHART_DIRECTORY}" \ + | grep -v "M ${CRD_CHART_DIRECTORY}" \ + | grep -v "R ${CRD_CHART_DIRECTORY}" \ + | grep -v "D ${CRD_CHART_DIRECTORY}" \ + | tee +) + +set +e +GIT_REJ_CHECK=$(git diff --staged --name-only | grep ".rej") +if [[ -n ${GIT_REJ_CHECK} ]]; then + GIT_REJ_CHECK_DIFF_ARGS=$(echo "${GIT_REJ_CHECK}" | tr ' ' '\n' | sed "s:\(.*\):\:!\1:g" | xargs) +else + unset GIT_REJ_CHECK_DIFF_ARGS +fi +GIT_DIFF_CHECK=$(git diff --staged --check -- ${GIT_REJ_CHECK_DIFF_ARGS} ${EXCLUDE_FILES_DIFF_ARGS} || true) +set -e + +# Loop back through shell until the developer resolves all conflicts +while [ -n "${BAD_COMMITS}" ] || [ -n "${BAD_CHANGES}" ] || [[ -n "${GIT_DIFF_CHECK}" ]]; do + echo "" + if [ -f .abort_rebase ]; then + rm .abort_rebase + echo "Detected ABORT_REBASE has been set. Exiting..." + exit 1 + fi + if [ -n "${BAD_COMMITS}" ]; then + echo "ERROR: Detected the following commits that violate rebase guidelines:" + echo "${BAD_COMMITS}" + echo "" + fi + if [ -n "${BAD_CHANGES}" ]; then + echo "ERROR: Detected the following changes that violate rebase guidelines:" + echo "${BAD_CHANGES}" + echo "" + fi + if [ -n "${GIT_DIFF_CHECK}" ]; then + echo "ERROR: Detected unresolved issues in git diff --staged --check:" + echo "${GIT_DIFF_CHECK}" + echo "" + fi + if [ -n "${GIT_REJ_CHECK}" ]; then + echo "ERROR: Detected unresolved .rej files in staging:" + echo "${GIT_REJ_CHECK}" + echo "" + fi + echo "Only changes to ${DEST_DIRECTORY}, ${EXCLUDE_DIRECTORY}, or ${CRD_CHART_DIRECTORY} should be in staging. All other changes should be committed." + echo "" + echo "Please modify the commits and try again." + echo "" + echo "To force abort the rebase and discard your changes at any time, run 'abort'" + set +e + bash --rcfile <(echo "PS1='(interactive-rebase-shell) '; alias abort='touch .abort_rebase; exit'") -i + set -e + # Ensure additional commits do not contain changes to DEST_DIRECTORY, EXCLUDE_DIRECTORY, or CRD_CHART_DIRECTORY + BAD_COMMITS=$(git log --first-parent --oneline ${GC_COMMIT}..HEAD -- ${DEST_DIRECTORY} ${EXCLUDE_DIRECTORY} ${CRD_CHART_DIRECTORY}) + # Ensure that changes are only added or modified to DEST_DIRECTORY, EXCLUDE_DIRECTORY, or CRD_CHART_DIRECTORY + BAD_CHANGES=$( + git status --porcelain \ + | grep -v "A ${DEST_DIRECTORY}" \ + | grep -v "M ${DEST_DIRECTORY}" \ + | grep -v "R ${DEST_DIRECTORY}" \ + | grep -v "D ${DEST_DIRECTORY}" \ + | grep -v "A ${EXCLUDE_DIRECTORY}" \ + | grep -v "M ${EXCLUDE_DIRECTORY}" \ + | grep -v "R ${EXCLUDE_DIRECTORY}" \ + | grep -v "D ${EXCLUDE_DIRECTORY}" \ + | grep -v "A ${CRD_CHART_DIRECTORY}" \ + | grep -v "M ${CRD_CHART_DIRECTORY}" \ + | grep -v "R ${CRD_CHART_DIRECTORY}" \ + | grep -v "D ${CRD_CHART_DIRECTORY}" \ + | tee + ) + set +e + GIT_REJ_CHECK=$(git diff --staged --name-only | grep ".rej") + if [[ -n ${GIT_REJ_CHECK} ]]; then + GIT_REJ_CHECK_DIFF_ARGS=$(echo "${GIT_REJ_CHECK}" | tr ' ' '\n' | sed "s:\(.*\):\:!\1:g" | xargs) + else + unset GIT_REJ_CHECK_DIFF_ARGS + fi + GIT_DIFF_CHECK=$(git diff --staged --check -- ${GIT_REJ_CHECK_DIFF_ARGS} ${EXCLUDE_FILES_DIFF_ARGS} || true) + set -e +done + +# Merge current staged changes into the GC_COMMIT directly, ignoring any other commits added by the user +# Then set the GC_COMMIT once more since the commit hash has changed +NUM_USER_COMMITS=$(git rev-list --count ${GC_COMMIT}..HEAD) +git commit --fixup "${GC_COMMIT}" 1>/dev/null 2>/dev/null && GIT_SEQUENCE_EDITOR=true git rebase --interactive --autosquash "${GC_COMMIT}^" 1>/dev/null 2>/dev/null +GC_COMMIT=$(git rev-parse --short HEAD~${NUM_USER_COMMITS}) + +# Run make patch and save all changes that were added to the working directory throughout the rebase +rm ${CHARTS_ORIGINAL_DIRECTORY} 1>/dev/null 2>/dev/null || true +PACKAGE=${PACKAGE} USE_CACHE=${USE_CACHE} make patch 1>/dev/null 2>/dev/null +git add ${GC_DIRECTORY} +git commit --allow-empty -m "Rebase ${PACKAGE} to ${TO_COMMIT}" 1>/dev/null 2>/dev/null + + +# Ensure Git is clean +if [ -n "$(git status --porcelain)" ]; then + echo "Found unexpected changes after generating final patch post-rebase" + git status --porcelain + exit 1 +fi + +# Cherry pick all changes to the current branch +COMMITS=$(git log --first-parent --oneline ${GC_COMMIT}..HEAD | cut -d' ' -f1 | tail -r) +echo "" +echo "Applying the following commits to your current branch:" +echo "" +echo "$(git log --first-parent --oneline ${GC_COMMIT}..HEAD)" + +git checkout ${CURRENT_BRANCH} 1>/dev/null 2>/dev/null +for commit in ${COMMITS}; do + git cherry-pick --allow-empty -m 1 ${commit} 1>/dev/null 2>/dev/null || git commit --allow-empty 1>/dev/null 2>/dev/null +done + +echo "" +echo ">> Modifying the package.yaml and finishing up rebase..." +PACKAGE=${PACKAGE} USE_CACHE=${USE_CACHE} make prepare 1>/dev/null 2>/dev/null +yq e -i ".url = \"${TO_REMOTE}\"" ${PACKAGE_YAML_PATH} 1>/dev/null 2>/dev/null +yq e -i ".commit = \"${TO_COMMIT}\"" ${PACKAGE_YAML_PATH} 1>/dev/null 2>/dev/null +if [[ ${TO_DIR} != "." ]]; then + yq e -i ".subdirectory = \"${TO_DIR}\"" ${PACKAGE_YAML_PATH} 1>/dev/null 2>/dev/null +fi +PACKAGE=${PACKAGE} USE_CACHE=${USE_CACHE} make patch 1>/dev/null 2>/dev/null +PACKAGE=${PACKAGE} USE_CACHE=${USE_CACHE} make clean 1>/dev/null 2>/dev/null +git add ${GC_DIRECTORY} ${PACKAGE_YAML_PATH} +git commit --allow-empty -m "Update ${PACKAGE} to new base ${TO_COMMIT}" 1>/dev/null 2>/dev/null + +echo "" +echo "Hooray! The rebase is complete." From b19a5899e14daf2764760000fa27a3e144c845e3 Mon Sep 17 00:00:00 2001 From: Arvind Iyengar Date: Thu, 10 Nov 2022 08:09:42 -0800 Subject: [PATCH 02/20] Rebase rancher-project-monitoring to 252143f2d739cd04fd86bd0838910b15e6479b56 --- .../grafana/dashboards-1.14/statefulset.yaml | 928 ++++++++++++++++++ .../templates/grafana/servicemonitor.yaml | 32 + .../grafana/templates/networkpolicy.yaml | 52 + .../dashboards/rancher/pods-dashboards.yaml | 2 +- .../rancher/workload-dashboards.yaml | 2 +- .../dashboards-1.14/grafana-overview.yaml | 635 ++++++++++++ .../k8s-resources-project.yaml | 2 +- .../generated-changes/patch/Chart.yaml.patch | 14 +- .../patch/charts/grafana/Chart.yaml.patch | 22 + .../patch/charts/grafana/README.md.patch | 202 +++- .../grafana/templates/_helpers.tpl.patch | 20 + .../charts/grafana/templates/_pod.tpl.patch | 764 +++++++++++++- .../grafana/templates/clusterrole.yaml.patch | 14 + .../grafana/templates/configmap.yaml.patch | 87 ++ .../grafana/templates/deployment.yaml.patch | 24 + .../templates/headless-service.yaml.patch | 17 + .../charts/grafana/templates/hpa.yaml.patch | 10 + .../image-renderer-deployment.yaml.patch | 43 + .../image-renderer-network-policy.yaml.patch | 23 + .../image-renderer-service.yaml.patch | 12 + .../grafana/templates/nginx-config.yaml.patch | 40 + .../templates/poddisruptionbudget.yaml.patch | 9 + .../templates/podsecuritypolicy.yaml.patch | 37 + .../charts/grafana/templates/role.yaml.patch | 20 + .../grafana/templates/secret.yaml.patch | 17 + .../grafana/templates/service.yaml.patch | 35 + .../templates/serviceaccount.yaml.patch | 14 + .../templates/servicemonitor.yaml.patch | 39 + .../grafana/templates/statefulset.yaml.patch | 22 + .../grafana/templates/tests/test.yaml.patch | 45 + .../patch/charts/grafana/values.yaml.patch | 518 +++++++++- .../pods/rancher-pod-containers.json.patch | 130 +++ .../files/rancher/pods/rancher-pod.json.patch | 130 +++ .../rancher-workload-pods.json.patch | 130 +++ .../workloads/rancher-workload.json.patch | 130 +++ .../patch/templates/_helpers.tpl.patch | 116 ++- .../alertmanager/alertmanager.yaml.patch | 84 +- .../templates/alertmanager/ingress.yaml.patch | 3 +- .../podDisruptionBudget.yaml.patch | 8 +- .../templates/alertmanager/psp.yaml.patch | 28 +- .../templates/alertmanager/service.yaml.patch | 18 +- .../alertmanager/serviceaccount.yaml.patch | 9 +- .../grafana/configmap-dashboards.yaml.patch | 3 +- .../grafana/configmaps-datasources.yaml.patch | 20 +- .../alertmanager-overview.yaml.patch | 130 ++- .../dashboards-1.14/cluster-total.yaml.patch | 18 +- .../k8s-resources-namespace.yaml.patch | 614 ++++++++++-- .../k8s-resources-node.yaml.patch | 148 ++- .../k8s-resources-pod.yaml.patch | 510 ++++++++-- .../k8s-resources-workload.yaml.patch | 443 ++++++++- ...s-resources-workloads-namespace.yaml.patch | 459 ++++++++- .../namespace-by-pod.yaml.patch | 18 +- .../namespace-by-workload.yaml.patch | 58 +- .../persistentvolumesusage.yaml.patch | 90 +- .../dashboards-1.14/pod-total.yaml.patch | 18 +- .../dashboards-1.14/prometheus.yaml.patch | 128 ++- .../dashboards-1.14/statefulset.yaml.patch | 186 ---- .../dashboards-1.14/workload-total.yaml.patch | 18 +- .../grafana/servicemonitor.yaml.patch | 27 - .../templates/prometheus/ingress.yaml.patch | 3 +- .../prometheus/nginx-config.yaml.patch | 8 + .../prometheus/podDisruptionBudget.yaml.patch | 2 +- .../prometheus/prometheus.yaml.patch | 95 +- .../patch/templates/prometheus/psp.yaml.patch | 29 +- .../rules-1.14/alertmanager.rules.yaml.patch | 135 +++ .../rules-1.14/general.rules.yaml.patch | 77 +- .../rules-1.14/kubernetes-apps.yaml.patch | 312 +++++- .../rules-1.14/kubernetes-storage.yaml.patch | 122 ++- .../rules-1.14/prometheus.yaml.patch | 364 +++++++ .../templates/prometheus/service.yaml.patch | 15 +- .../prometheus/serviceaccount.yaml.patch | 9 +- .../generated-changes/patch/values.yaml.patch | 603 ++++++++++-- 72 files changed, 8472 insertions(+), 677 deletions(-) create mode 100644 packages/rancher-project-monitoring/generated-changes/exclude/templates/grafana/dashboards-1.14/statefulset.yaml create mode 100644 packages/rancher-project-monitoring/generated-changes/exclude/templates/grafana/servicemonitor.yaml create mode 100644 packages/rancher-project-monitoring/generated-changes/overlay/charts/grafana/templates/networkpolicy.yaml create mode 100644 packages/rancher-project-monitoring/generated-changes/overlay/templates/grafana/dashboards-1.14/grafana-overview.yaml create mode 100644 packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/Chart.yaml.patch create mode 100644 packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/templates/_helpers.tpl.patch create mode 100644 packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/templates/clusterrole.yaml.patch create mode 100644 packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/templates/configmap.yaml.patch create mode 100644 packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/templates/deployment.yaml.patch create mode 100644 packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/templates/headless-service.yaml.patch create mode 100644 packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/templates/hpa.yaml.patch create mode 100644 packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/templates/image-renderer-deployment.yaml.patch create mode 100644 packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/templates/image-renderer-network-policy.yaml.patch create mode 100644 packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/templates/image-renderer-service.yaml.patch create mode 100644 packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/templates/nginx-config.yaml.patch create mode 100644 packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/templates/poddisruptionbudget.yaml.patch create mode 100644 packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/templates/podsecuritypolicy.yaml.patch create mode 100644 packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/templates/role.yaml.patch create mode 100644 packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/templates/secret.yaml.patch create mode 100644 packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/templates/service.yaml.patch create mode 100644 packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/templates/serviceaccount.yaml.patch create mode 100644 packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/templates/servicemonitor.yaml.patch create mode 100644 packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/templates/statefulset.yaml.patch create mode 100644 packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/templates/tests/test.yaml.patch create mode 100644 packages/rancher-project-monitoring/generated-changes/patch/files/rancher/pods/rancher-pod-containers.json.patch create mode 100644 packages/rancher-project-monitoring/generated-changes/patch/files/rancher/pods/rancher-pod.json.patch create mode 100644 packages/rancher-project-monitoring/generated-changes/patch/files/rancher/workloads/rancher-workload-pods.json.patch create mode 100644 packages/rancher-project-monitoring/generated-changes/patch/files/rancher/workloads/rancher-workload.json.patch delete mode 100644 packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/statefulset.yaml.patch delete mode 100644 packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/servicemonitor.yaml.patch diff --git a/packages/rancher-project-monitoring/generated-changes/exclude/templates/grafana/dashboards-1.14/statefulset.yaml b/packages/rancher-project-monitoring/generated-changes/exclude/templates/grafana/dashboards-1.14/statefulset.yaml new file mode 100644 index 00000000..f94dc0b1 --- /dev/null +++ b/packages/rancher-project-monitoring/generated-changes/exclude/templates/grafana/dashboards-1.14/statefulset.yaml @@ -0,0 +1,928 @@ +{{- /* +Generated from 'statefulset' from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/master/manifests/grafana-dashboardDefinitions.yaml +Do not change in-place! In order to change this file first read following link: +https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack +*/ -}} +{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} +{{- if and (or .Values.grafana.enabled .Values.grafana.forceDeployDashboards) (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.grafana.defaultDashboardsEnabled }} +apiVersion: v1 +kind: ConfigMap +metadata: + namespace: {{ .Values.grafana.defaultDashboards.namespace }} + name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" $) "statefulset" | trunc 63 | trimSuffix "-" }} + annotations: +{{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} + labels: + {{- if $.Values.grafana.sidecar.dashboards.label }} + {{ $.Values.grafana.sidecar.dashboards.label }}: "1" + {{- end }} + app: {{ template "kube-prometheus-stack.name" $ }}-grafana +{{ include "kube-prometheus-stack.labels" $ | indent 4 }} +data: + statefulset.json: |- + { + "__inputs": [ + + ], + "__requires": [ + + ], + "annotations": { + "list": [ + + ] + }, + "editable": false, + "gnetId": null, + "graphTooltip": 0, + "hideControls": false, + "id": null, + "links": [ + + ], + "refresh": "", + "rows": [ + { + "collapse": false, + "collapsed": false, + "panels": [ + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "$datasource", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + + }, + "id": 2, + "interval": null, + "links": [ + + ], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "cores", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "span": 4, + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "lineColor": "rgb(31, 120, 193)", + "show": true + }, + "tableColumn": "", + "targets": [ + { + "expr": "sum(rate(container_cpu_usage_seconds_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", container!=\"\", namespace=\"$namespace\", pod=~\"$statefulset.*\"}[3m]))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "", + "refId": "A" + } + ], + "thresholds": "", + "title": "CPU", + "tooltip": { + "shared": false + }, + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "0", + "value": "null" + } + ], + "valueName": "current" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "$datasource", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + + }, + "id": 3, + "interval": null, + "links": [ + + ], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "GB", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "span": 4, + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "lineColor": "rgb(31, 120, 193)", + "show": true + }, + "tableColumn": "", + "targets": [ + { + "expr": "sum(container_memory_usage_bytes{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", container!=\"\", namespace=\"$namespace\", pod=~\"$statefulset.*\"}) / 1024^3", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "", + "refId": "A" + } + ], + "thresholds": "", + "title": "Memory", + "tooltip": { + "shared": false + }, + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "0", + "value": "null" + } + ], + "valueName": "current" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "$datasource", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + + }, + "id": 4, + "interval": null, + "links": [ + + ], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "Bps", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "span": 4, + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "lineColor": "rgb(31, 120, 193)", + "show": true + }, + "tableColumn": "", + "targets": [ + { + "expr": "sum(rate(container_network_transmit_bytes_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=\"$namespace\", pod=~\"$statefulset.*\"}[3m])) + sum(rate(container_network_receive_bytes_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=\"$namespace\",pod=~\"$statefulset.*\"}[3m]))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "", + "refId": "A" + } + ], + "thresholds": "", + "title": "Network", + "tooltip": { + "shared": false + }, + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "0", + "value": "null" + } + ], + "valueName": "current" + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": false, + "title": "Dashboard Row", + "titleSize": "h6", + "type": "row" + }, + { + "collapse": false, + "collapsed": false, + "height": "100px", + "panels": [ + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "$datasource", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + + }, + "id": 5, + "interval": null, + "links": [ + + ], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "span": 3, + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "expr": "max(kube_statefulset_replicas{job=\"kube-state-metrics\", cluster=\"$cluster\", namespace=\"$namespace\", statefulset=\"$statefulset\"}) without (instance, pod)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "", + "refId": "A" + } + ], + "thresholds": "", + "title": "Desired Replicas", + "tooltip": { + "shared": false + }, + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "0", + "value": "null" + } + ], + "valueName": "current" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "$datasource", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + + }, + "id": 6, + "interval": null, + "links": [ + + ], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "span": 3, + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "expr": "min(kube_statefulset_status_replicas_current{job=\"kube-state-metrics\", cluster=\"$cluster\", namespace=\"$namespace\", statefulset=\"$statefulset\"}) without (instance, pod)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "", + "refId": "A" + } + ], + "thresholds": "", + "title": "Replicas of current version", + "tooltip": { + "shared": false + }, + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "0", + "value": "null" + } + ], + "valueName": "current" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "$datasource", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + + }, + "id": 7, + "interval": null, + "links": [ + + ], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "span": 3, + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "expr": "max(kube_statefulset_status_observed_generation{job=\"kube-state-metrics\", cluster=\"$cluster\", namespace=\"$namespace\", statefulset=\"$statefulset\"}) without (instance, pod)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "", + "refId": "A" + } + ], + "thresholds": "", + "title": "Observed Generation", + "tooltip": { + "shared": false + }, + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "0", + "value": "null" + } + ], + "valueName": "current" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "$datasource", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + + }, + "id": 8, + "interval": null, + "links": [ + + ], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "span": 3, + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "expr": "max(kube_statefulset_metadata_generation{job=\"kube-state-metrics\", statefulset=\"$statefulset\", cluster=\"$cluster\", namespace=\"$namespace\"}) without (instance, pod)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "", + "refId": "A" + } + ], + "thresholds": "", + "title": "Metadata Generation", + "tooltip": { + "shared": false + }, + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "0", + "value": "null" + } + ], + "valueName": "current" + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": false, + "title": "Dashboard Row", + "titleSize": "h6", + "type": "row" + }, + { + "collapse": false, + "collapsed": false, + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "fillGradient": 0, + "gridPos": { + + }, + "id": 9, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "sideWidth": null, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "max(kube_statefulset_replicas{job=\"kube-state-metrics\", statefulset=\"$statefulset\", cluster=\"$cluster\", namespace=\"$namespace\"}) without (instance, pod)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "replicas specified", + "refId": "A" + }, + { + "expr": "max(kube_statefulset_status_replicas{job=\"kube-state-metrics\", statefulset=\"$statefulset\", cluster=\"$cluster\", namespace=\"$namespace\"}) without (instance, pod)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "replicas created", + "refId": "B" + }, + { + "expr": "min(kube_statefulset_status_replicas_ready{job=\"kube-state-metrics\", statefulset=\"$statefulset\", cluster=\"$cluster\", namespace=\"$namespace\"}) without (instance, pod)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "ready", + "refId": "C" + }, + { + "expr": "min(kube_statefulset_status_replicas_current{job=\"kube-state-metrics\", statefulset=\"$statefulset\", cluster=\"$cluster\", namespace=\"$namespace\"}) without (instance, pod)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "replicas of current version", + "refId": "D" + }, + { + "expr": "min(kube_statefulset_status_replicas_updated{job=\"kube-state-metrics\", statefulset=\"$statefulset\", cluster=\"$cluster\", namespace=\"$namespace\"}) without (instance, pod)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "updated", + "refId": "E" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Replicas", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": false, + "title": "Dashboard Row", + "titleSize": "h6", + "type": "row" + } + ], + "schemaVersion": 14, + "style": "dark", + "tags": [ + "kubernetes-mixin" + ], + "templating": { + "list": [ + { + "current": { + "text": "default", + "value": "default" + }, + "hide": 0, + "label": null, + "name": "datasource", + "options": [ + + ], + "query": "prometheus", + "refresh": 1, + "regex": "", + "type": "datasource" + }, + { + "allValue": null, + "current": { + + }, + "datasource": "$datasource", + "hide": {{ if .Values.grafana.sidecar.dashboards.multicluster }}0{{ else }}2{{ end }}, + "includeAll": false, + "label": "cluster", + "multi": false, + "name": "cluster", + "options": [ + + ], + "query": "label_values(kube_statefulset_metadata_generation, cluster)", + "refresh": 2, + "regex": "", + "sort": 1, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "current": { + + }, + "datasource": "$datasource", + "hide": 0, + "includeAll": false, + "label": "Namespace", + "multi": false, + "name": "namespace", + "options": [ + + ], + "query": "label_values(kube_statefulset_metadata_generation{job=\"kube-state-metrics\", cluster=\"$cluster\"}, namespace)", + "refresh": 2, + "regex": "", + "sort": 1, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "current": { + + }, + "datasource": "$datasource", + "hide": 0, + "includeAll": false, + "label": "Name", + "multi": false, + "name": "statefulset", + "options": [ + + ], + "query": "label_values(kube_statefulset_metadata_generation{job=\"kube-state-metrics\", cluster=\"$cluster\", namespace=\"$namespace\"}, statefulset)", + "refresh": 2, + "regex": "", + "sort": 1, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "query", + "useTags": false + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + "timezone": "{{ .Values.grafana.defaultDashboardsTimezone }}", + "title": "Kubernetes / StatefulSets", + "uid": "a31c1f46e6f727cb37c0d731a7245005", + "version": 0 + } +{{- end }} \ No newline at end of file diff --git a/packages/rancher-project-monitoring/generated-changes/exclude/templates/grafana/servicemonitor.yaml b/packages/rancher-project-monitoring/generated-changes/exclude/templates/grafana/servicemonitor.yaml new file mode 100644 index 00000000..b3c97ce5 --- /dev/null +++ b/packages/rancher-project-monitoring/generated-changes/exclude/templates/grafana/servicemonitor.yaml @@ -0,0 +1,32 @@ +{{- if and .Values.grafana.enabled .Values.grafana.serviceMonitor.selfMonitor }} +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + name: {{ template "kube-prometheus-stack.fullname" . }}-grafana + namespace: {{ template "kube-prometheus-stack-grafana.namespace" . }} + labels: + app: {{ template "kube-prometheus-stack.name" . }}-grafana +{{ include "kube-prometheus-stack.labels" . | indent 4 }} +spec: + selector: + matchLabels: + app.kubernetes.io/name: grafana + app.kubernetes.io/instance: {{ $.Release.Name | quote }} + namespaceSelector: + matchNames: + - {{ printf "%s" (include "kube-prometheus-stack-grafana.namespace" .) | quote }} + endpoints: + - port: {{ .Values.grafana.service.portName }} + {{- if .Values.grafana.serviceMonitor.interval }} + interval: {{ .Values.grafana.serviceMonitor.interval }} + {{- end }} + path: {{ .Values.grafana.serviceMonitor.path | quote }} +{{- if .Values.grafana.serviceMonitor.metricRelabelings }} + metricRelabelings: +{{ tpl (toYaml .Values.grafana.serviceMonitor.metricRelabelings | indent 6) . }} +{{- end }} +{{- if .Values.grafana.serviceMonitor.relabelings }} + relabelings: +{{ toYaml .Values.grafana.serviceMonitor.relabelings | indent 6 }} +{{- end }} +{{- end }} diff --git a/packages/rancher-project-monitoring/generated-changes/overlay/charts/grafana/templates/networkpolicy.yaml b/packages/rancher-project-monitoring/generated-changes/overlay/charts/grafana/templates/networkpolicy.yaml new file mode 100644 index 00000000..b751d943 --- /dev/null +++ b/packages/rancher-project-monitoring/generated-changes/overlay/charts/grafana/templates/networkpolicy.yaml @@ -0,0 +1,52 @@ +{{- if .Values.networkPolicy.enabled }} +apiVersion: networking.k8s.io/v1 +kind: NetworkPolicy +metadata: + name: {{ template "grafana.fullname" . }} + namespace: {{ template "grafana.namespace" . }} + labels: + {{- include "grafana.labels" . | nindent 4 }} + {{- with .Values.labels }} + {{ toYaml . | nindent 4 }} + {{- end }} + {{- with .Values.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + policyTypes: + {{- if .Values.networkPolicy.ingress }} + - Ingress + {{- end }} + {{- if .Values.networkPolicy.egress.enabled }} + - Egress + {{- end }} + podSelector: + matchLabels: + {{- include "grafana.selectorLabels" . | nindent 6 }} + + {{- if .Values.networkPolicy.egress.enabled }} + egress: + - ports: + {{ .Values.networkPolicy.egress.ports | toJson }} + {{- end }} + {{- if .Values.networkPolicy.ingress }} + ingress: + - ports: + - port: {{ .Values.service.targetPort }} + {{- if not .Values.networkPolicy.allowExternal }} + from: + - podSelector: + matchLabels: + {{ template "grafana.fullname" . }}-client: "true" + {{- with .Values.networkPolicy.explicitNamespacesSelector }} + - namespaceSelector: + {{- toYaml . | nindent 12 }} + {{- end }} + - podSelector: + matchLabels: + {{- include "grafana.labels" . | nindent 14 }} + role: read + {{- end }} + {{- end }} +{{- end }} diff --git a/packages/rancher-project-monitoring/generated-changes/overlay/templates/dashboards/rancher/pods-dashboards.yaml b/packages/rancher-project-monitoring/generated-changes/overlay/templates/dashboards/rancher/pods-dashboards.yaml index fd2dbbaa..6214dc5c 100644 --- a/packages/rancher-project-monitoring/generated-changes/overlay/templates/dashboards/rancher/pods-dashboards.yaml +++ b/packages/rancher-project-monitoring/generated-changes/overlay/templates/dashboards/rancher/pods-dashboards.yaml @@ -8,7 +8,7 @@ metadata: {{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} labels: {{- if $.Values.grafana.sidecar.dashboards.label }} - {{ $.Values.grafana.sidecar.dashboards.label }}: "1" + {{ $.Values.grafana.sidecar.dashboards.label }}: {{ ternary $.Values.grafana.sidecar.dashboards.labelValue "1" (not (empty $.Values.grafana.sidecar.dashboards.labelValue)) | quote }} {{- end }} app: {{ template "project-prometheus-stack.name" $ }}-grafana {{ include "project-prometheus-stack.labels" $ | indent 4 }} diff --git a/packages/rancher-project-monitoring/generated-changes/overlay/templates/dashboards/rancher/workload-dashboards.yaml b/packages/rancher-project-monitoring/generated-changes/overlay/templates/dashboards/rancher/workload-dashboards.yaml index 0826fc50..7934818f 100644 --- a/packages/rancher-project-monitoring/generated-changes/overlay/templates/dashboards/rancher/workload-dashboards.yaml +++ b/packages/rancher-project-monitoring/generated-changes/overlay/templates/dashboards/rancher/workload-dashboards.yaml @@ -8,7 +8,7 @@ metadata: {{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} labels: {{- if $.Values.grafana.sidecar.dashboards.label }} - {{ $.Values.grafana.sidecar.dashboards.label }}: "1" + {{ $.Values.grafana.sidecar.dashboards.label }}: {{ ternary $.Values.grafana.sidecar.dashboards.labelValue "1" (not (empty $.Values.grafana.sidecar.dashboards.labelValue)) | quote }} {{- end }} app: {{ template "project-prometheus-stack.name" $ }}-grafana {{ include "project-prometheus-stack.labels" $ | indent 4 }} diff --git a/packages/rancher-project-monitoring/generated-changes/overlay/templates/grafana/dashboards-1.14/grafana-overview.yaml b/packages/rancher-project-monitoring/generated-changes/overlay/templates/grafana/dashboards-1.14/grafana-overview.yaml new file mode 100644 index 00000000..8d08b055 --- /dev/null +++ b/packages/rancher-project-monitoring/generated-changes/overlay/templates/grafana/dashboards-1.14/grafana-overview.yaml @@ -0,0 +1,635 @@ +{{- /* +Generated from 'grafana-overview' from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/grafana-dashboardDefinitions.yaml +Do not change in-place! In order to change this file first read following link: +https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack +*/ -}} +{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} +{{- if and (or .Values.grafana.enabled .Values.grafana.forceDeployDashboards) (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.grafana.defaultDashboardsEnabled }} +apiVersion: v1 +kind: ConfigMap +metadata: + namespace: {{ template "kube-prometheus-stack-grafana.namespace" . }} + name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" $) "grafana-overview" | trunc 63 | trimSuffix "-" }} + annotations: +{{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} + labels: + {{- if $.Values.grafana.sidecar.dashboards.label }} + {{ $.Values.grafana.sidecar.dashboards.label }}: {{ ternary $.Values.grafana.sidecar.dashboards.labelValue "1" (not (empty $.Values.grafana.sidecar.dashboards.labelValue)) | quote }} + {{- end }} + app: {{ template "kube-prometheus-stack.name" $ }}-grafana +{{ include "kube-prometheus-stack.labels" $ | indent 4 }} +data: + grafana-overview.json: |- + { + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": "-- Grafana --", + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "target": { + "limit": 100, + "matchAny": false, + "tags": [ + + ], + "type": "dashboard" + }, + "type": "dashboard" + } + ] + }, + "editable": true, + "gnetId": null, + "graphTooltip": 0, + "id": 3085, + "iteration": 1631554945276, + "links": [ + + ], + "panels": [ + { + "datasource": "$datasource", + "fieldConfig": { + "defaults": { + "mappings": [ + + ], + "noValue": "0", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + + ] + }, + "gridPos": { + "h": 5, + "w": 6, + "x": 0, + "y": 0 + }, + "id": 6, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "text": { + + }, + "textMode": "auto" + }, + "pluginVersion": "8.1.3", + "targets": [ + { + "expr": "grafana_alerting_result_total{job=~\"$job\", instance=~\"$instance\", state=\"alerting\"}", + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Firing Alerts", + "type": "stat" + }, + { + "datasource": "$datasource", + "fieldConfig": { + "defaults": { + "mappings": [ + + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + + ] + }, + "gridPos": { + "h": 5, + "w": 6, + "x": 6, + "y": 0 + }, + "id": 8, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "text": { + + }, + "textMode": "auto" + }, + "pluginVersion": "8.1.3", + "targets": [ + { + "expr": "sum(grafana_stat_totals_dashboard{job=~\"$job\", instance=~\"$instance\"})", + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Dashboards", + "type": "stat" + }, + { + "datasource": "$datasource", + "fieldConfig": { + "defaults": { + "custom": { + "align": null, + "displayMode": "auto" + }, + "mappings": [ + + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + + ] + }, + "gridPos": { + "h": 5, + "w": 12, + "x": 12, + "y": 0 + }, + "id": 10, + "options": { + "showHeader": true + }, + "pluginVersion": "8.1.3", + "targets": [ + { + "expr": "grafana_build_info{job=~\"$job\", instance=~\"$instance\"}", + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Build Info", + "transformations": [ + { + "id": "labelsToFields", + "options": { + + } + }, + { + "id": "organize", + "options": { + "excludeByName": { + "Time": true, + "Value": true, + "branch": true, + "container": true, + "goversion": true, + "namespace": true, + "pod": true, + "revision": true + }, + "indexByName": { + "Time": 7, + "Value": 11, + "branch": 4, + "container": 8, + "edition": 2, + "goversion": 6, + "instance": 1, + "job": 0, + "namespace": 9, + "pod": 10, + "revision": 5, + "version": 3 + }, + "renameByName": { + + } + } + } + ], + "type": "table" + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fieldConfig": { + "defaults": { + "links": [ + + ] + }, + "overrides": [ + + ] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 5 + }, + "hiddenSeries": false, + "id": 2, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.1.3", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum by (status_code) (irate(grafana_http_request_duration_seconds_count{job=~\"$job\", instance=~\"$instance\"}[1m])) ", + "interval": "", + "legendFormat": "{{`{{`}}status_code{{`}}`}}", + "refId": "A" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeRegions": [ + + ], + "timeShift": null, + "title": "RPS", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "$$hashKey": "object:157", + "format": "reqps", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "$$hashKey": "object:158", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fieldConfig": { + "defaults": { + "links": [ + + ] + }, + "overrides": [ + + ] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 5 + }, + "hiddenSeries": false, + "id": 4, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.1.3", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "exemplar": true, + "expr": "histogram_quantile(0.99, sum(irate(grafana_http_request_duration_seconds_bucket{instance=~\"$instance\", job=~\"$job\"}[$__rate_interval])) by (le)) * 1", + "interval": "", + "legendFormat": "99th Percentile", + "refId": "A" + }, + { + "exemplar": true, + "expr": "histogram_quantile(0.50, sum(irate(grafana_http_request_duration_seconds_bucket{instance=~\"$instance\", job=~\"$job\"}[$__rate_interval])) by (le)) * 1", + "interval": "", + "legendFormat": "50th Percentile", + "refId": "B" + }, + { + "exemplar": true, + "expr": "sum(irate(grafana_http_request_duration_seconds_sum{instance=~\"$instance\", job=~\"$job\"}[$__rate_interval])) * 1 / sum(irate(grafana_http_request_duration_seconds_count{instance=~\"$instance\", job=~\"$job\"}[$__rate_interval]))", + "interval": "", + "legendFormat": "Average", + "refId": "C" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeRegions": [ + + ], + "timeShift": null, + "title": "Request Latency", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "$$hashKey": "object:210", + "format": "ms", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "$$hashKey": "object:211", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + } + ], + "schemaVersion": 30, + "style": "dark", + "tags": [ + + ], + "templating": { + "list": [ + { + "current": { + "text": "Prometheus", + "value": "Prometheus" + }, + "description": null, + "error": null, + "hide": 0, + "includeAll": false, + "label": "Data Source", + "multi": false, + "name": "datasource", + "options": [ + + ], + "query": "prometheus", + "queryValue": "", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "type": "datasource" + }, + { + "allValue": ".*", + "current": { + "selected": false, + "text": [ + "default/grafana" + ], + "value": [ + "default/grafana" + ] + }, + "datasource": "$datasource", + "definition": "label_values(grafana_build_info, job)", + "description": null, + "error": null, + "hide": 0, + "includeAll": true, + "label": null, + "multi": true, + "name": "job", + "options": [ + + ], + "query": { + "query": "label_values(grafana_build_info, job)", + "refId": "Billing Admin-job-Variable-Query" + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": ".*", + "current": { + "selected": false, + "text": "All", + "value": "$__all" + }, + "datasource": "$datasource", + "definition": "label_values(grafana_build_info, instance)", + "description": null, + "error": null, + "hide": 0, + "includeAll": true, + "label": null, + "multi": true, + "name": "instance", + "options": [ + + ], + "query": { + "query": "label_values(grafana_build_info, instance)", + "refId": "Billing Admin-instance-Variable-Query" + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + } + ] + }, + "time": { + "from": "now-6h", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ] + }, + "timezone": "{{ .Values.grafana.defaultDashboardsTimezone }}", + "title": "Grafana Overview", + "uid": "6be0s85Mk", + "version": 2 + } +{{- end }} \ No newline at end of file diff --git a/packages/rancher-project-monitoring/generated-changes/overlay/templates/grafana/dashboards-1.14/k8s-resources-project.yaml b/packages/rancher-project-monitoring/generated-changes/overlay/templates/grafana/dashboards-1.14/k8s-resources-project.yaml index 4e103f5d..e40e1c91 100644 --- a/packages/rancher-project-monitoring/generated-changes/overlay/templates/grafana/dashboards-1.14/k8s-resources-project.yaml +++ b/packages/rancher-project-monitoring/generated-changes/overlay/templates/grafana/dashboards-1.14/k8s-resources-project.yaml @@ -14,7 +14,7 @@ metadata: {{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} labels: {{- if $.Values.grafana.sidecar.dashboards.label }} - {{ $.Values.grafana.sidecar.dashboards.label }}: "1" + {{ $.Values.grafana.sidecar.dashboards.label }}: {{ ternary $.Values.grafana.sidecar.dashboards.labelValue "1" (not (empty $.Values.grafana.sidecar.dashboards.labelValue)) | quote }} {{- end }} app: {{ template "project-prometheus-stack.name" $ }}-grafana {{ include "project-prometheus-stack.labels" $ | indent 4 }} diff --git a/packages/rancher-project-monitoring/generated-changes/patch/Chart.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/Chart.yaml.patch index 3568acbf..f467ad73 100644 --- a/packages/rancher-project-monitoring/generated-changes/patch/Chart.yaml.patch +++ b/packages/rancher-project-monitoring/generated-changes/patch/Chart.yaml.patch @@ -1,6 +1,6 @@ --- charts-original/Chart.yaml +++ charts/Chart.yaml -@@ -1,61 +1,30 @@ +@@ -1,61 +1,33 @@ annotations: - artifacthub.io/links: | - - name: Chart Source @@ -12,10 +12,11 @@ catalog.cattle.io/certified: rancher - catalog.cattle.io/deploys-on-os: windows - catalog.cattle.io/display-name: Monitoring +- catalog.cattle.io/kube-version: '>=1.16.0-0' +- catalog.cattle.io/namespace: cattle-monitoring-system + catalog.cattle.io/display-name: Project Monitoring + catalog.cattle.io/hidden: "true" - catalog.cattle.io/kube-version: '>=1.16.0-0' -- catalog.cattle.io/namespace: cattle-monitoring-system ++ catalog.cattle.io/kube-version: '>=1.16.0-0 < 1.25.0-0' catalog.cattle.io/permits-os: linux,windows - catalog.cattle.io/provides-gvr: monitoring.coreos.com.prometheus/v1 - catalog.cattle.io/rancher-version: '>= 2.6.0-0 <=2.6.99-0' @@ -25,11 +26,11 @@ - catalog.cattle.io/type: cluster-tool - catalog.cattle.io/ui-component: monitoring - catalog.cattle.io/upstream-version: 19.0.3 -+ catalog.cattle.io/rancher-version: '>= 2.6.5-0 <= 2.6.100-0' ++ catalog.cattle.io/rancher-version: '>= 2.6.5-0 <= 2.8.0-0' + catalog.cattle.io/release-name: rancher-project-monitoring apiVersion: v2 -appVersion: 0.50.0 -+appVersion: 0.1.0 ++appVersion: 0.59.1 dependencies: - condition: grafana.enabled name: grafana @@ -67,6 +68,9 @@ -sources: -- https://github.com/prometheus-community/helm-charts -- https://github.com/prometheus-operator/kube-prometheus ++- email: amangeet.samra@suse.com ++ name: Geet ++ url: https://github.com/geethub97 +name: rancher-project-monitoring type: application -version: 100.1.2+up19.0.3 diff --git a/packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/Chart.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/Chart.yaml.patch new file mode 100644 index 00000000..7570298e --- /dev/null +++ b/packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/Chart.yaml.patch @@ -0,0 +1,22 @@ +--- charts-original/charts/grafana/Chart.yaml ++++ charts/charts/grafana/Chart.yaml +@@ -1,11 +1,12 @@ + annotations: + catalog.cattle.io/hidden: "true" ++ catalog.cattle.io/kube-version: '>= 1.16.0-0 < 1.25.0-0' + catalog.cattle.io/os: linux + catalog.rancher.io/certified: rancher + catalog.rancher.io/namespace: cattle-monitoring-system + catalog.rancher.io/release-name: rancher-grafana + apiVersion: v2 +-appVersion: 7.5.11 ++appVersion: 9.1.5 + description: The leading tool for querying and visualizing time series and metrics. + home: https://grafana.net + icon: https://raw.githubusercontent.com/grafana/grafana/master/public/img/logo_transparent_400x.png +@@ -25,4 +26,4 @@ + sources: + - https://github.com/grafana/grafana + type: application +-version: 6.16.14 ++version: 6.38.6 diff --git a/packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/README.md.patch b/packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/README.md.patch index d93bf6b6..03a3a9ce 100644 --- a/packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/README.md.patch +++ b/packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/README.md.patch @@ -1,19 +1,217 @@ --- charts-original/charts/grafana/README.md +++ charts/charts/grafana/README.md -@@ -158,16 +158,13 @@ +@@ -59,22 +59,24 @@ + | `securityContext` | Deployment securityContext | `{"runAsUser": 472, "runAsGroup": 472, "fsGroup": 472}` | + | `priorityClassName` | Name of Priority Class to assign pods | `nil` | + | `image.repository` | Image repository | `grafana/grafana` | +-| `image.tag` | Image tag (`Must be >= 5.0.0`) | `7.5.11` | +-| `image.sha` | Image sha (optional) | `` | ++| `image.tag` | Overrides the Grafana image tag whose default is the chart appVersion (`Must be >= 5.0.0`) | `` | ++| `image.sha` | Image sha (optional) | `` | + | `image.pullPolicy` | Image pull policy | `IfNotPresent` | +-| `image.pullSecrets` | Image pull secrets | `{}` | ++| `image.pullSecrets` | Image pull secrets (can be templated) | `[]` | + | `service.enabled` | Enable grafana service | `true` | + | `service.type` | Kubernetes service type | `ClusterIP` | + | `service.port` | Kubernetes port where service is exposed | `80` | + | `service.portName` | Name of the port on the service | `service` | ++| `service.appProtocol` | Adds the appProtocol field to the service | `` | + | `service.targetPort` | Internal service is port | `3000` | + | `service.nodePort` | Kubernetes service nodePort | `nil` | +-| `service.annotations` | Service annotations | `{}` | ++| `service.annotations` | Service annotations (can be templated) | `{}` | + | `service.labels` | Custom labels | `{}` | + | `service.clusterIP` | internal cluster service IP | `nil` | + | `service.loadBalancerIP` | IP address to assign to load balancer (if supported) | `nil` | + | `service.loadBalancerSourceRanges` | list of IP CIDRs allowed access to lb (if supported) | `[]` | + | `service.externalIPs` | service external IP addresses | `[]` | ++| `headlessService` | Create a headless service | `false` | + | `extraExposePorts` | Additional service ports for sidecar containers| `[]` | + | `hostAliases` | adds rules to the pod's /etc/hosts | `[]` | + | `ingress.enabled` | Enables Ingress | `false` | +@@ -97,12 +99,12 @@ + | `persistence.enabled` | Use persistent volume to store data | `false` | + | `persistence.type` | Type of persistence (`pvc` or `statefulset`) | `pvc` | + | `persistence.size` | Size of persistent volume claim | `10Gi` | +-| `persistence.existingClaim` | Use an existing PVC to persist data | `nil` | ++| `persistence.existingClaim` | Use an existing PVC to persist data (can be templated) | `nil` | + | `persistence.storageClassName` | Type of persistent volume claim | `nil` | + | `persistence.accessModes` | Persistence access modes | `[ReadWriteOnce]` | + | `persistence.annotations` | PersistentVolumeClaim annotations | `{}` | + | `persistence.finalizers` | PersistentVolumeClaim finalizers | `[ "kubernetes.io/pvc-protection" ]` | +-| `persistence.subPath` | Mount a sub dir of the persistent volume | `nil` | ++| `persistence.subPath` | Mount a sub dir of the persistent volume (can be templated) | `nil` | + | `persistence.inMemory.enabled` | If persistence is not enabled, whether to mount the local storage in-memory to improve performance | `false` | + | `persistence.inMemory.sizeLimit` | SizeLimit for the in-memory local storage | `nil` | + | `initChownData.enabled` | If false, don't reset data ownership at startup | true | +@@ -113,16 +115,20 @@ + | `initChownData.resources` | init-chown-data pod resource requests & limits | `{}` | + | `schedulerName` | Alternate scheduler name | `nil` | + | `env` | Extra environment variables passed to pods | `{}` | +-| `envValueFrom` | Environment variables from alternate sources. See the API docs on [EnvVarSource](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.17/#envvarsource-v1-core) for format details. | `{}` | ++| `envValueFrom` | Environment variables from alternate sources. See the API docs on [EnvVarSource](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.17/#envvarsource-v1-core) for format details. Can be templated | `{}` | + | `envFromSecret` | Name of a Kubernetes secret (must be manually created in the same namespace) containing values to be added to the environment. Can be templated | `""` | ++| `envFromSecrets` | List of Kubernetes secrets (must be manually created in the same namespace) containing values to be added to the environment. Can be templated | `[]` | ++| `envFromConfigMaps` | List of Kubernetes ConfigMaps (must be manually created in the same namespace) containing values to be added to the environment. Can be templated | `[]` | + | `envRenderSecret` | Sensible environment variables passed to pods and stored as secret | `{}` | + | `enableServiceLinks` | Inject Kubernetes services as environment variables. | `true` | + | `extraSecretMounts` | Additional grafana server secret mounts | `[]` | + | `extraVolumeMounts` | Additional grafana server volume mounts | `[]` | +-| `extraConfigmapMounts` | Additional grafana server configMap volume mounts | `[]` | ++| `createConfigmap` | Enable creating the grafana configmap | `true` | ++| `extraConfigmapMounts` | Additional grafana server configMap volume mounts (values are templated) | `[]` | + | `extraEmptyDirMounts` | Additional grafana server emptyDir volume mounts | `[]` | + | `plugins` | Plugins to be loaded along with Grafana | `[]` | + | `datasources` | Configure grafana datasources (passed through tpl) | `{}` | ++| `alerting` | Configure grafana alerting (passed through tpl) | `{}` | + | `notifiers` | Configure grafana notifiers | `{}` | + | `dashboardProviders` | Configure grafana dashboard providers | `{}` | + | `dashboards` | Dashboards to import | `{}` | +@@ -136,12 +142,14 @@ + | `podAnnotations` | Pod annotations | `{}` | + | `podLabels` | Pod labels | `{}` | + | `podPortName` | Name of the grafana port on the pod | `grafana` | ++| `lifecycleHooks` | Lifecycle hooks for podStart and preStop [Example](https://kubernetes.io/docs/tasks/configure-pod-container/attach-handler-lifecycle-event/#define-poststart-and-prestop-handlers) | `{}` | + | `sidecar.image.repository` | Sidecar image repository | `quay.io/kiwigrid/k8s-sidecar` | +-| `sidecar.image.tag` | Sidecar image tag | `1.12.3` | ++| `sidecar.image.tag` | Sidecar image tag | `1.19.2` | + | `sidecar.image.sha` | Sidecar image sha (optional) | `""` | + | `sidecar.imagePullPolicy` | Sidecar image pull policy | `IfNotPresent` | + | `sidecar.resources` | Sidecar resources | `{}` | +-| `sidecar.enableUniqueFilenames` | Sets the kiwigrid/k8s-sidecar UNIQUE_FILENAMES environment variable | `false` | ++| `sidecar.securityContext` | Sidecar securityContext | `{}` | ++| `sidecar.enableUniqueFilenames` | Sets the kiwigrid/k8s-sidecar UNIQUE_FILENAMES environment variable. If set to `true` the sidecar will create unique filenames where duplicate data keys exist between ConfigMaps and/or Secrets within the same or multiple Namespaces. | `false` | + | `sidecar.dashboards.enabled` | Enables the cluster wide search for dashboards and adds/updates/deletes them in grafana | `false` | + | `sidecar.dashboards.SCProvider` | Enables creation of sidecar provider | `true` | + | `sidecar.dashboards.provider.name` | Unique name of the grafana provider | `sidecarProvider` | +@@ -154,25 +162,26 @@ + | `sidecar.dashboards.watchMethod` | Method to use to detect ConfigMap changes. With WATCH the sidecar will do a WATCH requests, with SLEEP it will list all ConfigMaps, then sleep for 60 seconds. | `WATCH` | + | `sidecar.skipTlsVerify` | Set to true to skip tls verification for kube api calls | `nil` | + | `sidecar.dashboards.label` | Label that config maps with dashboards should have to be added | `grafana_dashboard` | +-| `sidecar.dashboards.labelValue` | Label value that config maps with dashboards should have to be added | `nil` | ++| `sidecar.dashboards.labelValue` | Label value that config maps with dashboards should have to be added | `""` | | `sidecar.dashboards.folder` | Folder in the pod that should hold the collected dashboards (unless `sidecar.dashboards.defaultFolderName` is set). This path will be mounted. | `/tmp/dashboards` | | `sidecar.dashboards.folderAnnotation` | The annotation the sidecar will look for in configmaps to override the destination folder for files | `nil` | | `sidecar.dashboards.defaultFolderName` | The default folder name, it will create a subfolder under the `sidecar.dashboards.folder` and put dashboards in there instead | `nil` | -| `sidecar.dashboards.searchNamespace` | Namespaces list. If specified, the sidecar will search for dashboards config-maps inside these namespaces.Otherwise the namespace in which the sidecar is running will be used.It's also possible to specify ALL to search in all namespaces. | `nil` | ++| `sidecar.dashboards.script` | Absolute path to shell script to execute after a configmap got reloaded. | `nil` | | `sidecar.dashboards.resource` | Should the sidecar looks into secrets, configmaps or both. | `both` | ++| `sidecar.dashboards.extraMounts` | Additional dashboard sidecar volume mounts. | `[]` | | `sidecar.datasources.enabled` | Enables the cluster wide search for datasources and adds/updates/deletes them in grafana |`false` | | `sidecar.datasources.label` | Label that config maps with datasources should have to be added | `grafana_datasource` | - | `sidecar.datasources.labelValue` | Label value that config maps with datasources should have to be added | `nil` | +-| `sidecar.datasources.labelValue` | Label value that config maps with datasources should have to be added | `nil` | -| `sidecar.datasources.searchNamespace` | Namespaces list. If specified, the sidecar will search for datasources config-maps inside these namespaces.Otherwise the namespace in which the sidecar is running will be used.It's also possible to specify ALL to search in all namespaces. | `nil` | ++| `sidecar.datasources.labelValue` | Label value that config maps with datasources should have to be added | `""` | | `sidecar.datasources.resource` | Should the sidecar looks into secrets, configmaps or both. | `both` | ++| `sidecar.datasources.reloadURL` | Full url of datasource configuration reload API endpoint, to invoke after a config-map change | `"http://localhost:3000/api/admin/provisioning/datasources/reload"` | ++| `sidecar.datasources.skipReload` | Enabling this omits defining the REQ_URL and REQ_METHOD environment variables | `false` | | `sidecar.notifiers.enabled` | Enables the cluster wide search for notifiers and adds/updates/deletes them in grafana | `false` | | `sidecar.notifiers.label` | Label that config maps with notifiers should have to be added | `grafana_notifier` | -| `sidecar.notifiers.searchNamespace` | Namespaces list. If specified, the sidecar will search for notifiers config-maps (or secrets) inside these namespaces.Otherwise the namespace in which the sidecar is running will be used.It's also possible to specify ALL to search in all namespaces. | `nil` | | `sidecar.notifiers.resource` | Should the sidecar looks into secrets, configmaps or both. | `both` | | `smtp.existingSecret` | The name of an existing secret containing the SMTP credentials. | `""` | | `smtp.userKey` | The key in the existing SMTP secret containing the username. | `"user"` | + | `smtp.passwordKey` | The key in the existing SMTP secret containing the password. | `"password"` | +-| `admin.existingSecret` | The name of an existing secret containing the admin credentials. | `""` | ++| `admin.existingSecret` | The name of an existing secret containing the admin credentials (can be templated). | `""` | + | `admin.userKey` | The key in the existing admin secret containing the username. | `"admin-user"` | + | `admin.passwordKey` | The key in the existing admin secret containing the password. | `"admin-password"` | + | `serviceAccount.autoMount` | Automount the service account token in the pod| `true` | +@@ -188,9 +197,9 @@ + | `rbac.extraRoleRules` | Additional rules to add to the Role | [] | + | `rbac.extraClusterRoleRules` | Additional rules to add to the ClusterRole | [] | + | `command` | Define command to be executed by grafana container at startup | `nil` | +-| `testFramework.enabled` | Whether to create test-related resources | `false` | +-| `testFramework.image` | `test-framework` image repository. | `rancher/mirrored-bats-bats` | +-| `testFramework.tag` | `test-framework` image tag. | `v1.1.0` | ++| `testFramework.enabled` | Whether to create test-related resources | `true` | ++| `testFramework.image` | `test-framework` image repository. | `bats/bats` | ++| `testFramework.tag` | `test-framework` image tag. | `v1.4.1` | + | `testFramework.imagePullPolicy` | `test-framework` image pull policy. | `IfNotPresent` | + | `testFramework.securityContext` | `test-framework` securityContext | `{}` | + | `downloadDashboards.env` | Environment variables to be passed to the `download-dashboards` container | `{}` | +@@ -222,15 +231,29 @@ + | `imageRenderer.hostAliases` | image-renderer deployment Host Aliases | `[]` | + | `imageRenderer.priorityClassName` | image-renderer deployment priority class | `''` | + | `imageRenderer.service.enabled` | Enable the image-renderer service | `true` | +-| `imageRenderer.service.portName` | image-renderer service port name | `'http'` | +-| `imageRenderer.service.port` | image-renderer service port used by both service and deployment | `8081` | ++| `imageRenderer.service.portName` | image-renderer service port name | `http` | ++| `imageRenderer.service.port` | image-renderer port used by deployment | `8081` | ++| `imageRenderer.service.targetPort` | image-renderer service port used by service | `8081` | ++| `imageRenderer.appProtocol` | Adds the appProtocol field to the service | `` | + | `imageRenderer.grafanaSubPath` | Grafana sub path to use for image renderer callback url | `''` | + | `imageRenderer.podPortName` | name of the image-renderer port on the pod | `http` | + | `imageRenderer.revisionHistoryLimit` | number of image-renderer replica sets to keep | `10` | +-| `imageRenderer.networkPolicy.limitIngress` | Enable a NetworkPolicy to limit inbound traffic from only the created grafana pods | `true` | +-| `imageRenderer.networkPolicy.limitEgress` | Enable a NetworkPolicy to limit outbound traffic to only the created grafana pods | `false` | ++| `imageRenderer.networkPolicy.limitIngress` | Enable a NetworkPolicy to limit inbound traffic from only the created grafana pods | `true` | ++| `imageRenderer.networkPolicy.limitEgress` | Enable a NetworkPolicy to limit outbound traffic to only the created grafana pods | `false` | + | `imageRenderer.resources` | Set resource limits for image-renderer pdos | `{}` | ++| `imageRenderer.nodeSelector` | Node labels for pod assignment | `{}` | ++| `imageRenderer.tolerations` | Toleration labels for pod assignment | `[]` | ++| `imageRenderer.affinity` | Affinity settings for pod assignment | `{}` | ++| `networkPolicy.enabled` | Enable creation of NetworkPolicy resources. | `false` | ++| `networkPolicy.allowExternal` | Don't require client label for connections | `true` | ++| `networkPolicy.explicitNamespacesSelector` | A Kubernetes LabelSelector to explicitly select namespaces from which traffic could be allowed | `{}` | ++| `networkPolicy.ingress` | Enable the creation of an ingress network policy | `true` | ++| `networkPolicy.egress.enabled` | Enable the creation of an egress network policy | `false` | ++| `networkPolicy.egress.ports` | An array of ports to allow for the egress | `[]` | ++| `enableKubeBackwardCompatibility` | Enable backward compatibility of kubernetes where pod's defintion version below 1.13 doesn't have the enableServiceLinks option | `false` | + ++ ++ + ### Example ingress with path + + With grafana 6.3 and above +@@ -250,7 +273,7 @@ + ### Example of extraVolumeMounts + + Volume can be type persistentVolumeClaim or hostPath but not both at same time. +-If none existingClaim or hostPath argument is givent then type is emptyDir. ++If neither existingClaim or hostPath argument is given then type is emptyDir. + + ```yaml + - extraVolumeMounts: +@@ -459,7 +482,7 @@ + + ## How to securely reference secrets in grafana.ini + +-This example uses Grafana uses [file providers](https://grafana.com/docs/grafana/latest/administration/configuration/#file-provider) for secret values and the `extraSecretMounts` configuration flag (Additional grafana server secret mounts) to mount the secrets. ++This example uses Grafana [file providers](https://grafana.com/docs/grafana/latest/administration/configuration/#file-provider) for secret values and the `extraSecretMounts` configuration flag (Additional grafana server secret mounts) to mount the secrets. + + In grafana.ini: + +@@ -516,7 +539,7 @@ + + ## Image Renderer Plug-In + +-This chart supports enabling [remote image rendering](https://github.com/grafana/grafana-image-renderer/blob/master/docs/remote_rendering_using_docker.md) ++This chart supports enabling [remote image rendering](https://github.com/grafana/grafana-image-renderer/blob/master/README.md#run-in-docker) + + ```yaml + imageRenderer: +@@ -526,3 +549,23 @@ + ### Image Renderer NetworkPolicy + + By default the image-renderer pods will have a network policy which only allows ingress traffic from the created grafana instance ++ ++### High Availability for unified alerting ++ ++If you want to run Grafana in a high availability cluster you need to enable ++the headless service by setting `headlessService: true` in your `values.yaml` ++file. ++ ++As next step you have to setup the `grafana.ini` in your `values.yaml` in a way ++that it will make use of the headless service to obtain all the IPs of the ++cluster. You should replace ``{{ Name }}`` with the name of your helm deployment. ++ ++```yaml ++grafana.ini: ++ ... ++ unified_alerting: ++ enabled: true ++ ha_peers: {{ Name }}-headless:9094 ++ alerting: ++ enabled: false ++``` diff --git a/packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/templates/_helpers.tpl.patch b/packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/templates/_helpers.tpl.patch new file mode 100644 index 00000000..f220183b --- /dev/null +++ b/packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/templates/_helpers.tpl.patch @@ -0,0 +1,20 @@ +--- charts-original/charts/grafana/templates/_helpers.tpl ++++ charts/charts/grafana/templates/_helpers.tpl +@@ -171,6 +171,17 @@ + {{- end -}} + + {{/* ++Return the appropriate apiVersion for podDisruptionBudget. ++*/}} ++{{- define "grafana.podDisruptionBudget.apiVersion" -}} ++ {{- if $.Capabilities.APIVersions.Has "policy/v1/PodDisruptionBudget" -}} ++ {{- print "policy/v1" -}} ++ {{- else -}} ++ {{- print "policy/v1beta1" -}} ++ {{- end -}} ++{{- end -}} ++ ++{{/* + Return if ingress is stable. + */}} + {{- define "grafana.ingress.isStable" -}} diff --git a/packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/templates/_pod.tpl.patch b/packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/templates/_pod.tpl.patch index 8925e5a6..bef5c87b 100644 --- a/packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/templates/_pod.tpl.patch +++ b/packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/templates/_pod.tpl.patch @@ -1,6 +1,122 @@ --- charts-original/charts/grafana/templates/_pod.tpl +++ charts/charts/grafana/templates/_pod.tpl -@@ -106,10 +106,8 @@ +@@ -4,18 +4,18 @@ + {{- end }} + serviceAccountName: {{ template "grafana.serviceAccountName" . }} + automountServiceAccountToken: {{ .Values.serviceAccount.autoMount }} +-{{- if .Values.securityContext }} ++{{- with .Values.securityContext }} + securityContext: +-{{ toYaml .Values.securityContext | indent 2 }} ++ {{- toYaml . | nindent 2 }} + {{- end }} +-{{- if .Values.hostAliases }} ++{{- with .Values.hostAliases }} + hostAliases: +-{{ toYaml .Values.hostAliases | indent 2 }} ++ {{- toYaml . | nindent 2 }} + {{- end }} + {{- if .Values.priorityClassName }} + priorityClassName: {{ .Values.priorityClassName }} + {{- end }} +-{{- if ( or .Values.persistence.enabled .Values.dashboards .Values.sidecar.datasources.enabled .Values.sidecar.notifiers.enabled .Values.extraInitContainers) }} ++{{- if ( or .Values.persistence.enabled .Values.dashboards .Values.sidecar.notifiers.enabled .Values.extraInitContainers (and .Values.sidecar.datasources.enabled .Values.sidecar.datasources.initDatasources)) }} + initContainers: + {{- end }} + {{- if ( and .Values.persistence.enabled .Values.initChownData.enabled ) }} +@@ -30,13 +30,15 @@ + runAsNonRoot: false + runAsUser: 0 + command: ["chown", "-R", "{{ .Values.securityContext.runAsUser }}:{{ .Values.securityContext.runAsGroup }}", "/var/lib/grafana"] ++ {{- with .Values.initChownData.resources }} + resources: +-{{ toYaml .Values.initChownData.resources | indent 6 }} ++ {{- toYaml . | nindent 6 }} ++ {{- end }} + volumeMounts: + - name: storage + mountPath: "/var/lib/grafana" + {{- if .Values.persistence.subPath }} +- subPath: {{ .Values.persistence.subPath }} ++ subPath: {{ tpl .Values.persistence.subPath . }} + {{- end }} + {{- end }} + {{- if .Values.dashboards }} +@@ -49,13 +51,19 @@ + imagePullPolicy: {{ .Values.downloadDashboardsImage.pullPolicy }} + command: ["/bin/sh"] + args: [ "-c", "mkdir -p /var/lib/grafana/dashboards/default && /bin/sh -x /etc/grafana/download_dashboards.sh" ] ++ {{- with .Values.downloadDashboards.resources }} + resources: +-{{ toYaml .Values.downloadDashboards.resources | indent 6 }} ++ {{- toYaml . | nindent 6 }} ++ {{- end }} + env: + {{- range $key, $value := .Values.downloadDashboards.env }} + - name: "{{ $key }}" + value: "{{ $value }}" + {{- end }} ++ {{- with .Values.downloadDashboards.securityContext }} ++ securityContext: ++ {{- toYaml . | nindent 6 }} ++ {{- end }} + {{- if .Values.downloadDashboards.envFromSecret }} + envFrom: + - secretRef: +@@ -68,7 +76,7 @@ + - name: storage + mountPath: "/var/lib/grafana" + {{- if .Values.persistence.subPath }} +- subPath: {{ .Values.persistence.subPath }} ++ subPath: {{ tpl .Values.persistence.subPath . }} + {{- end }} + {{- range .Values.extraSecretMounts }} + - name: {{ .name }} +@@ -76,28 +84,35 @@ + readOnly: {{ .readOnly }} + {{- end }} + {{- end }} +-{{- if .Values.sidecar.datasources.enabled }} +- - name: {{ template "grafana.name" . }}-sc-datasources ++{{- if and .Values.sidecar.datasources.enabled .Values.sidecar.datasources.initDatasources }} ++ - name: {{ template "grafana.name" . }}-init-sc-datasources + {{- if .Values.sidecar.image.sha }} + image: "{{ template "system_default_registry" . }}{{ .Values.sidecar.image.repository }}:{{ .Values.sidecar.image.tag }}@sha256:{{ .Values.sidecar.image.sha }}" + {{- else }} + image: "{{ template "system_default_registry" . }}{{ .Values.sidecar.image.repository }}:{{ .Values.sidecar.image.tag }}" + {{- end }} + imagePullPolicy: {{ .Values.sidecar.imagePullPolicy }} +- {{- if .Values.sidecar.datasources.envFromSecret }} +- envFrom: +- - secretRef: +- name: {{ tpl .Values.sidecar.datasources.envFromSecret . }} +- {{- end }} + env: ++ {{- range $key, $value := .Values.sidecar.datasources.env }} ++ - name: "{{ $key }}" ++ value: "{{ $value }}" ++ {{- end }} ++ {{- if .Values.sidecar.datasources.ignoreAlreadyProcessed }} ++ - name: IGNORE_ALREADY_PROCESSED ++ value: "true" ++ {{- end }} + - name: METHOD +- value: LIST ++ value: "LIST" + - name: LABEL + value: "{{ .Values.sidecar.datasources.label }}" + {{- if .Values.sidecar.datasources.labelValue }} + - name: LABEL_VALUE + value: {{ quote .Values.sidecar.datasources.labelValue }} + {{- end }} ++ {{- if or .Values.sidecar.logLevel .Values.sidecar.datasources.logLevel }} ++ - name: LOG_LEVEL ++ value: {{ default .Values.sidecar.logLevel .Values.sidecar.datasources.logLevel }} ++ {{- end }} + - name: FOLDER + value: "/etc/grafana/provisioning/datasources" + - name: RESOURCE +@@ -106,20 +121,24 @@ - name: UNIQUE_FILENAMES value: "{{ .Values.sidecar.enableUniqueFilenames }}" {{- end }} @@ -12,7 +128,52 @@ {{- if .Values.sidecar.skipTlsVerify }} - name: SKIP_TLS_VERIFY value: "{{ .Values.sidecar.skipTlsVerify }}" -@@ -141,10 +139,8 @@ + {{- end }} ++ {{- with .Values.sidecar.resources }} + resources: +-{{ toYaml .Values.sidecar.resources | indent 6 }} ++ {{- toYaml . | nindent 6 }} ++ {{- end }} ++ {{- with .Values.sidecar.securityContext }} ++ securityContext: ++ {{- toYaml . | nindent 6 }} ++ {{- end }} + volumeMounts: + - name: sc-datasources-volume + mountPath: "/etc/grafana/provisioning/datasources" +-{{- end}} ++{{- end }} + {{- if .Values.sidecar.notifiers.enabled }} + - name: {{ template "grafana.name" . }}-sc-notifiers + {{- if .Values.sidecar.image.sha }} +@@ -129,10 +148,26 @@ + {{- end }} + imagePullPolicy: {{ .Values.sidecar.imagePullPolicy }} + env: ++ {{- range $key, $value := .Values.sidecar.notifiers.env }} ++ - name: "{{ $key }}" ++ value: "{{ $value }}" ++ {{- end }} ++ {{- if .Values.sidecar.notifiers.ignoreAlreadyProcessed }} ++ - name: IGNORE_ALREADY_PROCESSED ++ value: "true" ++ {{- end }} + - name: METHOD + value: LIST + - name: LABEL + value: "{{ .Values.sidecar.notifiers.label }}" ++ {{- if .Values.sidecar.notifiers.labelValue }} ++ - name: LABEL_VALUE ++ value: {{ quote .Values.sidecar.notifiers.labelValue }} ++ {{- end }} ++ {{- if or .Values.sidecar.logLevel .Values.sidecar.notifiers.logLevel }} ++ - name: LOG_LEVEL ++ value: {{ default .Values.sidecar.logLevel .Values.sidecar.notifiers.logLevel }} ++ {{- end }} + - name: FOLDER + value: "/etc/grafana/provisioning/notifiers" + - name: RESOURCE +@@ -141,30 +176,44 @@ - name: UNIQUE_FILENAMES value: "{{ .Values.sidecar.enableUniqueFilenames }}" {{- end }} @@ -24,7 +185,73 @@ {{- if .Values.sidecar.skipTlsVerify }} - name: SKIP_TLS_VERIFY value: "{{ .Values.sidecar.skipTlsVerify }}" -@@ -191,10 +187,8 @@ + {{- end }} ++ {{- with .Values.sidecar.livenessProbe }} ++ livenessProbe: ++ {{- toYaml . | nindent 6 }} ++ {{- end }} ++ {{- with .Values.sidecar.readinessProbe }} ++ readinessProbe: ++ {{- toYaml . | nindent 6 }} ++ {{- end }} ++ {{- with .Values.sidecar.resources }} + resources: +-{{ toYaml .Values.sidecar.resources | indent 6 }} ++ {{- toYaml . | nindent 6 }} ++ {{- end }} ++ {{- with .Values.sidecar.securityContext }} ++ securityContext: ++ {{- toYaml . | nindent 6 }} ++ {{- end }} + volumeMounts: + - name: sc-notifiers-volume + mountPath: "/etc/grafana/provisioning/notifiers" + {{- end}} + {{- if .Values.extraInitContainers }} +-{{ toYaml .Values.extraInitContainers | indent 2 }} ++{{ tpl (toYaml .Values.extraInitContainers) . | indent 2 }} + {{- end }} + {{- if .Values.image.pullSecrets }} + imagePullSecrets: + {{- range .Values.image.pullSecrets }} +- - name: {{ . }} +-{{- end}} ++ - name: {{ tpl . $root }} + {{- end }} ++{{- end }} ++{{- if not .Values.enableKubeBackwardCompatibility }} + enableServiceLinks: {{ .Values.enableServiceLinks }} ++{{- end }} + containers: + {{- if .Values.sidecar.dashboards.enabled }} + - name: {{ template "grafana.name" . }}-sc-dashboard +@@ -175,6 +224,14 @@ + {{- end }} + imagePullPolicy: {{ .Values.sidecar.imagePullPolicy }} + env: ++ {{- range $key, $value := .Values.sidecar.dashboards.env }} ++ - name: "{{ $key }}" ++ value: "{{ $value }}" ++ {{- end }} ++ {{- if .Values.sidecar.dashboards.ignoreAlreadyProcessed }} ++ - name: IGNORE_ALREADY_PROCESSED ++ value: "true" ++ {{- end }} + - name: METHOD + value: {{ .Values.sidecar.dashboards.watchMethod }} + - name: LABEL +@@ -183,6 +240,10 @@ + - name: LABEL_VALUE + value: {{ quote .Values.sidecar.dashboards.labelValue }} + {{- end }} ++ {{- if or .Values.sidecar.logLevel .Values.sidecar.dashboards.logLevel }} ++ - name: LOG_LEVEL ++ value: {{ default .Values.sidecar.logLevel .Values.sidecar.dashboards.logLevel }} ++ {{- end }} + - name: FOLDER + value: "{{ .Values.sidecar.dashboards.folder }}{{- with .Values.sidecar.dashboards.defaultFolderName }}/{{ . }}{{- end }}" + - name: RESOURCE +@@ -191,10 +252,8 @@ - name: UNIQUE_FILENAMES value: "{{ .Values.sidecar.enableUniqueFilenames }}" {{- end }} @@ -36,3 +263,534 @@ {{- if .Values.sidecar.skipTlsVerify }} - name: SKIP_TLS_VERIFY value: "{{ .Values.sidecar.skipTlsVerify }}" +@@ -203,17 +262,254 @@ + - name: FOLDER_ANNOTATION + value: "{{ .Values.sidecar.dashboards.folderAnnotation }}" + {{- end }} ++ {{- if .Values.sidecar.dashboards.script }} ++ - name: SCRIPT ++ value: "{{ .Values.sidecar.dashboards.script }}" ++ {{- end }} ++ {{- if .Values.sidecar.dashboards.watchServerTimeout }} ++ {{- if ne .Values.sidecar.dashboards.watchMethod "WATCH" }} ++ {{- fail (printf "Cannot use .Values.sidecar.dashboards.watchServerTimeout with .Values.sidecar.dashboards.watchMethod %s" .Values.sidecar.dashboards.watchMethod) }} ++ {{- end }} ++ - name: WATCH_SERVER_TIMEOUT ++ value: "{{ .Values.sidecar.dashboards.watchServerTimeout }}" ++ {{- end }} ++ {{- if .Values.sidecar.dashboards.watchClientTimeout }} ++ {{- if ne .Values.sidecar.dashboards.watchMethod "WATCH" }} ++ {{- fail (printf "Cannot use .Values.sidecar.dashboards.watchClientTimeout with .Values.sidecar.dashboards.watchMethod %s" .Values.sidecar.dashboards.watchMethod) }} ++ {{- end }} ++ - name: WATCH_CLIENT_TIMEOUT ++ value: "{{ .Values.sidecar.dashboards.watchClientTimeout }}" ++ {{- end }} ++ {{- with .Values.sidecar.livenessProbe }} ++ livenessProbe: ++ {{- toYaml . | nindent 6 }} ++ {{- end }} ++ {{- with .Values.sidecar.readinessProbe }} ++ readinessProbe: ++ {{- toYaml . | nindent 6 }} ++ {{- end }} ++ {{- with .Values.sidecar.resources }} + resources: +-{{ toYaml .Values.sidecar.resources | indent 6 }} ++ {{- toYaml . | nindent 6 }} ++ {{- end }} ++ {{- with .Values.sidecar.securityContext }} ++ securityContext: ++ {{- toYaml . | nindent 6 }} ++ {{- end }} + volumeMounts: + - name: sc-dashboard-volume + mountPath: {{ .Values.sidecar.dashboards.folder | quote }} ++ {{- if .Values.sidecar.dashboards.extraMounts }} ++ {{- toYaml .Values.sidecar.dashboards.extraMounts | trim | nindent 6}} ++ {{- end }} + {{- end}} ++{{- if .Values.sidecar.datasources.enabled }} ++ - name: {{ template "grafana.name" . }}-sc-datasources ++ {{- if .Values.sidecar.image.sha }} ++ image: "{{ template "system_default_registry" . }}{{ .Values.sidecar.image.repository }}:{{ .Values.sidecar.image.tag }}@sha256:{{ .Values.sidecar.image.sha }}" ++ {{- else }} ++ image: "{{ template "system_default_registry" . }}{{ .Values.sidecar.image.repository }}:{{ .Values.sidecar.image.tag }}" ++ {{- end }} ++ imagePullPolicy: {{ .Values.sidecar.imagePullPolicy }} ++ env: ++ {{- range $key, $value := .Values.sidecar.datasources.env }} ++ - name: "{{ $key }}" ++ value: "{{ $value }}" ++ {{- end }} ++ {{- if .Values.sidecar.datasources.ignoreAlreadyProcessed }} ++ - name: IGNORE_ALREADY_PROCESSED ++ value: "true" ++ {{- end }} ++ - name: METHOD ++ value: {{ .Values.sidecar.datasources.watchMethod }} ++ - name: LABEL ++ value: "{{ .Values.sidecar.datasources.label }}" ++ {{- if .Values.sidecar.datasources.labelValue }} ++ - name: LABEL_VALUE ++ value: {{ quote .Values.sidecar.datasources.labelValue }} ++ {{- end }} ++ {{- if or .Values.sidecar.logLevel .Values.sidecar.datasources.logLevel }} ++ - name: LOG_LEVEL ++ value: {{ default .Values.sidecar.logLevel .Values.sidecar.datasources.logLevel }} ++ {{- end }} ++ - name: FOLDER ++ value: "/etc/grafana/provisioning/datasources" ++ - name: RESOURCE ++ value: {{ quote .Values.sidecar.datasources.resource }} ++ {{- if .Values.sidecar.enableUniqueFilenames }} ++ - name: UNIQUE_FILENAMES ++ value: "{{ .Values.sidecar.enableUniqueFilenames }}" ++ {{- end }} ++ - name: NAMESPACE ++ value: "{{ .Values.global.cattle.projectNamespaces | join "," }}" ++ {{- if .Values.sidecar.skipTlsVerify }} ++ - name: SKIP_TLS_VERIFY ++ value: "{{ .Values.sidecar.skipTlsVerify }}" ++ {{- end }} ++ {{- if .Values.sidecar.datasources.script }} ++ - name: SCRIPT ++ value: "{{ .Values.sidecar.datasources.script }}" ++ {{- end }} ++ {{- if and (not .Values.env.GF_SECURITY_ADMIN_USER) (not .Values.env.GF_SECURITY_DISABLE_INITIAL_ADMIN_CREATION) }} ++ - name: REQ_USERNAME ++ valueFrom: ++ secretKeyRef: ++ name: {{ (tpl .Values.admin.existingSecret .) | default (include "grafana.fullname" .) }} ++ key: {{ .Values.admin.userKey | default "admin-user" }} ++ {{- end }} ++ {{- if and (not .Values.env.GF_SECURITY_ADMIN_PASSWORD) (not .Values.env.GF_SECURITY_ADMIN_PASSWORD__FILE) (not .Values.env.GF_SECURITY_DISABLE_INITIAL_ADMIN_CREATION) }} ++ - name: REQ_PASSWORD ++ valueFrom: ++ secretKeyRef: ++ name: {{ (tpl .Values.admin.existingSecret .) | default (include "grafana.fullname" .) }} ++ key: {{ .Values.admin.passwordKey | default "admin-password" }} ++ {{- end }} ++ {{- if not .Values.sidecar.datasources.skipReload }} ++ - name: REQ_URL ++ value: {{ .Values.sidecar.datasources.reloadURL }} ++ - name: REQ_METHOD ++ value: POST ++ {{- end }} ++ {{- if .Values.sidecar.datasources.watchServerTimeout }} ++ {{- if ne .Values.sidecar.datasources.watchMethod "WATCH" }} ++ {{- fail (printf "Cannot use .Values.sidecar.datasources.watchServerTimeout with .Values.sidecar.datasources.watchMethod %s" .Values.sidecar.datasources.watchMethod) }} ++ {{- end }} ++ - name: WATCH_SERVER_TIMEOUT ++ value: "{{ .Values.sidecar.datasources.watchServerTimeout }}" ++ {{- end }} ++ {{- if .Values.sidecar.datasources.watchClientTimeout }} ++ {{- if ne .Values.sidecar.datasources.watchMethod "WATCH" }} ++ {{- fail (printf "Cannot use .Values.sidecar.datasources.watchClientTimeout with .Values.sidecar.datasources.watchMethod %s" .Values.sidecar.datasources.watchMethod) }} ++ {{- end }} ++ - name: WATCH_CLIENT_TIMEOUT ++ value: "{{ .Values.sidecar.datasources.watchClientTimeout }}" ++ {{- end }} ++ {{- with .Values.sidecar.livenessProbe }} ++ livenessProbe: ++ {{- toYaml . | nindent 6 }} ++ {{- end }} ++ {{- with .Values.sidecar.readinessProbe }} ++ readinessProbe: ++ {{- toYaml . | nindent 6 }} ++ {{- end }} ++ {{- with .Values.sidecar.resources }} ++ resources: ++ {{- toYaml . | nindent 6 }} ++ {{- end }} ++ {{- with .Values.sidecar.securityContext }} ++ securityContext: ++ {{- toYaml . | nindent 6 }} ++ {{- end }} ++ volumeMounts: ++ - name: sc-datasources-volume ++ mountPath: "/etc/grafana/provisioning/datasources" ++{{- end}} ++{{- if .Values.sidecar.plugins.enabled }} ++ - name: {{ template "grafana.name" . }}-sc-plugins ++ {{- if .Values.sidecar.image.sha }} ++ image: "{{ template "system_default_registry" . }}{{ .Values.sidecar.image.repository }}:{{ .Values.sidecar.image.tag }}@sha256:{{ .Values.sidecar.image.sha }}" ++ {{- else }} ++ image: "{{ template "system_default_registry" . }}{{ .Values.sidecar.image.repository }}:{{ .Values.sidecar.image.tag }}" ++ {{- end }} ++ imagePullPolicy: {{ .Values.sidecar.imagePullPolicy }} ++ env: ++ {{- range $key, $value := .Values.sidecar.plugins.env }} ++ - name: "{{ $key }}" ++ value: "{{ $value }}" ++ {{- end }} ++ {{- if .Values.sidecar.plugins.ignoreAlreadyProcessed }} ++ - name: IGNORE_ALREADY_PROCESSED ++ value: "true" ++ {{- end }} ++ - name: METHOD ++ value: {{ .Values.sidecar.plugins.watchMethod }} ++ - name: LABEL ++ value: "{{ .Values.sidecar.plugins.label }}" ++ {{- if .Values.sidecar.plugins.labelValue }} ++ - name: LABEL_VALUE ++ value: {{ quote .Values.sidecar.plugins.labelValue }} ++ {{- end }} ++ {{- if or .Values.sidecar.logLevel .Values.sidecar.plugins.logLevel }} ++ - name: LOG_LEVEL ++ value: {{ default .Values.sidecar.logLevel .Values.sidecar.plugins.logLevel }} ++ {{- end }} ++ - name: FOLDER ++ value: "/etc/grafana/provisioning/plugins" ++ - name: RESOURCE ++ value: {{ quote .Values.sidecar.plugins.resource }} ++ {{- if .Values.sidecar.enableUniqueFilenames }} ++ - name: UNIQUE_FILENAMES ++ value: "{{ .Values.sidecar.enableUniqueFilenames }}" ++ {{- end }} ++ - name: NAMESPACE ++ value: "{{ .Values.global.cattle.projectNamespaces | join "," }}" ++ {{- if .Values.sidecar.plugins.script }} ++ - name: SCRIPT ++ value: "{{ .Values.sidecar.plugins.script }}" ++ {{- end }} ++ {{- if .Values.sidecar.skipTlsVerify }} ++ - name: SKIP_TLS_VERIFY ++ value: "{{ .Values.sidecar.skipTlsVerify }}" ++ {{- end }} ++ {{- if and (not .Values.env.GF_SECURITY_ADMIN_USER) (not .Values.env.GF_SECURITY_DISABLE_INITIAL_ADMIN_CREATION) }} ++ - name: REQ_USERNAME ++ valueFrom: ++ secretKeyRef: ++ name: {{ (tpl .Values.admin.existingSecret .) | default (include "grafana.fullname" .) }} ++ key: {{ .Values.admin.userKey | default "admin-user" }} ++ {{- end }} ++ {{- if and (not .Values.env.GF_SECURITY_ADMIN_PASSWORD) (not .Values.env.GF_SECURITY_ADMIN_PASSWORD__FILE) (not .Values.env.GF_SECURITY_DISABLE_INITIAL_ADMIN_CREATION) }} ++ - name: REQ_PASSWORD ++ valueFrom: ++ secretKeyRef: ++ name: {{ (tpl .Values.admin.existingSecret .) | default (include "grafana.fullname" .) }} ++ key: {{ .Values.admin.passwordKey | default "admin-password" }} ++ {{- end }} ++ {{- if not .Values.sidecar.plugins.skipReload }} ++ - name: REQ_URL ++ value: {{ .Values.sidecar.plugins.reloadURL }} ++ - name: REQ_METHOD ++ value: POST ++ {{- end }} ++ {{- if .Values.sidecar.plugins.watchServerTimeout }} ++ {{- if ne .Values.sidecar.plugins.watchMethod "WATCH" }} ++ {{- fail (printf "Cannot use .Values.sidecar.plugins.watchServerTimeout with .Values.sidecar.plugins.watchMethod %s" .Values.sidecar.plugins.watchMethod) }} ++ {{- end }} ++ - name: WATCH_SERVER_TIMEOUT ++ value: "{{ .Values.sidecar.plugins.watchServerTimeout }}" ++ {{- end }} ++ {{- if .Values.sidecar.plugins.watchClientTimeout }} ++ {{- if ne .Values.sidecar.plugins.watchMethod "WATCH" }} ++ {{- fail (printf "Cannot use .Values.sidecar.plugins.watchClientTimeout with .Values.sidecar.plugins.watchMethod %s" .Values.sidecar.plugins.watchMethod) }} ++ {{- end }} ++ - name: WATCH_CLIENT_TIMEOUT ++ value: "{{ .Values.sidecar.plugins.watchClientTimeout }}" ++ {{- end }} ++ {{- with .Values.sidecar.livenessProbe }} ++ livenessProbe: ++ {{- toYaml . | nindent 6 }} ++ {{- end }} ++ {{- with .Values.sidecar.readinessProbe }} ++ readinessProbe: ++ {{- toYaml . | nindent 6 }} ++ {{- end }} ++ {{- with .Values.sidecar.resources }} ++ resources: ++ {{- toYaml . | nindent 6 }} ++ {{- end }} ++ {{- with .Values.sidecar.securityContext }} ++ securityContext: ++ {{- toYaml . | nindent 6 }} ++ {{- end }} ++ volumeMounts: ++ - name: sc-plugins-volume ++ mountPath: "/etc/grafana/provisioning/plugins" ++{{- end}} + - name: {{ .Chart.Name }} + {{- if .Values.image.sha }} +- image: "{{ template "system_default_registry" . }}{{ .Values.image.repository }}:{{ .Values.image.tag }}@sha256:{{ .Values.image.sha }}" ++ image: "{{ template "system_default_registry" . }}{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}@sha256:{{ .Values.image.sha }}" + {{- else }} +- image: "{{ template "system_default_registry" . }}{{ .Values.image.repository }}:{{ .Values.image.tag }}" ++ image: "{{ template "system_default_registry" . }}{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" + {{- end }} + imagePullPolicy: {{ .Values.image.pullPolicy }} + {{- if .Values.command }} +@@ -222,10 +518,10 @@ + - {{ . }} + {{- end }} + {{- end}} +-{{- if .Values.containerSecurityContext }} ++ {{- with .Values.containerSecurityContext }} + securityContext: +-{{- toYaml .Values.containerSecurityContext | nindent 6 }} +-{{- end }} ++ {{- toYaml . | nindent 6 }} ++ {{- end }} + volumeMounts: + - name: config + mountPath: "/etc/grafana/grafana.ini" +@@ -235,16 +531,17 @@ + mountPath: "/etc/grafana/ldap.toml" + subPath: ldap.toml + {{- end }} ++ {{- $root := . }} + {{- range .Values.extraConfigmapMounts }} +- - name: {{ .name }} +- mountPath: {{ .mountPath }} +- subPath: {{ .subPath | default "" }} ++ - name: {{ tpl .name $root }} ++ mountPath: {{ tpl .mountPath $root }} ++ subPath: {{ (tpl .subPath $root) | default "" }} + readOnly: {{ .readOnly }} + {{- end }} + - name: storage + mountPath: "/var/lib/grafana" + {{- if .Values.persistence.subPath }} +- subPath: {{ .Values.persistence.subPath }} ++ subPath: {{ tpl .Values.persistence.subPath . }} + {{- end }} + {{- if .Values.dashboards }} + {{- range $provider, $dashboards := .Values.dashboards }} +@@ -277,6 +574,13 @@ + subPath: {{ . | quote }} + {{- end }} + {{- end }} ++{{- if .Values.alerting }} ++{{- range (keys .Values.alerting | sortAlpha) }} ++ - name: config ++ mountPath: "/etc/grafana/provisioning/alerting/{{ . }}" ++ subPath: {{ . | quote }} ++{{- end }} ++{{- end }} + {{- if .Values.dashboardProviders }} + {{- range (keys .Values.dashboardProviders | sortAlpha) }} + - name: config +@@ -297,6 +601,10 @@ + - name: sc-datasources-volume + mountPath: "/etc/grafana/provisioning/datasources" + {{- end}} ++{{- if .Values.sidecar.plugins.enabled }} ++ - name: sc-plugins-volume ++ mountPath: "/etc/grafana/provisioning/plugins" ++{{- end}} + {{- if .Values.sidecar.notifiers.enabled }} + - name: sc-notifiers-volume + mountPath: "/etc/grafana/provisioning/notifiers" +@@ -318,25 +626,22 @@ + mountPath: {{ .mountPath }} + {{- end }} + ports: +- - name: {{ .Values.service.portName }} ++ - name: {{ .Values.podPortName }} + containerPort: {{ .Values.service.targetPort }} + protocol: TCP +- - name: {{ .Values.podPortName }} +- containerPort: 3000 +- protocol: TCP + env: + {{- if and (not .Values.env.GF_SECURITY_ADMIN_USER) (not .Values.env.GF_SECURITY_DISABLE_INITIAL_ADMIN_CREATION) }} + - name: GF_SECURITY_ADMIN_USER + valueFrom: + secretKeyRef: +- name: {{ .Values.admin.existingSecret | default (include "grafana.fullname" .) }} ++ name: {{ (tpl .Values.admin.existingSecret .) | default (include "grafana.fullname" .) }} + key: {{ .Values.admin.userKey | default "admin-user" }} + {{- end }} + {{- if and (not .Values.env.GF_SECURITY_ADMIN_PASSWORD) (not .Values.env.GF_SECURITY_ADMIN_PASSWORD__FILE) (not .Values.env.GF_SECURITY_DISABLE_INITIAL_ADMIN_CREATION) }} + - name: GF_SECURITY_ADMIN_PASSWORD + valueFrom: + secretKeyRef: +- name: {{ .Values.admin.existingSecret | default (include "grafana.fullname" .) }} ++ name: {{ (tpl .Values.admin.existingSecret .) | default (include "grafana.fullname" .) }} + key: {{ .Values.admin.passwordKey | default "admin-password" }} + {{- end }} + {{- if .Values.plugins }} +@@ -358,12 +663,12 @@ + name: {{ .Values.smtp.existingSecret }} + key: {{ .Values.smtp.passwordKey | default "password" }} + {{- end }} +- {{ if .Values.imageRenderer.enabled }} ++ {{- if .Values.imageRenderer.enabled }} + - name: GF_RENDERING_SERVER_URL + value: http://{{ template "grafana.fullname" . }}-image-renderer.{{ template "grafana.namespace" . }}:{{ .Values.imageRenderer.service.port }}/render + - name: GF_RENDERING_CALLBACK_URL +- value: http://{{ template "grafana.fullname" . }}.{{ template "grafana.namespace" . }}:{{ .Values.service.port }}/{{ .Values.imageRenderer.grafanaSubPath }} +- {{ end }} ++ value: {{ .Values.imageRenderer.grafanaProtocol }}://{{ template "grafana.fullname" . }}.{{ template "grafana.namespace" . }}:{{ .Values.service.port }}/{{ .Values.imageRenderer.grafanaSubPath }} ++ {{- end }} + - name: GF_PATHS_DATA + value: {{ (get .Values "grafana.ini").paths.data }} + - name: GF_PATHS_LOGS +@@ -375,13 +680,13 @@ + {{- range $key, $value := .Values.envValueFrom }} + - name: {{ $key | quote }} + valueFrom: +-{{ toYaml $value | indent 10 }} ++{{ tpl (toYaml $value) $ | indent 10 }} + {{- end }} + {{- range $key, $value := .Values.env }} + - name: "{{ tpl $key $ }}" + value: "{{ tpl (print $value) $ }}" + {{- end }} +- {{- if or .Values.envFromSecret (or .Values.envRenderSecret .Values.envFromSecrets) }} ++ {{- if or .Values.envFromSecret (or .Values.envRenderSecret .Values.envFromSecrets) .Values.envFromConfigMaps }} + envFrom: + {{- if .Values.envFromSecret }} + - secretRef: +@@ -393,16 +698,30 @@ + {{- end }} + {{- range .Values.envFromSecrets }} + - secretRef: +- name: {{ .name }} ++ name: {{ tpl .name $ }} + optional: {{ .optional | default false }} + {{- end }} ++ {{- range .Values.envFromConfigMaps }} ++ - configMapRef: ++ name: {{ tpl .name $ }} ++ optional: {{ .optional | default false }} + {{- end }} ++ {{- end }} ++ {{- with .Values.livenessProbe }} + livenessProbe: +-{{ toYaml .Values.livenessProbe | indent 6 }} ++ {{- toYaml . | nindent 6 }} ++ {{- end }} ++ {{- with .Values.readinessProbe }} + readinessProbe: +-{{ toYaml .Values.readinessProbe | indent 6 }} ++ {{- toYaml . | nindent 6 }} ++ {{- end }} ++{{- if .Values.lifecycleHooks }} ++ lifecycle: {{ tpl (.Values.lifecycleHooks | toYaml) . | nindent 6 }} ++{{- end }} ++ {{- with .Values.resources }} + resources: +-{{ toYaml .Values.resources | indent 6 }} ++ {{- toYaml . | nindent 6 }} ++ {{- end }} + {{- with .Values.extraContainers }} + {{ tpl . $ | indent 2 }} + {{- end }} +@@ -410,10 +729,15 @@ + {{- if .Values.nodeSelector }} + {{ toYaml .Values.nodeSelector | indent 2 }} + {{- end }} ++{{- $root := . }} + {{- with .Values.affinity }} + affinity: +-{{ toYaml . | indent 2 }} ++{{ tpl (toYaml .) $root | indent 2 }} + {{- end }} ++{{- with .Values.topologySpreadConstraints }} ++topologySpreadConstraints: ++ {{- toYaml . | nindent 2 }} ++{{- end }} + tolerations: {{ include "linux-node-tolerations" . | nindent 2 }} + {{- if .Values.tolerations }} + {{ toYaml .Values.tolerations | indent 2 }} +@@ -422,10 +746,14 @@ + - name: config + configMap: + name: {{ template "grafana.fullname" . }} ++{{- $root := . }} + {{- range .Values.extraConfigmapMounts }} +- - name: {{ .name }} ++ - name: {{ tpl .name $root }} + configMap: +- name: {{ .configMap }} ++ name: {{ tpl .configMap $root }} ++ {{- if .items }} ++ items: {{ toYaml .items | nindent 6 }} ++ {{- end }} + {{- end }} + {{- if .Values.dashboards }} + {{- range (keys .Values.dashboards | sortAlpha) }} +@@ -457,7 +785,7 @@ + {{- if and .Values.persistence.enabled (eq .Values.persistence.type "pvc") }} + - name: storage + persistentVolumeClaim: +- claimName: {{ .Values.persistence.existingClaim | default (include "grafana.fullname" .) }} ++ claimName: {{ tpl (.Values.persistence.existingClaim | default (include "grafana.fullname" .)) . }} + {{- else if and .Values.persistence.enabled (eq .Values.persistence.type "statefulset") }} + # nothing + {{- else }} +@@ -474,7 +802,12 @@ + {{- end -}} + {{- if .Values.sidecar.dashboards.enabled }} + - name: sc-dashboard-volume ++{{- if .Values.sidecar.dashboards.sizeLimit }} ++ emptyDir: ++ sizeLimit: {{ .Values.sidecar.dashboards.sizeLimit }} ++{{- else }} + emptyDir: {} ++{{- end -}} + {{- if .Values.sidecar.dashboards.SCProvider }} + - name: sc-dashboard-provider + configMap: +@@ -483,18 +816,40 @@ + {{- end }} + {{- if .Values.sidecar.datasources.enabled }} + - name: sc-datasources-volume ++{{- if .Values.sidecar.datasources.sizeLimit }} ++ emptyDir: ++ sizeLimit: {{ .Values.sidecar.datasources.sizeLimit }} ++{{- else }} + emptyDir: {} + {{- end -}} ++{{- end -}} ++{{- if .Values.sidecar.plugins.enabled }} ++ - name: sc-plugins-volume ++{{- if .Values.sidecar.plugins.sizeLimit }} ++ emptyDir: ++ sizeLimit: {{ .Values.sidecar.plugins.sizeLimit }} ++{{- else }} ++ emptyDir: {} ++{{- end -}} ++{{- end -}} + {{- if .Values.sidecar.notifiers.enabled }} + - name: sc-notifiers-volume ++{{- if .Values.sidecar.notifiers.sizeLimit }} ++ emptyDir: ++ sizeLimit: {{ .Values.sidecar.notifiers.sizeLimit }} ++{{- else }} + emptyDir: {} + {{- end -}} ++{{- end -}} + {{- range .Values.extraSecretMounts }} + {{- if .secretName }} + - name: {{ .name }} + secret: + secretName: {{ .secretName }} + defaultMode: {{ .defaultMode }} ++ {{- if .items }} ++ items: {{ toYaml .items | nindent 6 }} ++ {{- end }} + {{- else if .projected }} + - name: {{ .name }} + projected: {{- toYaml .projected | nindent 6 }} +@@ -511,6 +866,10 @@ + {{- else if .hostPath }} + hostPath: + path: {{ .hostPath }} ++ {{- else if .csi }} ++ csi: ++ data: ++ {{ toYaml .data | nindent 6 }} + {{- else }} + emptyDir: {} + {{- end }} +@@ -520,6 +879,6 @@ + emptyDir: {} + {{- end -}} + {{- if .Values.extraContainerVolumes }} +-{{ toYaml .Values.extraContainerVolumes | indent 2 }} ++{{ tpl (toYaml .Values.extraContainerVolumes) . | indent 2 }} + {{- end }} + {{- end }} diff --git a/packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/templates/clusterrole.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/templates/clusterrole.yaml.patch new file mode 100644 index 00000000..77d4a40d --- /dev/null +++ b/packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/templates/clusterrole.yaml.patch @@ -0,0 +1,14 @@ +--- charts-original/charts/grafana/templates/clusterrole.yaml ++++ charts/charts/grafana/templates/clusterrole.yaml +@@ -9,9 +9,9 @@ + {{ toYaml . | indent 4 }} + {{- end }} + name: {{ template "grafana.fullname" . }}-clusterrole +-{{- if or .Values.sidecar.dashboards.enabled (or .Values.sidecar.datasources.enabled .Values.rbac.extraClusterRoleRules) }} ++{{- if or .Values.sidecar.dashboards.enabled (or .Values.rbac.extraClusterRoleRules (or .Values.sidecar.datasources.enabled .Values.sidecar.plugins.enabled)) }} + rules: +-{{- if or .Values.sidecar.dashboards.enabled .Values.sidecar.datasources.enabled }} ++{{- if or .Values.sidecar.dashboards.enabled (or .Values.sidecar.datasources.enabled .Values.sidecar.plugins.enabled) }} + - apiGroups: [""] # "" indicates the core API group + resources: ["configmaps", "secrets"] + verbs: ["get", "watch", "list"] diff --git a/packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/templates/configmap.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/templates/configmap.yaml.patch new file mode 100644 index 00000000..9de4c5de --- /dev/null +++ b/packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/templates/configmap.yaml.patch @@ -0,0 +1,87 @@ +--- charts-original/charts/grafana/templates/configmap.yaml ++++ charts/charts/grafana/templates/configmap.yaml +@@ -1,3 +1,4 @@ ++{{- if .Values.createConfigmap }} + apiVersion: v1 + kind: ConfigMap + metadata: +@@ -14,7 +15,19 @@ + plugins: {{ join "," .Values.plugins }} + {{- end }} + grafana.ini: | ++{{- range $elem, $elemVal := index .Values "grafana.ini" 100644 ++ {{- if not (kindIs "map" $elemVal) }} ++ {{- if kindIs "invalid" $elemVal }} ++ {{ $elem }} = ++ {{- else if kindIs "string" $elemVal }} ++ {{ $elem }} = {{ tpl $elemVal $ }} ++ {{- else }} ++ {{ $elem }} = {{ $elemVal }} ++ {{- end }} ++ {{- end }} ++{{- end }} + {{- range $key, $value := index .Values "grafana.ini" }} ++ {{- if kindIs "map" $value }} + [{{ $key }}] + {{- range $elem, $elemVal := $value }} + {{- if kindIs "invalid" $elemVal }} +@@ -25,6 +38,7 @@ + {{ $elem }} = {{ $elemVal }} + {{- end }} + {{- end }} ++ {{- end }} + {{- end }} + + {{- if .Values.datasources }} +@@ -42,6 +56,14 @@ + {{- end -}} + {{- end -}} + ++{{- if .Values.alerting }} ++{{ $root := . }} ++ {{- range $key, $value := .Values.alerting }} ++ {{ $key }}: | ++{{ tpl (toYaml $value | indent 4) $root }} ++ {{- end -}} ++{{- end -}} ++ + {{- if .Values.dashboardProviders }} + {{- range $key, $value := .Values.dashboardProviders }} + {{ $key }}: | +@@ -60,7 +82,7 @@ + {{- end }} + {{- end }} + {{- end }} +- ++ {{ $dashboardProviders := .Values.dashboardProviders }} + {{- range $provider, $dashboards := .Values.dashboards }} + {{- range $key, $value := $dashboards }} + {{- if (or (hasKey $value "gnetId") (hasKey $value "url")) }} +@@ -72,11 +94,24 @@ + {{- if $value.token }} + -H "Authorization: token {{ $value.token }}" \ + {{- end }} ++ {{- if $value.bearerToken }} ++ -H "Authorization: Bearer {{ $value.bearerToken }}" \ ++ {{- end }} ++ {{- if $value.gitlabToken }} ++ -H "PRIVATE-TOKEN: {{ $value.gitlabToken }}" \ ++ {{- end }} + -H "Content-Type: application/json;charset=UTF-8" \ + {{ end }} +- {{- if $value.url -}}"{{ $value.url }}"{{- else -}}"https://grafana.com/api/dashboards/{{ $value.gnetId }}/revisions/{{- if $value.revision -}}{{ $value.revision }}{{- else -}}1{{- end -}}/download"{{- end -}}{{ if $value.datasource }} | sed '/-- .* --/! s/"datasource":.*,/"datasource": "{{ $value.datasource }}",/g'{{ end }}{{- if $value.b64content -}} | base64 -d {{- end -}} \ +- > "/var/lib/grafana/dashboards/{{ $provider }}/{{ $key }}.json" ++ {{- $dpPath := "" -}} ++ {{- range $kd := (index $dashboardProviders "dashboardproviders.yaml").providers 100644 ++ {{- if eq $kd.name $provider -}} ++ {{- $dpPath = $kd.options.path -}} + {{- end -}} +- {{- end }} ++ {{- end -}} ++ {{- if $value.url -}}"{{ $value.url }}"{{- else -}}"https://grafana.com/api/dashboards/{{ $value.gnetId }}/revisions/{{- if $value.revision -}}{{ $value.revision }}{{- else -}}1{{- end -}}/download"{{- end -}}{{ if $value.datasource }} | sed '/-- .* --/! s/"datasource":.*,/"datasource": "{{ $value.datasource }}",/g'{{ end }}{{- if $value.b64content -}} | base64 -d {{- end -}} \ ++ > "{{- if $dpPath -}}{{ $dpPath }}{{- else -}}/var/lib/grafana/dashboards/{{ $provider }}{{- end -}}/{{ $key }}.json" ++ {{- end }} ++ {{- end -}} + {{- end }} ++{{- end }} + {{- end }} diff --git a/packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/templates/deployment.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/templates/deployment.yaml.patch new file mode 100644 index 00000000..a752443a --- /dev/null +++ b/packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/templates/deployment.yaml.patch @@ -0,0 +1,24 @@ +--- charts-original/charts/grafana/templates/deployment.yaml ++++ charts/charts/grafana/templates/deployment.yaml +@@ -1,4 +1,4 @@ +-{{ if (or (not .Values.persistence.enabled) (eq .Values.persistence.type "pvc")) }} ++{{ if (and (not .Values.useStatefulSet) (or (not .Values.persistence.enabled) (eq .Values.persistence.type "pvc"))) }} + apiVersion: apps/v1 + kind: Deployment + metadata: +@@ -14,7 +14,7 @@ + {{ toYaml . | indent 4 }} + {{- end }} + spec: +- {{- if not .Values.autoscaling.enabled }} ++ {{- if and (not .Values.autoscaling.enabled) (.Values.replicas) }} + replicas: {{ .Values.replicas }} + {{- end }} + revisionHistoryLimit: {{ .Values.revisionHistoryLimit }} +@@ -46,5 +46,5 @@ + {{ toYaml . | indent 8 }} + {{- end }} + spec: +- {{- include "grafana.pod" . | nindent 6 }} ++ {{- include "grafana.pod" . | indent 6 }} + {{- end }} diff --git a/packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/templates/headless-service.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/templates/headless-service.yaml.patch new file mode 100644 index 00000000..6d7f4fba --- /dev/null +++ b/packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/templates/headless-service.yaml.patch @@ -0,0 +1,17 @@ +--- charts-original/charts/grafana/templates/headless-service.yaml ++++ charts/charts/grafana/templates/headless-service.yaml +@@ -1,4 +1,4 @@ +-{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) (eq .Values.persistence.type "statefulset")}} ++{{- if or .Values.headlessService (and .Values.persistence.enabled (not .Values.persistence.existingClaim) (eq .Values.persistence.type "statefulset"))}} + apiVersion: v1 + kind: Service + metadata: +@@ -15,4 +15,8 @@ + selector: + {{- include "grafana.selectorLabels" . | nindent 4 }} + type: ClusterIP ++ ports: ++ - protocol: TCP ++ port: 3000 ++ targetPort: {{ .Values.service.targetPort }} + {{- end }} diff --git a/packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/templates/hpa.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/templates/hpa.yaml.patch new file mode 100644 index 00000000..7e277fa9 --- /dev/null +++ b/packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/templates/hpa.yaml.patch @@ -0,0 +1,10 @@ +--- charts-original/charts/grafana/templates/hpa.yaml ++++ charts/charts/grafana/templates/hpa.yaml +@@ -3,6 +3,7 @@ + kind: HorizontalPodAutoscaler + metadata: + name: {{ template "grafana.fullname" . }} ++ namespace: {{ template "grafana.namespace" . }} + labels: + app.kubernetes.io/name: {{ template "grafana.name" . }} + helm.sh/chart: {{ template "grafana.chart" . }} diff --git a/packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/templates/image-renderer-deployment.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/templates/image-renderer-deployment.yaml.patch new file mode 100644 index 00000000..2a546188 --- /dev/null +++ b/packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/templates/image-renderer-deployment.yaml.patch @@ -0,0 +1,43 @@ +--- charts-original/charts/grafana/templates/image-renderer-deployment.yaml ++++ charts/charts/grafana/templates/image-renderer-deployment.yaml +@@ -58,8 +58,9 @@ + {{- end }} + {{- if .Values.imageRenderer.image.pullSecrets }} + imagePullSecrets: ++ {{- $root := . }} + {{- range .Values.imageRenderer.image.pullSecrets }} +- - name: {{ . }} ++ - name: {{ tpl . $root }} + {{- end}} + {{- end }} + containers: +@@ -78,7 +79,7 @@ + {{- end}} + ports: + - name: {{ .Values.imageRenderer.service.portName }} +- containerPort: {{ .Values.imageRenderer.service.port }} ++ containerPort: {{ .Values.imageRenderer.service.targetPort }} + protocol: TCP + livenessProbe: + httpGet: +@@ -86,7 +87,7 @@ + port: {{ .Values.imageRenderer.service.portName }} + env: + - name: HTTP_PORT +- value: {{ .Values.imageRenderer.service.port | quote }} ++ value: {{ .Values.imageRenderer.service.targetPort | quote }} + {{- range $key, $value := .Values.imageRenderer.env }} + - name: {{ $key | quote }} + value: {{ $value | quote }} +@@ -107,9 +108,10 @@ + {{- if .Values.imageRenderer.nodeSelector }} + {{ toYaml . | indent 8 }} + {{- end }} ++ {{- $root := . }} + {{- with .Values.imageRenderer.affinity }} + affinity: +-{{ toYaml . | indent 8 }} ++{{ tpl (toYaml .) $root | indent 8 }} + {{- end }} + tolerations: {{ include "linux-node-tolerations" . | nindent 8 }} + {{- if .Values.imageRenderer.tolerations }} diff --git a/packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/templates/image-renderer-network-policy.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/templates/image-renderer-network-policy.yaml.patch new file mode 100644 index 00000000..52d0102c --- /dev/null +++ b/packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/templates/image-renderer-network-policy.yaml.patch @@ -0,0 +1,23 @@ +--- charts-original/charts/grafana/templates/image-renderer-network-policy.yaml ++++ charts/charts/grafana/templates/image-renderer-network-policy.yaml +@@ -19,7 +19,7 @@ + - Ingress + ingress: + - ports: +- - port: {{ .Values.imageRenderer.service.port }} ++ - port: {{ .Values.imageRenderer.service.targetPort }} + protocol: TCP + from: + - namespaceSelector: +@@ -64,10 +64,7 @@ + - port: {{ .Values.service.port }} + protocol: TCP + to: +- - namespaceSelector: +- matchLabels: +- name: {{ template "grafana.namespace" . }} +- podSelector: ++ - podSelector: + matchLabels: + {{- include "grafana.selectorLabels" . | nindent 14 }} + {{- if .Values.podLabels }} diff --git a/packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/templates/image-renderer-service.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/templates/image-renderer-service.yaml.patch new file mode 100644 index 00000000..3785ebfc --- /dev/null +++ b/packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/templates/image-renderer-service.yaml.patch @@ -0,0 +1,12 @@ +--- charts-original/charts/grafana/templates/image-renderer-service.yaml ++++ charts/charts/grafana/templates/image-renderer-service.yaml +@@ -24,6 +24,9 @@ + port: {{ .Values.imageRenderer.service.port }} + protocol: TCP + targetPort: {{ .Values.imageRenderer.service.targetPort }} ++ {{- if .Values.imageRenderer.appProtocol }} ++ appProtocol: {{ .Values.imageRenderer.appProtocol }} ++ {{- end }} + selector: + {{- include "grafana.imageRenderer.selectorLabels" . | nindent 4 }} + {{ end }} diff --git a/packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/templates/nginx-config.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/templates/nginx-config.yaml.patch new file mode 100644 index 00000000..590da3a2 --- /dev/null +++ b/packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/templates/nginx-config.yaml.patch @@ -0,0 +1,40 @@ +--- charts-original/charts/grafana/templates/nginx-config.yaml ++++ charts/charts/grafana/templates/nginx-config.yaml +@@ -25,6 +25,11 @@ + proxy_buffering off; + proxy_cache_path /var/cache/nginx/cache levels=1:2 keys_zone=my_zone:100m inactive=1d max_size=10g; + ++ map $http_upgrade $connection_upgrade { ++ default upgrade; ++ '' close; ++ } ++ + server { + listen 8080; + access_log off; +@@ -50,6 +55,14 @@ + sub_filter '"url":"/d' '"url":"d'; + } + ++ location /api/live/ { ++ proxy_http_version 1.1; ++ proxy_set_header Upgrade $http_upgrade; ++ proxy_set_header Connection $connection_upgrade; ++ proxy_set_header Host $http_host; ++ proxy_pass http://localhost:3000; ++ } ++ + location / { + proxy_cache my_zone; + proxy_cache_valid 200 302 1d; +@@ -61,9 +74,8 @@ + + proxy_pass http://localhost:3000/; + +- sub_filter_types text/html; + sub_filter_once off; +- sub_filter '"appSubUrl":""' '"appSubUrl":"."'; ++ sub_filter '"appSubUrl":""' '"appSubUrl":"/k8s/clusters/{{ .Values.global.cattle.clusterId }}/api/v1/namespaces/{{ template "grafana.namespace" . }}/services/http:{{ template "grafana.fullname" . }}:{{ .Values.service.port }}/proxy"'; + sub_filter '"url":"/' '"url":"./'; + sub_filter ':"/avatar/' ':"avatar/'; + diff --git a/packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/templates/poddisruptionbudget.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/templates/poddisruptionbudget.yaml.patch new file mode 100644 index 00000000..b46187cc --- /dev/null +++ b/packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/templates/poddisruptionbudget.yaml.patch @@ -0,0 +1,9 @@ +--- charts-original/charts/grafana/templates/poddisruptionbudget.yaml ++++ charts/charts/grafana/templates/poddisruptionbudget.yaml +@@ -1,5 +1,5 @@ + {{- if .Values.podDisruptionBudget }} +-apiVersion: policy/v1beta1 ++apiVersion: {{ include "grafana.podDisruptionBudget.apiVersion" . }} + kind: PodDisruptionBudget + metadata: + name: {{ template "grafana.fullname" . }} diff --git a/packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/templates/podsecuritypolicy.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/templates/podsecuritypolicy.yaml.patch new file mode 100644 index 00000000..00bfb90e --- /dev/null +++ b/packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/templates/podsecuritypolicy.yaml.patch @@ -0,0 +1,37 @@ +--- charts-original/charts/grafana/templates/podsecuritypolicy.yaml ++++ charts/charts/grafana/templates/podsecuritypolicy.yaml +@@ -1,4 +1,5 @@ + {{- if .Values.rbac.pspEnabled }} ++{{- if .Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy" }} + apiVersion: policy/v1beta1 + kind: PodSecurityPolicy + metadata: +@@ -12,20 +13,8 @@ + privileged: false + allowPrivilegeEscalation: false + requiredDropCapabilities: +- # The list comes from K8s' pod security standards, with only CHOWN left +- # ref: https://kubernetes.io/docs/concepts/security/pod-security-standards/ +- - AUDIT_WRITE +- - DAC_OVERRIDE +- - FOWNER +- - FSETID +- - KILL +- - MKNOD +- - NET_BIND_SERVICE +- - SETFCAP +- - SETGID +- - SETPCAP +- - SETUID +- - SYS_CHROOT ++ # Default set from Docker, with DAC_OVERRIDE and CHOWN ++ - ALL + volumes: + - 'configMap' + - 'emptyDir' +@@ -54,4 +43,5 @@ + - min: 1 + max: 65535 + readOnlyRootFilesystem: false ++{{- end }} + {{- end }} diff --git a/packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/templates/role.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/templates/role.yaml.patch new file mode 100644 index 00000000..e1901297 --- /dev/null +++ b/packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/templates/role.yaml.patch @@ -0,0 +1,20 @@ +--- charts-original/charts/grafana/templates/role.yaml ++++ charts/charts/grafana/templates/role.yaml +@@ -10,7 +10,7 @@ + annotations: + {{ toYaml . | indent 4 }} + {{- end }} +-{{- if or .Values.rbac.pspEnabled (and .Values.rbac.namespaced (or .Values.sidecar.dashboards.enabled (or .Values.sidecar.datasources.enabled .Values.rbac.extraRoleRules))) }} ++{{- if or .Values.rbac.pspEnabled (and .Values.rbac.namespaced (or .Values.sidecar.dashboards.enabled (or .Values.sidecar.datasources.enabled (or .Values.sidecar.plugins.enabled .Values.rbac.extraRoleRules)))) }} + rules: + {{- if .Values.rbac.pspEnabled }} + - apiGroups: ['extensions'] +@@ -18,7 +18,7 @@ + verbs: ['use'] + resourceNames: [{{ template "grafana.fullname" . }}] + {{- end }} +-{{- if and .Values.rbac.namespaced (or .Values.sidecar.dashboards.enabled .Values.sidecar.datasources.enabled) }} ++{{- if and .Values.rbac.namespaced (or .Values.sidecar.dashboards.enabled (or .Values.sidecar.datasources.enabled .Values.sidecar.plugins.enabled)) }} + - apiGroups: [""] # "" indicates the core API group + resources: ["configmaps", "secrets"] + verbs: ["get", "watch", "list"] diff --git a/packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/templates/secret.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/templates/secret.yaml.patch new file mode 100644 index 00000000..8f40184e --- /dev/null +++ b/packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/templates/secret.yaml.patch @@ -0,0 +1,17 @@ +--- charts-original/charts/grafana/templates/secret.yaml ++++ charts/charts/grafana/templates/secret.yaml +@@ -1,4 +1,4 @@ +-{{- if and (or (and (not .Values.admin.existingSecret) (not .Values.env.GF_SECURITY_ADMIN_PASSWORD__FILE) (not .Values.env.GF_SECURITY_ADMIN_PASSWORD)) (and .Values.ldap.enabled (not .Values.ldap.existingSecret))) (not .Values.env.GF_SECURITY_DISABLE_INITIAL_ADMIN_CREATION) }} ++{{- if or (and (not .Values.admin.existingSecret) (not .Values.env.GF_SECURITY_ADMIN_PASSWORD__FILE) (not .Values.env.GF_SECURITY_ADMIN_PASSWORD) (not .Values.env.GF_SECURITY_DISABLE_INITIAL_ADMIN_CREATION)) (and .Values.ldap.enabled (not .Values.ldap.existingSecret)) }} + apiVersion: v1 + kind: Secret + metadata: +@@ -12,7 +12,7 @@ + {{- end }} + type: Opaque + data: +- {{- if and (not .Values.admin.existingSecret) (not .Values.env.GF_SECURITY_ADMIN_PASSWORD__FILE) (not .Values.env.GF_SECURITY_ADMIN_PASSWORD) }} ++ {{- if and (not .Values.env.GF_SECURITY_DISABLE_INITIAL_ADMIN_CREATION) (not .Values.admin.existingSecret) (not .Values.env.GF_SECURITY_ADMIN_PASSWORD__FILE) (not .Values.env.GF_SECURITY_ADMIN_PASSWORD) }} + admin-user: {{ .Values.adminUser | b64enc | quote }} + {{- if .Values.adminPassword }} + admin-password: {{ .Values.adminPassword | b64enc | quote }} diff --git a/packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/templates/service.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/templates/service.yaml.patch new file mode 100644 index 00000000..a30cb542 --- /dev/null +++ b/packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/templates/service.yaml.patch @@ -0,0 +1,35 @@ +--- charts-original/charts/grafana/templates/service.yaml ++++ charts/charts/grafana/templates/service.yaml +@@ -9,9 +9,10 @@ + {{- if .Values.service.labels }} + {{ toYaml .Values.service.labels | indent 4 }} + {{- end }} ++{{- $root := . }} + {{- with .Values.service.annotations }} + annotations: +-{{ toYaml . | indent 4 }} ++{{ tpl (toYaml . | indent 4) $root }} + {{- end }} + spec: + {{- if (or (eq .Values.service.type "ClusterIP") (empty .Values.service.type)) }} +@@ -40,12 +41,15 @@ + port: {{ .Values.service.port }} + protocol: TCP + targetPort: {{ .Values.service.targetPort }} +-{{ if (and (eq .Values.service.type "NodePort") (not (empty .Values.service.nodePort))) }} ++ {{- if .Values.service.appProtocol }} ++ appProtocol: {{ .Values.service.appProtocol }} ++ {{- end }} ++ {{- if (and (eq .Values.service.type "NodePort") (not (empty .Values.service.nodePort))) }} + nodePort: {{.Values.service.nodePort}} +-{{ end }} +- {{- if .Values.extraExposePorts }} +- {{- tpl (toYaml .Values.extraExposePorts) . | indent 4 }} +- {{- end }} ++ {{ end }} ++ {{- if .Values.extraExposePorts }} ++ {{- tpl (toYaml .Values.extraExposePorts) . | nindent 4 }} ++ {{- end }} + selector: + {{- include "grafana.selectorLabels" . | nindent 4 }} + {{ end }} diff --git a/packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/templates/serviceaccount.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/templates/serviceaccount.yaml.patch new file mode 100644 index 00000000..1755a358 --- /dev/null +++ b/packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/templates/serviceaccount.yaml.patch @@ -0,0 +1,14 @@ +--- charts-original/charts/grafana/templates/serviceaccount.yaml ++++ charts/charts/grafana/templates/serviceaccount.yaml +@@ -4,9 +4,10 @@ + metadata: + labels: + {{- include "grafana.labels" . | nindent 4 }} ++{{- $root := . }} + {{- with .Values.serviceAccount.annotations }} + annotations: +-{{ toYaml . | indent 4 }} ++{{ tpl (toYaml . | indent 4) $root }} + {{- end }} + name: {{ template "grafana.serviceAccountName" . }} + namespace: {{ template "grafana.namespace" . }} diff --git a/packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/templates/servicemonitor.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/templates/servicemonitor.yaml.patch new file mode 100644 index 00000000..4b20ff37 --- /dev/null +++ b/packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/templates/servicemonitor.yaml.patch @@ -0,0 +1,39 @@ +--- charts-original/charts/grafana/templates/servicemonitor.yaml ++++ charts/charts/grafana/templates/servicemonitor.yaml +@@ -5,7 +5,9 @@ + metadata: + name: {{ template "grafana.fullname" . }} + {{- if .Values.serviceMonitor.namespace }} +- namespace: {{ .Values.serviceMonitor.namespace }} ++ namespace: {{ tpl .Values.serviceMonitor.namespace . }} ++ {{- else }} ++ namespace: {{ template "grafana.namespace" . }} + {{- end }} + labels: + {{- include "grafana.labels" . | nindent 4 }} +@@ -14,12 +16,14 @@ + {{- end }} + spec: + endpoints: +- - interval: {{ .Values.serviceMonitor.interval }} +- {{- if .Values.serviceMonitor.scrapeTimeout }} +- scrapeTimeout: {{ .Values.serviceMonitor.scrapeTimeout }} ++ - port: {{ .Values.service.portName }} ++ {{- with .Values.serviceMonitor.interval }} ++ interval: {{ . }} + {{- end }} ++ {{- with .Values.serviceMonitor.scrapeTimeout }} ++ scrapeTimeout: {{ . }} ++ {{- end }} + honorLabels: true +- port: {{ .Values.service.portName }} + path: {{ .Values.serviceMonitor.path }} + scheme: {{ .Values.serviceMonitor.scheme }} + {{- if .Values.serviceMonitor.tlsConfig }} +@@ -36,5 +40,5 @@ + {{- include "grafana.selectorLabels" . | nindent 8 }} + namespaceSelector: + matchNames: +- - {{ .Release.Namespace }} ++ - {{ template "grafana.namespace" . }} + {{- end }} diff --git a/packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/templates/statefulset.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/templates/statefulset.yaml.patch new file mode 100644 index 00000000..c535bf59 --- /dev/null +++ b/packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/templates/statefulset.yaml.patch @@ -0,0 +1,22 @@ +--- charts-original/charts/grafana/templates/statefulset.yaml ++++ charts/charts/grafana/templates/statefulset.yaml +@@ -1,4 +1,4 @@ +-{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) (eq .Values.persistence.type "statefulset")}} ++{{- if (or (.Values.useStatefulSet) (and .Values.persistence.enabled (not .Values.persistence.existingClaim) (eq .Values.persistence.type "statefulset")))}} + apiVersion: apps/v1 + kind: StatefulSet + metadata: +@@ -35,6 +35,7 @@ + {{- end }} + spec: + {{- include "grafana.pod" . | nindent 6 }} ++ {{- if .Values.persistence.enabled}} + volumeClaimTemplates: + - metadata: + name: storage +@@ -51,4 +52,5 @@ + matchLabels: + {{ toYaml . | indent 10 }} + {{- end }} ++ {{- end }} + {{- end }} diff --git a/packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/templates/tests/test.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/templates/tests/test.yaml.patch new file mode 100644 index 00000000..9dc8cf6b --- /dev/null +++ b/packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/templates/tests/test.yaml.patch @@ -0,0 +1,45 @@ +--- charts-original/charts/grafana/templates/tests/test.yaml ++++ charts/charts/grafana/templates/tests/test.yaml +@@ -7,30 +7,33 @@ + {{- include "grafana.labels" . | nindent 4 }} + annotations: + "helm.sh/hook": test-success ++ "helm.sh/hook-delete-policy": "before-hook-creation,hook-succeeded" + namespace: {{ template "grafana.namespace" . }} + spec: + serviceAccountName: {{ template "grafana.serviceAccountNameTest" . }} + {{- if .Values.testFramework.securityContext }} + securityContext: {{ toYaml .Values.testFramework.securityContext | nindent 4 }} + {{- end }} ++ {{- $root := . }} + {{- if .Values.image.pullSecrets }} + imagePullSecrets: + {{- range .Values.image.pullSecrets }} +- - name: {{ . }} ++ - name: {{ tpl . $root }} + {{- end}} + {{- end }} +- {{- with .Values.nodeSelector }} +- nodeSelector: +-{{ toYaml . | indent 4 }} ++ nodeSelector: {{ include "linux-node-selector" . | nindent 4 }} ++ {{- if .Values.nodeSelector }} ++{{ toYaml .Values.nodeSelector | indent 4 }} + {{- end }} ++ {{- $root := . }} + {{- with .Values.affinity }} + affinity: +-{{ toYaml . | indent 4 }} ++{{ tpl (toYaml .) $root | indent 4 }} + {{- end }} +- {{- with .Values.tolerations }} +- tolerations: +-{{ toYaml . | indent 4 }} +- {{- end }} ++ tolerations: {{ include "linux-node-tolerations" . | nindent 4 }} ++{{- if .Values.tolerations }} ++{{ toYaml .Values.tolerations | indent 4 }} ++{{- end }} + containers: + - name: {{ .Release.Name }}-test + image: "{{ template "system_default_registry" . }}{{ .Values.testFramework.image}}:{{ .Values.testFramework.tag }}" diff --git a/packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/values.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/values.yaml.patch index 7a59ac71..ceb7863e 100644 --- a/packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/values.yaml.patch +++ b/packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/values.yaml.patch @@ -8,16 +8,323 @@ rbac: create: true -@@ -632,7 +633,7 @@ +@@ -31,12 +32,16 @@ + create: true + name: + nameTest: ++## Service account annotations. Can be templated. + # annotations: + # eks.amazonaws.com/role-arn: arn:aws:iam::123456789000:role/iam-role-name-here + autoMount: true + + replicas: 1 + ++## Create a headless service for the deployment ++headlessService: false ++ + ## Create HorizontalPodAutoscaler object for deployment type + # + autoscaling: +@@ -84,13 +89,15 @@ + + image: + repository: rancher/mirrored-grafana-grafana +- tag: 7.5.11 ++ # Overrides the Grafana image tag whose default is the chart appVersion ++ tag: 9.1.5 + sha: "" + pullPolicy: IfNotPresent + + ## Optionally specify an array of imagePullSecrets. + ## Secrets must be manually created in the namespace. + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ ++ ## Can be templated. + ## + # pullSecrets: + # - myRegistrKeySecretName +@@ -98,7 +105,7 @@ + testFramework: + enabled: false + image: "rancher/mirrored-bats-bats" +- tag: "v1.1.0" ++ tag: "v1.4.1" + imagePullPolicy: IfNotPresent + securityContext: + runAsNonRoot: true +@@ -113,6 +120,11 @@ + containerSecurityContext: + {} + ++# Enable creating the grafana configmap ++createConfigmap: true ++ ++# Extra configmaps to mount in grafana pods ++# Values are templated. + extraConfigmapMounts: [] + # - name: certs-configmap + # mountPath: /etc/grafana/ssl/ +@@ -134,7 +146,7 @@ + + downloadDashboardsImage: + repository: rancher/mirrored-curlimages-curl +- tag: 7.77.0 ++ tag: 7.85.0 + sha: "" + pullPolicy: IfNotPresent + +@@ -142,6 +154,7 @@ + env: {} + envFromSecret: "" + resources: {} ++ securityContext: {} + + ## Pod Annotations + # podAnnotations: {} +@@ -164,9 +177,12 @@ + port: 80 + targetPort: 3000 + # targetPort: 4181 To be used with a proxy extraContainer ++ ## Service annotations. Can be templated. + annotations: {} + labels: {} + portName: service ++ # Adds the appProtocol field to the service. This allows to work with istio protocol selection. Ex: "http" or "tcp" ++ appProtocol: "" + + serviceMonitor: + ## If true, a ServiceMonitor CRD is created for a prometheus operator +@@ -250,11 +266,19 @@ + ## + tolerations: [] + +-## Affinity for pod assignment ++## Affinity for pod assignment (evaluated as template) + ## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity + ## + affinity: {} + ++## Topology Spread Constraints ++## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/ ++## ++topologySpreadConstraints: [] ++ ++## Additional init containers (evaluated as template) ++## ref: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ ++## + extraInitContainers: [] + + ## Enable an Specify container in extraContainers. This is meant to allow adding an authentication proxy to a grafana pod +@@ -297,7 +321,9 @@ + finalizers: + - kubernetes.io/pvc-protection + # selectorLabels: {} ++ ## Sub-directory of the PV to mount. Can be templated. + # subPath: "" ++ ## Name of an existing PVC. Can be templated. + # existingClaim: + + ## If persistence is not enabled, this allows to mount the +@@ -343,6 +369,7 @@ + + # Use an existing secret for the admin user. + admin: ++ ## Name of the secret. Can be templated. + existingSecret: "" + userKey: admin-user + passwordKey: admin-password +@@ -383,8 +410,8 @@ + + env: {} + +-## "valueFrom" environment variable references that will be added to deployment pods +-## ref: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.17/#envvarsource-v1-core ++## "valueFrom" environment variable references that will be added to deployment pods. Name is templated. ++## ref: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.19/#envvarsource-v1-core + ## Renders in container spec as: + ## env: + ## ... +@@ -392,6 +419,10 @@ + ## valueFrom: + ## + envValueFrom: {} ++ # ENV_NAME: ++ # configMapKeyRef: ++ # name: configmap-name ++ # key: value_key + + ## The name of a secret in the same kubernetes namespace which contain values to be added to the environment + ## This can be useful for auth tokens, etc. Value is templated. +@@ -403,10 +434,19 @@ + + ## The names of secrets in the same kubernetes namespace which contain values to be added to the environment + ## Each entry should contain a name key, and can optionally specify whether the secret must be defined with an optional key. ++## Name is templated. + envFromSecrets: [] + ## - name: secret-name + ## optional: true + ++## The names of conifgmaps in the same kubernetes namespace which contain values to be added to the environment ++## Each entry should contain a name key, and can optionally specify whether the configmap must be defined with an optional key. ++## Name is templated. ++## ref: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#configmapenvsource-v1-core ++envFromConfigMaps: [] ++## - name: configmap-name ++## optional: true ++ + # Inject Kubernetes services as environment variables. + # See https://kubernetes.io/docs/concepts/services-networking/connect-applications-service/#environment-variables + enableServiceLinks: true +@@ -455,7 +495,20 @@ + # mountPath: /mnt/volume1 + # readOnly: true + # hostPath: /usr/shared/ ++ # - name: grafana-secrets ++ # csi: true ++ # data: ++ # driver: secrets-store.csi.k8s.io ++ # readOnly: true ++ # volumeAttributes: ++ # secretProviderClass: "grafana-env-spc" + ++## Container Lifecycle Hooks. Execute a specific bash command or make an HTTP request ++lifecycleHooks: {} ++ # postStart: ++ # exec: ++ # command: [] ++ + ## Pass the plugins you want installed as a list. + ## + plugins: [] +@@ -483,6 +536,71 @@ + # authType: default + # defaultRegion: us-east-1 + ++## Configure grafana alerting (can be templated) ++## ref: http://docs.grafana.org/administration/provisioning/#alerting ++## ++alerting: {} ++ # rules.yaml: ++ # apiVersion: 1 ++ # groups: ++ # - orgId: 1 ++ # name: '{{ .Chart.Name }}_my_rule_group' ++ # folder: my_first_folder ++ # interval: 60s ++ # rules: ++ # - uid: my_id_1 ++ # title: my_first_rule ++ # condition: A ++ # data: ++ # - refId: A ++ # datasourceUid: '-100' ++ # model: ++ # conditions: ++ # - evaluator: ++ # params: ++ # - 3 ++ # type: gt ++ # operator: ++ # type: and ++ # query: ++ # params: ++ # - A ++ # reducer: ++ # type: last ++ # type: query ++ # datasource: ++ # type: __expr__ ++ # uid: '-100' ++ # expression: 1==0 ++ # intervalMs: 1000 ++ # maxDataPoints: 43200 ++ # refId: A ++ # type: math ++ # dashboardUid: my_dashboard ++ # panelId: 123 ++ # noDataState: Alerting ++ # for: 60s ++ # annotations: ++ # some_key: some_value ++ # labels: ++ # team: sre_team_1 ++ # contactpoints.yaml: ++ # apiVersion: 1 ++ # contactPoints: ++ # - orgId: 1 ++ # name: cp_1 ++ # receivers: ++ # - uid: first_uid ++ # type: pagerduty ++ # settings: ++ # integrationKey: XXX ++ # severity: critical ++ # class: ping failure ++ # component: Grafana ++ # group: app-stack ++ # summary: | ++ # {{ `{{ template "default.message" . }}` }} ++ + ## Configure notifiers + ## ref: http://docs.grafana.org/administration/provisioning/#alert-notification-channels + ## +@@ -543,6 +661,12 @@ + # url: https://example.com/repository/test-b64.json + # token: '' + # b64content: true ++ # local-dashboard-gitlab: ++ # url: https://example.com/repository/test-gitlab.json ++ # gitlabToken: '' ++ # local-dashboard-bitbucket: ++ # url: https://example.com/repository/test-bitbucket.json ++ # bearerToken: '' + + ## Reference to external ConfigMap per provider. Use provider name as key and ConfigMap name as value. + ## A provider dashboards must be defined either by external ConfigMaps or in values.yaml, not in both. +@@ -571,6 +695,8 @@ + mode: console + grafana_net: + url: https://grafana.net ++ server: ++ domain: "{{ if (and .Values.ingress.enabled .Values.ingress.hosts) }}{{ .Values.ingress.hosts | first }}{{ end }}" + ## grafana Authentication can be enabled with the following values on grafana.ini + # server: + # The full public facing url you use in browser, used for redirects and emails +@@ -632,7 +758,7 @@ sidecar: image: repository: rancher/mirrored-kiwigrid-k8s-sidecar - tag: 1.12.3 -+ tag: 1.15.9 ++ tag: 1.19.2 sha: "" imagePullPolicy: IfNotPresent resources: {} -@@ -656,10 +657,6 @@ +@@ -642,29 +768,50 @@ + # requests: + # cpu: 50m + # memory: 50Mi ++ securityContext: {} + # skipTlsVerify Set to true to skip tls verification for kube api calls + # skipTlsVerify: true + enableUniqueFilenames: false ++ readinessProbe: {} ++ livenessProbe: {} ++ # Log level default for all sidecars. Can be one of: DEBUG, INFO, WARN, ERROR, CRITICAL. Defaults to INFO ++ # logLevel: INFO + dashboards: + enabled: false ++ # Additional environment variables for the dashboards sidecar ++ env: {} ++ # Do not reprocess already processed unchanged resources on k8s API reconnect. ++ # ignoreAlreadyProcessed: true + SCProvider: true + # label that the configmaps with dashboards are marked with + label: grafana_dashboard + # value of label that the configmaps with dashboards are set to +- labelValue: null ++ labelValue: "" ++ # Log level. Can be one of: DEBUG, INFO, WARN, ERROR, CRITICAL. ++ # logLevel: INFO + # folder in the pod that should hold the collected dashboards (unless `defaultFolderName` is set) folder: /tmp/dashboards # The default folder name, it will create a subfolder under the `folder` and put dashboards in there instead defaultFolderName: null @@ -25,27 +332,228 @@ - # Otherwise the namespace in which the sidecar is running will be used. - # It's also possible to specify ALL to search in all namespaces. - searchNamespace: null ++ # Method to use to detect ConfigMap changes. With WATCH the sidecar will do a WATCH requests, with SLEEP it will list all ConfigMaps, then sleep for 60 seconds. ++ watchMethod: WATCH # search in configmap, secret or both resource: both # If specified, the sidecar will look for annotation with this name to create folder and put graph here. -@@ -687,20 +684,12 @@ + # You can use this parameter together with `provider.foldersFromFilesStructure`to annotate configmaps and create folder structure. + folderAnnotation: null ++ # Absolute path to shell script to execute after a configmap got reloaded ++ script: null ++ # watchServerTimeout: request to the server, asking it to cleanly close the connection after that. ++ # defaults to 60sec; much higher values like 3600 seconds (1h) are feasible for non-Azure K8S ++ # watchServerTimeout: 3600 ++ # ++ # watchClientTimeout: is a client-side timeout, configuring your local socket. ++ # If you have a network outage dropping all packets with no RST/FIN, ++ # this is how long your client waits before realizing & dropping the connection. ++ # defaults to 66sec (sic!) ++ # watchClientTimeout: 60 ++ # + # provider configuration that lets grafana manage the dashboards + provider: + # name of the provider, should be unique +@@ -681,28 +828,98 @@ + allowUiUpdates: false + # allow Grafana to replicate dashboard structure from filesystem + foldersFromFilesStructure: false ++ # Additional dashboard sidecar volume mounts ++ extraMounts: [] ++ # Sets the size limit of the dashboard sidecar emptyDir volume ++ sizeLimit: {} + datasources: + enabled: false ++ # Additional environment variables for the datasourcessidecar ++ env: {} ++ # Do not reprocess already processed unchanged resources on k8s API reconnect. ++ # ignoreAlreadyProcessed: true + # label that the configmaps with datasources are marked with label: grafana_datasource # value of label that the configmaps with datasources are set to - labelValue: null +- labelValue: null - # If specified, the sidecar will search for datasource config-maps inside this namespace. - # Otherwise the namespace in which the sidecar is running will be used. - # It's also possible to specify ALL to search in all namespaces - searchNamespace: null ++ labelValue: "" ++ # Log level. Can be one of: DEBUG, INFO, WARN, ERROR, CRITICAL. ++ # logLevel: INFO ++ # Method to use to detect ConfigMap changes. With WATCH the sidecar will do a WATCH requests, with SLEEP it will list all ConfigMaps, then sleep for 60 seconds. ++ watchMethod: WATCH # search in configmap, secret or both resource: both ++ # watchServerTimeout: request to the server, asking it to cleanly close the connection after that. ++ # defaults to 60sec; much higher values like 3600 seconds (1h) are feasible for non-Azure K8S ++ # watchServerTimeout: 3600 ++ # ++ # watchClientTimeout: is a client-side timeout, configuring your local socket. ++ # If you have a network outage dropping all packets with no RST/FIN, ++ # this is how long your client waits before realizing & dropping the connection. ++ # defaults to 66sec (sic!) ++ # watchClientTimeout: 60 ++ # ++ # Endpoint to send request to reload datasources ++ reloadURL: "http://localhost:3000/api/admin/provisioning/datasources/reload" ++ # Absolute path to shell script to execute after a datasource got reloaded ++ script: null ++ skipReload: true ++ # Deploy the datasource sidecar as an initContainer in addition to a container. ++ # This is needed if skipReload is true, to load any datasources defined at startup time. ++ initDatasources: true ++ # Sets the size limit of the datasource sidecar emptyDir volume ++ sizeLimit: {} ++ plugins: ++ enabled: false ++ # Additional environment variables for the plugins sidecar ++ env: {} ++ # Do not reprocess already processed unchanged resources on k8s API reconnect. ++ # ignoreAlreadyProcessed: true ++ # label that the configmaps with plugins are marked with ++ label: grafana_plugin ++ # value of label that the configmaps with plugins are set to ++ labelValue: "" ++ # Log level. Can be one of: DEBUG, INFO, WARN, ERROR, CRITICAL. ++ # logLevel: INFO ++ # Method to use to detect ConfigMap changes. With WATCH the sidecar will do a WATCH requests, with SLEEP it will list all ConfigMaps, then sleep for 60 seconds. ++ watchMethod: WATCH ++ # search in configmap, secret or both ++ resource: both ++ # watchServerTimeout: request to the server, asking it to cleanly close the connection after that. ++ # defaults to 60sec; much higher values like 3600 seconds (1h) are feasible for non-Azure K8S ++ # watchServerTimeout: 3600 ++ # ++ # watchClientTimeout: is a client-side timeout, configuring your local socket. ++ # If you have a network outage dropping all packets with no RST/FIN, ++ # this is how long your client waits before realizing & dropping the connection. ++ # defaults to 66sec (sic!) ++ # watchClientTimeout: 60 ++ # ++ # Endpoint to send request to reload plugins ++ reloadURL: "http://localhost:3000/api/admin/provisioning/plugins/reload" ++ # Absolute path to shell script to execute after a plugin got reloaded ++ script: null ++ skipReload: false ++ # Deploy the datasource sidecar as an initContainer in addition to a container. ++ # This is needed if skipReload is true, to load any plugins defined at startup time. ++ initPlugins: false ++ # Sets the size limit of the plugin sidecar emptyDir volume ++ sizeLimit: {} notifiers: enabled: false ++ # Additional environment variables for the notifierssidecar ++ env: {} ++ # Do not reprocess already processed unchanged resources on k8s API reconnect. ++ # ignoreAlreadyProcessed: true # label that the configmaps with notifiers are marked with label: grafana_notifier - # If specified, the sidecar will search for notifier config-maps inside this namespace. - # Otherwise the namespace in which the sidecar is running will be used. - # It's also possible to specify ALL to search in all namespaces - searchNamespace: null ++ # value of label that the configmaps with notifiers are set to ++ labelValue: "" ++ # Log level. Can be one of: DEBUG, INFO, WARN, ERROR, CRITICAL. ++ # logLevel: INFO # search in configmap, secret or both resource: both ++ # Sets the size limit of the notifier sidecar emptyDir volume ++ sizeLimit: {} + ## Override the deployment namespace + ## +@@ -731,6 +948,7 @@ + HTTP_HOST: "0.0.0.0" + # RENDERING_ARGS: --no-sandbox,--disable-gpu,--window-size=1280x758 + # RENDERING_MODE: clustered ++ # IGNORE_HTTPS_ERRORS: true + # image-renderer deployment serviceAccount + serviceAccountName: "" + # image-renderer deployment securityContext +@@ -747,6 +965,10 @@ + # image-renderer service port used by both service and deployment + port: 8081 + targetPort: 8081 ++ # Adds the appProtocol field to the image-renderer service. This allows to work with istio protocol selection. Ex: "http" or "tcp" ++ appProtocol: "" ++ # If https is enabled in Grafana, this needs to be set as 'https' to correctly configure the callback used in Grafana ++ grafanaProtocol: http + # In case a sub_path is used this needs to be added to the image renderer callback + grafanaSubPath: "" + # name of the image-renderer port on the pod +@@ -765,3 +987,75 @@ + # requests: + # cpu: 50m + # memory: 50Mi ++ ## Node labels for pod assignment ++ ## ref: https://kubernetes.io/docs/user-guide/node-selection/ ++ # ++ nodeSelector: {} ++ ++ ## Tolerations for pod assignment ++ ## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ ++ ## ++ tolerations: [] ++ ++ ## Affinity for pod assignment (evaluated as template) ++ ## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity ++ ## ++ affinity: {} ++ ++networkPolicy: ++ ## @param networkPolicy.enabled Enable creation of NetworkPolicy resources. Only Ingress traffic is filtered for now. ++ ## ++ enabled: false ++ ## @param networkPolicy.allowExternal Don't require client label for connections ++ ## The Policy model to apply. When set to false, only pods with the correct ++ ## client label will have network access to grafana port defined. ++ ## When true, grafana will accept connections from any source ++ ## (with the correct destination port). ++ ## ++ ingress: true ++ ## @param networkPolicy.ingress When true enables the creation ++ ## an ingress network policy ++ ## ++ allowExternal: true ++ ## @param networkPolicy.explicitNamespacesSelector A Kubernetes LabelSelector to explicitly select namespaces from which traffic could be allowed ++ ## If explicitNamespacesSelector is missing or set to {}, only client Pods that are in the networkPolicy's namespace ++ ## and that match other criteria, the ones that have the good label, can reach the grafana. ++ ## But sometimes, we want the grafana to be accessible to clients from other namespaces, in this case, we can use this ++ ## LabelSelector to select these namespaces, note that the networkPolicy's namespace should also be explicitly added. ++ ## ++ ## Example: ++ ## explicitNamespacesSelector: ++ ## matchLabels: ++ ## role: frontend ++ ## matchExpressions: ++ ## - {key: role, operator: In, values: [frontend]} ++ ## ++ explicitNamespacesSelector: {} ++ ## ++ ## ++ ## ++ ## ++ ## ++ ## ++ egress: ++ ## @param networkPolicy.egress.enabled When enabled, an egress network policy will be ++ ## created allowing grafana to connect to external data sources from kubernetes cluster. ++ enabled: false ++ ## ++ ## @param networkPolicy.egress.ports Add individual ports to be allowed by the egress ++ ports: [] ++ ## Add ports to the egress by specifying - port: ++ ## E.X. ++ ## ports: ++ ## - port: 80 ++ ## - port: 443 ++ ## ++ ## ++ ## ++ ## ++ ## ++ ## ++ ++# Enable backward compatibility of kubernetes where version below 1.13 doesn't have the enableServiceLinks option ++enableKubeBackwardCompatibility: false ++useStatefulSet: false diff --git a/packages/rancher-project-monitoring/generated-changes/patch/files/rancher/pods/rancher-pod-containers.json.patch b/packages/rancher-project-monitoring/generated-changes/patch/files/rancher/pods/rancher-pod-containers.json.patch new file mode 100644 index 00000000..5c01d180 --- /dev/null +++ b/packages/rancher-project-monitoring/generated-changes/patch/files/rancher/pods/rancher-pod-containers.json.patch @@ -0,0 +1,130 @@ +--- charts-original/files/rancher/pods/rancher-pod-containers.json ++++ charts/files/rancher/pods/rancher-pod-containers.json +@@ -26,7 +26,7 @@ + "bars": false, + "dashLength": 10, + "dashes": false, +- "datasource": null, ++ "datasource": "$datasource", + "fieldConfig": { + "defaults": { + "custom": {} +@@ -139,7 +139,7 @@ + "bars": false, + "dashLength": 10, + "dashes": false, +- "datasource": null, ++ "datasource": "$datasource", + "fieldConfig": { + "defaults": { + "custom": {} +@@ -234,7 +234,7 @@ + "bars": false, + "dashLength": 10, + "dashes": false, +- "datasource": null, ++ "datasource": "$datasource", + "fieldConfig": { + "defaults": { + "custom": {} +@@ -274,37 +274,37 @@ + "steppedLine": false, + "targets": [ + { +- "expr": "sum(rate(container_network_receive_packets_total{namespace=~\"$namespace\",pod=~\"$pod\",container!=\"\"}[$__rate_interval])) by (container) OR sum(rate(windows_container_network_receive_packets_total{namespace=~\"$namespace\",pod=~\"$pod\",container!=\"\"}[$__rate_interval])) by (container)", ++ "expr": "sum(irate(container_network_receive_packets_total{namespace=~\"$namespace\",pod=~\"$pod\"}[$__rate_interval])) by (container) OR sum(irate(windows_container_network_receive_packets_total{namespace=~\"$namespace\",pod=~\"$pod\"}[$__rate_interval])) by (container)", + "interval": "", + "legendFormat": "Receive Total ({{container}})", + "refId": "A" + }, + { +- "expr": "sum(rate(container_network_transmit_packets_total{namespace=~\"$namespace\",pod=~\"$pod\",container!=\"\"}[$__rate_interval])) by (container) OR sum(rate(windows_container_network_transmit_packets_total{namespace=~\"$namespace\",pod=~\"$pod\",container!=\"\"}[$__rate_interval])) by (container)", ++ "expr": "sum(irate(container_network_transmit_packets_total{namespace=~\"$namespace\",pod=~\"$pod\"}[$__rate_interval])) by (container) OR sum(irate(windows_container_network_transmit_packets_total{namespace=~\"$namespace\",pod=~\"$pod\"}[$__rate_interval])) by (container)", + "interval": "", + "legendFormat": "Transmit Total ({{container}})", + "refId": "B" + }, + { +- "expr": "sum(rate(container_network_receive_packets_dropped_total{namespace=~\"$namespace\",pod=~\"$pod\",container!=\"\"}[$__rate_interval])) by (container) OR sum(rate(windows_container_network_receive_packets_dropped_total{namespace=~\"$namespace\",pod=~\"$pod\",container!=\"\"}[$__rate_interval])) by (container)", ++ "expr": "sum(irate(container_network_receive_packets_dropped_total{namespace=~\"$namespace\",pod=~\"$pod\"}[$__rate_interval])) by (container) OR sum(irate(windows_container_network_receive_packets_dropped_total{namespace=~\"$namespace\",pod=~\"$pod\"}[$__rate_interval])) by (container)", + "interval": "", + "legendFormat": "Receive Dropped ({{container}})", + "refId": "C" + }, + { +- "expr": "sum(rate(container_network_receive_errors_total{namespace=~\"$namespace\",pod=~\"$pod\",container!=\"\"}[$__rate_interval])) by (container)", ++ "expr": "sum(irate(container_network_receive_errors_total{namespace=~\"$namespace\",pod=~\"$pod\"}[$__rate_interval])) by (container)", + "interval": "", + "legendFormat": "Receive Errors ({{container}})", + "refId": "D" + }, + { +- "expr": "sum(rate(container_network_transmit_errors_total{namespace=~\"$namespace\",pod=~\"$pod\",container!=\"\"}[$__rate_interval])) by (container)", ++ "expr": "sum(irate(container_network_transmit_errors_total{namespace=~\"$namespace\",pod=~\"$pod\"}[$__rate_interval])) by (container)", + "interval": "", + "legendFormat": "Transmit Errors ({{container}})", + "refId": "E" + }, + { +- "expr": "sum(rate(container_network_transmit_packets_dropped_total{namespace=~\"$namespace\",pod=~\"$pod\",container!=\"\"}[$__rate_interval])) by (container) OR sum(rate(windows_container_network_transmit_packets_dropped_total{namespace=~\"$namespace\",pod=~\"$pod\",container!=\"\"}[$__rate_interval])) by (container)", ++ "expr": "sum(irate(container_network_transmit_packets_dropped_total{namespace=~\"$namespace\",pod=~\"$pod\"}[$__rate_interval])) by (container) OR sum(irate(windows_container_network_transmit_packets_dropped_total{namespace=~\"$namespace\",pod=~\"$pod\"}[$__rate_interval])) by (container)", + "interval": "", + "legendFormat": "Transmit Dropped ({{container}})", + "refId": "F" +@@ -359,7 +359,7 @@ + "bars": false, + "dashLength": 10, + "dashes": false, +- "datasource": null, ++ "datasource": "$datasource", + "fieldConfig": { + "defaults": { + "custom": {} +@@ -399,13 +399,13 @@ + "steppedLine": false, + "targets": [ + { +- "expr": "sum(rate(container_network_receive_bytes_total{namespace=~\"$namespace\",pod=~\"$pod\",container!=\"\"}[$__rate_interval])) by (container) OR sum(rate(windows_container_network_receive_bytes_total{namespace=~\"$namespace\",pod=~\"$pod\",container!=\"\"}[$__rate_interval])) by (container)", ++ "expr": "sum(irate(container_network_receive_bytes_total{namespace=~\"$namespace\",pod=~\"$pod\"}[$__rate_interval])) by (container) OR sum(irate(windows_container_network_receive_bytes_total{namespace=~\"$namespace\",pod=~\"$pod\"}[$__rate_interval])) by (container)", + "interval": "", + "legendFormat": "Receive Total ({{container}})", + "refId": "A" + }, + { +- "expr": "sum(rate(container_network_transmit_bytes_total{namespace=~\"$namespace\",pod=~\"$pod\",container!=\"\"}[$__rate_interval])) by (container) OR sum(rate(windows_container_network_transmit_bytes_total{namespace=~\"$namespace\",pod=~\"$pod\",container!=\"\"}[$__rate_interval])) by (container)", ++ "expr": "sum(irate(container_network_transmit_bytes_total{namespace=~\"$namespace\",pod=~\"$pod\"}[$__rate_interval])) by (container) OR sum(irate(windows_container_network_transmit_bytes_total{namespace=~\"$namespace\",pod=~\"$pod\"}[$__rate_interval])) by (container)", + "interval": "", + "legendFormat": "Transmit Total ({{container}})", + "refId": "B" +@@ -460,7 +460,7 @@ + "bars": false, + "dashLength": 10, + "dashes": false, +- "datasource": null, ++ "datasource": "$datasource", + "fieldConfig": { + "defaults": { + "custom": {} +@@ -561,6 +561,22 @@ + "tags": [], + "templating": { + "list": [ ++ { ++ "current": { ++ "text": "Prometheus", ++ "value": "Prometheus" ++ }, ++ "hide": 0, ++ "label": "Data Source", ++ "name": "datasource", ++ "options": [ ++ ++ ], ++ "query": "prometheus", ++ "refresh": 1, ++ "regex": "", ++ "type": "datasource" ++ }, + { + "allValue": null, + "hide": 0, diff --git a/packages/rancher-project-monitoring/generated-changes/patch/files/rancher/pods/rancher-pod.json.patch b/packages/rancher-project-monitoring/generated-changes/patch/files/rancher/pods/rancher-pod.json.patch new file mode 100644 index 00000000..ce88ea02 --- /dev/null +++ b/packages/rancher-project-monitoring/generated-changes/patch/files/rancher/pods/rancher-pod.json.patch @@ -0,0 +1,130 @@ +--- charts-original/files/rancher/pods/rancher-pod.json ++++ charts/files/rancher/pods/rancher-pod.json +@@ -26,7 +26,7 @@ + "bars": false, + "dashLength": 10, + "dashes": false, +- "datasource": null, ++ "datasource": "$datasource", + "fieldConfig": { + "defaults": { + "custom": {} +@@ -139,7 +139,7 @@ + "bars": false, + "dashLength": 10, + "dashes": false, +- "datasource": null, ++ "datasource": "$datasource", + "fieldConfig": { + "defaults": { + "custom": {} +@@ -234,7 +234,7 @@ + "bars": false, + "dashLength": 10, + "dashes": false, +- "datasource": null, ++ "datasource": "$datasource", + "fieldConfig": { + "defaults": { + "custom": {} +@@ -274,37 +274,37 @@ + "steppedLine": false, + "targets": [ + { +- "expr": "sum(rate(container_network_receive_packets_total{namespace=~\"$namespace\",pod=~\"$pod\",container!=\"\"}[$__rate_interval])) OR sum(rate(windows_container_network_receive_packets_total{namespace=~\"$namespace\",pod=~\"$pod\",container!=\"\"}[$__rate_interval]))", ++ "expr": "sum(irate(container_network_receive_packets_total{namespace=~\"$namespace\",pod=~\"$pod\"}[$__rate_interval])) OR sum(irate(windows_container_network_receive_packets_total{namespace=~\"$namespace\",pod=~\"$pod\"}[$__rate_interval]))", + "interval": "", + "legendFormat": "Receive Total", + "refId": "A" + }, + { +- "expr": "sum(rate(container_network_transmit_packets_total{namespace=~\"$namespace\",pod=~\"$pod\",container!=\"\"}[$__rate_interval])) OR sum(rate(windows_container_network_transmit_packets_total{namespace=~\"$namespace\",pod=~\"$pod\",container!=\"\"}[$__rate_interval]))", ++ "expr": "sum(irate(container_network_transmit_packets_total{namespace=~\"$namespace\",pod=~\"$pod\"}[$__rate_interval])) OR sum(irate(windows_container_network_transmit_packets_total{namespace=~\"$namespace\",pod=~\"$pod\"}[$__rate_interval]))", + "interval": "", + "legendFormat": "Transmit Total", + "refId": "B" + }, + { +- "expr": "sum(rate(container_network_receive_packets_dropped_total{namespace=~\"$namespace\",pod=~\"$pod\",container!=\"\"}[$__rate_interval])) OR sum(rate(windows_container_network_receive_packets_dropped_total{namespace=~\"$namespace\",pod=~\"$pod\",container!=\"\"}[$__rate_interval]))", ++ "expr": "sum(irate(container_network_receive_packets_dropped_total{namespace=~\"$namespace\",pod=~\"$pod\"}[$__rate_interval])) OR sum(irate(windows_container_network_receive_packets_dropped_total{namespace=~\"$namespace\",pod=~\"$pod\"}[$__rate_interval]))", + "interval": "", + "legendFormat": "Receive Dropped", + "refId": "C" + }, + { +- "expr": "sum(rate(container_network_receive_errors_total{namespace=~\"$namespace\",pod=~\"$pod\",container!=\"\"}[$__rate_interval]))", ++ "expr": "sum(irate(container_network_receive_errors_total{namespace=~\"$namespace\",pod=~\"$pod\"}[$__rate_interval]))", + "interval": "", + "legendFormat": "Receive Errors", + "refId": "D" + }, + { +- "expr": "sum(rate(container_network_transmit_errors_total{namespace=~\"$namespace\",pod=~\"$pod\",container!=\"\"}[$__rate_interval]))", ++ "expr": "sum(irate(container_network_transmit_errors_total{namespace=~\"$namespace\",pod=~\"$pod\"}[$__rate_interval]))", + "interval": "", + "legendFormat": "Transmit Errors", + "refId": "E" + }, + { +- "expr": "sum(rate(container_network_transmit_packets_dropped_total{namespace=~\"$namespace\",pod=~\"$pod\",container!=\"\"}[$__rate_interval])) OR sum(rate(windows_container_network_transmit_packets_dropped_total{namespace=~\"$namespace\",pod=~\"$pod\",container!=\"\"}[$__rate_interval]))", ++ "expr": "sum(irate(container_network_transmit_packets_dropped_total{namespace=~\"$namespace\",pod=~\"$pod\"}[$__rate_interval])) OR sum(irate(windows_container_network_transmit_packets_dropped_total{namespace=~\"$namespace\",pod=~\"$pod\"}[$__rate_interval]))", + "interval": "", + "legendFormat": "Transmit Dropped", + "refId": "F" +@@ -359,7 +359,7 @@ + "bars": false, + "dashLength": 10, + "dashes": false, +- "datasource": null, ++ "datasource": "$datasource", + "fieldConfig": { + "defaults": { + "custom": {} +@@ -399,13 +399,13 @@ + "steppedLine": false, + "targets": [ + { +- "expr": "sum(rate(container_network_receive_bytes_total{namespace=~\"$namespace\",pod=~\"$pod\",container!=\"\"}[$__rate_interval])) OR sum(rate(windows_container_network_receive_bytes_total{namespace=~\"$namespace\",pod=~\"$pod\",container!=\"\"}[$__rate_interval]))", ++ "expr": "sum(irate(container_network_receive_bytes_total{namespace=~\"$namespace\",pod=~\"$pod\"}[$__rate_interval])) OR sum(irate(windows_container_network_receive_bytes_total{namespace=~\"$namespace\",pod=~\"$pod\"}[$__rate_interval]))", + "interval": "", + "legendFormat": "Receive Total", + "refId": "A" + }, + { +- "expr": "sum(rate(container_network_transmit_bytes_total{namespace=~\"$namespace\",pod=~\"$pod\",container!=\"\"}[$__rate_interval])) OR sum(rate(windows_container_network_transmit_bytes_total{namespace=~\"$namespace\",pod=~\"$pod\",container!=\"\"}[$__rate_interval]))", ++ "expr": "sum(irate(container_network_transmit_bytes_total{namespace=~\"$namespace\",pod=~\"$pod\"}[$__rate_interval])) OR sum(irate(windows_container_network_transmit_bytes_total{namespace=~\"$namespace\",pod=~\"$pod\"}[$__rate_interval]))", + "interval": "", + "legendFormat": "Transmit Total", + "refId": "B" +@@ -460,7 +460,7 @@ + "bars": false, + "dashLength": 10, + "dashes": false, +- "datasource": null, ++ "datasource": "$datasource", + "fieldConfig": { + "defaults": { + "custom": {} +@@ -561,6 +561,22 @@ + "tags": [], + "templating": { + "list": [ ++ { ++ "current": { ++ "text": "Prometheus", ++ "value": "Prometheus" ++ }, ++ "hide": 0, ++ "label": "Data Source", ++ "name": "datasource", ++ "options": [ ++ ++ ], ++ "query": "prometheus", ++ "refresh": 1, ++ "regex": "", ++ "type": "datasource" ++ }, + { + "allValue": null, + "hide": 0, diff --git a/packages/rancher-project-monitoring/generated-changes/patch/files/rancher/workloads/rancher-workload-pods.json.patch b/packages/rancher-project-monitoring/generated-changes/patch/files/rancher/workloads/rancher-workload-pods.json.patch new file mode 100644 index 00000000..7d3651d3 --- /dev/null +++ b/packages/rancher-project-monitoring/generated-changes/patch/files/rancher/workloads/rancher-workload-pods.json.patch @@ -0,0 +1,130 @@ +--- charts-original/files/rancher/workloads/rancher-workload-pods.json ++++ charts/files/rancher/workloads/rancher-workload-pods.json +@@ -26,7 +26,7 @@ + "bars": false, + "dashLength": 10, + "dashes": false, +- "datasource": null, ++ "datasource": "$datasource", + "fieldConfig": { + "defaults": { + "custom": {} +@@ -139,7 +139,7 @@ + "bars": false, + "dashLength": 10, + "dashes": false, +- "datasource": null, ++ "datasource": "$datasource", + "fieldConfig": { + "defaults": { + "custom": {} +@@ -234,7 +234,7 @@ + "bars": false, + "dashLength": 10, + "dashes": false, +- "datasource": null, ++ "datasource": "$datasource", + "fieldConfig": { + "defaults": { + "custom": {} +@@ -274,37 +274,37 @@ + "steppedLine": false, + "targets": [ + { +- "expr": "(sum(rate(container_network_receive_packets_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod) OR sum(rate(windows_container_network_receive_packets_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)) * on(pod) kube_pod_info{namespace=~\"$namespace\", created_by_kind=\"$kind\", created_by_name=\"$workload\"}", ++ "expr": "(sum(irate(container_network_receive_packets_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod) OR sum(irate(windows_container_network_receive_packets_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)) * on(pod) kube_pod_info{namespace=~\"$namespace\", created_by_kind=\"$kind\", created_by_name=\"$workload\"}", + "interval": "", + "legendFormat": "Receive Total ({{pod}})", + "refId": "A" + }, + { +- "expr": "(sum(rate(container_network_transmit_packets_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod) OR sum(rate(windows_container_network_transmit_packets_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)) * on(pod) kube_pod_info{namespace=~\"$namespace\", created_by_kind=\"$kind\", created_by_name=\"$workload\"}", ++ "expr": "(sum(irate(container_network_transmit_packets_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod) OR sum(irate(windows_container_network_transmit_packets_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)) * on(pod) kube_pod_info{namespace=~\"$namespace\", created_by_kind=\"$kind\", created_by_name=\"$workload\"}", + "interval": "", + "legendFormat": "Transmit Total ({{pod}})", + "refId": "B" + }, + { +- "expr": "(sum(rate(container_network_receive_packets_dropped_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod) OR sum(rate(windows_container_network_receive_packets_dropped_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)) * on(pod) kube_pod_info{namespace=~\"$namespace\", created_by_kind=\"$kind\", created_by_name=\"$workload\"}", ++ "expr": "(sum(irate(container_network_receive_packets_dropped_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod) OR sum(irate(windows_container_network_receive_packets_dropped_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)) * on(pod) kube_pod_info{namespace=~\"$namespace\", created_by_kind=\"$kind\", created_by_name=\"$workload\"}", + "interval": "", + "legendFormat": "Receive Dropped ({{pod}})", + "refId": "C" + }, + { +- "expr": "(sum(rate(container_network_receive_errors_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)) * on(pod) kube_pod_info{namespace=~\"$namespace\", created_by_kind=\"$kind\", created_by_name=\"$workload\"}", ++ "expr": "(sum(irate(container_network_receive_errors_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)) * on(pod) kube_pod_info{namespace=~\"$namespace\", created_by_kind=\"$kind\", created_by_name=\"$workload\"}", + "interval": "", + "legendFormat": "Receive Errors ({{pod}})", + "refId": "D" + }, + { +- "expr": "(sum(rate(container_network_transmit_errors_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)) * on(pod) kube_pod_info{namespace=~\"$namespace\", created_by_kind=\"$kind\", created_by_name=\"$workload\"}", ++ "expr": "(sum(irate(container_network_transmit_errors_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)) * on(pod) kube_pod_info{namespace=~\"$namespace\", created_by_kind=\"$kind\", created_by_name=\"$workload\"}", + "interval": "", + "legendFormat": "Transmit Errors ({{pod}})", + "refId": "E" + }, + { +- "expr": "(sum(rate(container_network_transmit_packets_dropped_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod) OR sum(rate(windows_container_network_transmit_packets_dropped_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)) * on(pod) kube_pod_info{namespace=~\"$namespace\", created_by_kind=\"$kind\", created_by_name=\"$workload\"}", ++ "expr": "(sum(irate(container_network_transmit_packets_dropped_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod) OR sum(irate(windows_container_network_transmit_packets_dropped_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)) * on(pod) kube_pod_info{namespace=~\"$namespace\", created_by_kind=\"$kind\", created_by_name=\"$workload\"}", + "interval": "", + "legendFormat": "Transmit Dropped ({{pod}})", + "refId": "F" +@@ -359,7 +359,7 @@ + "bars": false, + "dashLength": 10, + "dashes": false, +- "datasource": null, ++ "datasource": "$datasource", + "fieldConfig": { + "defaults": { + "custom": {} +@@ -399,13 +399,13 @@ + "steppedLine": false, + "targets": [ + { +- "expr": "(sum(rate(container_network_receive_bytes_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod) OR sum(rate(windows_container_network_receive_bytes_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)) * on(pod) kube_pod_info{namespace=~\"$namespace\", created_by_kind=\"$kind\", created_by_name=\"$workload\"}", ++ "expr": "(sum(irate(container_network_receive_bytes_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod) OR sum(irate(windows_container_network_receive_bytes_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)) * on(pod) kube_pod_info{namespace=~\"$namespace\", created_by_kind=\"$kind\", created_by_name=\"$workload\"}", + "interval": "", + "legendFormat": "Receive Total ({{pod}})", + "refId": "A" + }, + { +- "expr": "(sum(rate(container_network_transmit_bytes_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod) OR sum(rate(windows_container_network_transmit_bytes_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)) * on(pod) kube_pod_info{namespace=~\"$namespace\", created_by_kind=\"$kind\", created_by_name=\"$workload\"}", ++ "expr": "(sum(irate(container_network_transmit_bytes_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod) OR sum(irate(windows_container_network_transmit_bytes_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)) * on(pod) kube_pod_info{namespace=~\"$namespace\", created_by_kind=\"$kind\", created_by_name=\"$workload\"}", + "interval": "", + "legendFormat": "Transmit Total ({{pod}})", + "refId": "B" +@@ -460,7 +460,7 @@ + "bars": false, + "dashLength": 10, + "dashes": false, +- "datasource": null, ++ "datasource": "$datasource", + "fieldConfig": { + "defaults": { + "custom": {} +@@ -561,6 +561,22 @@ + "tags": [], + "templating": { + "list": [ ++ { ++ "current": { ++ "text": "Prometheus", ++ "value": "Prometheus" ++ }, ++ "hide": 0, ++ "label": "Data Source", ++ "name": "datasource", ++ "options": [ ++ ++ ], ++ "query": "prometheus", ++ "refresh": 1, ++ "regex": "", ++ "type": "datasource" ++ }, + { + "allValue": null, + "hide": 0, diff --git a/packages/rancher-project-monitoring/generated-changes/patch/files/rancher/workloads/rancher-workload.json.patch b/packages/rancher-project-monitoring/generated-changes/patch/files/rancher/workloads/rancher-workload.json.patch new file mode 100644 index 00000000..72de6341 --- /dev/null +++ b/packages/rancher-project-monitoring/generated-changes/patch/files/rancher/workloads/rancher-workload.json.patch @@ -0,0 +1,130 @@ +--- charts-original/files/rancher/workloads/rancher-workload.json ++++ charts/files/rancher/workloads/rancher-workload.json +@@ -26,7 +26,7 @@ + "bars": false, + "dashLength": 10, + "dashes": false, +- "datasource": null, ++ "datasource": "$datasource", + "fieldConfig": { + "defaults": { + "custom": {} +@@ -139,7 +139,7 @@ + "bars": false, + "dashLength": 10, + "dashes": false, +- "datasource": null, ++ "datasource": "$datasource", + "fieldConfig": { + "defaults": { + "custom": {} +@@ -234,7 +234,7 @@ + "bars": false, + "dashLength": 10, + "dashes": false, +- "datasource": null, ++ "datasource": "$datasource", + "fieldConfig": { + "defaults": { + "custom": {} +@@ -274,37 +274,37 @@ + "steppedLine": false, + "targets": [ + { +- "expr": "sum((sum(rate(container_network_receive_packets_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod) OR sum(rate(windows_container_network_receive_packets_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)) * on(pod) kube_pod_info{namespace=~\"$namespace\", created_by_kind=\"$kind\", created_by_name=\"$workload\"})", ++ "expr": "sum((sum(irate(container_network_receive_packets_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod) OR sum(irate(windows_container_network_receive_packets_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)) * on(pod) kube_pod_info{namespace=~\"$namespace\", created_by_kind=\"$kind\", created_by_name=\"$workload\"})", + "interval": "", + "legendFormat": "Receive Total", + "refId": "A" + }, + { +- "expr": "sum((sum(rate(container_network_transmit_packets_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod) OR sum(rate(windows_container_network_transmit_packets_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)) * on(pod) kube_pod_info{namespace=~\"$namespace\", created_by_kind=\"$kind\", created_by_name=\"$workload\"})", ++ "expr": "sum((sum(irate(container_network_transmit_packets_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod) OR sum(irate(windows_container_network_transmit_packets_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)) * on(pod) kube_pod_info{namespace=~\"$namespace\", created_by_kind=\"$kind\", created_by_name=\"$workload\"})", + "interval": "", + "legendFormat": "Transmit Total", + "refId": "B" + }, + { +- "expr": "sum((sum(rate(container_network_receive_packets_dropped_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod) OR sum(rate(windows_container_network_receive_packets_dropped_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)) * on(pod) kube_pod_info{namespace=~\"$namespace\", created_by_kind=\"$kind\", created_by_name=\"$workload\"})", ++ "expr": "sum((sum(irate(container_network_receive_packets_dropped_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod) OR sum(irate(windows_container_network_receive_packets_dropped_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)) * on(pod) kube_pod_info{namespace=~\"$namespace\", created_by_kind=\"$kind\", created_by_name=\"$workload\"})", + "interval": "", + "legendFormat": "Receive Dropped", + "refId": "C" + }, + { +- "expr": "sum((sum(rate(container_network_receive_errors_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)) * on(pod) kube_pod_info{namespace=~\"$namespace\", created_by_kind=\"$kind\", created_by_name=\"$workload\"})", ++ "expr": "sum((sum(irate(container_network_receive_errors_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)) * on(pod) kube_pod_info{namespace=~\"$namespace\", created_by_kind=\"$kind\", created_by_name=\"$workload\"})", + "interval": "", + "legendFormat": "Receive Errors", + "refId": "D" + }, + { +- "expr": "sum((sum(rate(container_network_transmit_errors_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)) * on(pod) kube_pod_info{namespace=~\"$namespace\", created_by_kind=\"$kind\", created_by_name=\"$workload\"})", ++ "expr": "sum((sum(irate(container_network_transmit_errors_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)) * on(pod) kube_pod_info{namespace=~\"$namespace\", created_by_kind=\"$kind\", created_by_name=\"$workload\"})", + "interval": "", + "legendFormat": "Transmit Errors", + "refId": "E" + }, + { +- "expr": "sum((sum(rate(container_network_transmit_packets_dropped_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod) OR sum(rate(windows_container_network_transmit_packets_dropped_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)) * on(pod) kube_pod_info{namespace=~\"$namespace\", created_by_kind=\"$kind\", created_by_name=\"$workload\"})", ++ "expr": "sum((sum(irate(container_network_transmit_packets_dropped_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod) OR sum(irate(windows_container_network_transmit_packets_dropped_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)) * on(pod) kube_pod_info{namespace=~\"$namespace\", created_by_kind=\"$kind\", created_by_name=\"$workload\"})", + "interval": "", + "legendFormat": "Transmit Dropped", + "refId": "F" +@@ -359,7 +359,7 @@ + "bars": false, + "dashLength": 10, + "dashes": false, +- "datasource": null, ++ "datasource": "$datasource", + "fieldConfig": { + "defaults": { + "custom": {} +@@ -399,13 +399,13 @@ + "steppedLine": false, + "targets": [ + { +- "expr": "sum((sum(rate(container_network_receive_bytes_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod) OR sum(rate(windows_container_network_receive_bytes_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)) * on(pod) kube_pod_info{namespace=~\"$namespace\", created_by_kind=\"$kind\", created_by_name=\"$workload\"})", ++ "expr": "sum((sum(irate(container_network_receive_bytes_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod) OR sum(irate(windows_container_network_receive_bytes_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)) * on(pod) kube_pod_info{namespace=~\"$namespace\", created_by_kind=\"$kind\", created_by_name=\"$workload\"})", + "interval": "", + "legendFormat": "Receive Total", + "refId": "A" + }, + { +- "expr": "sum((sum(rate(container_network_transmit_bytes_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod) OR sum(rate(windows_container_network_transmit_bytes_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)) * on(pod) kube_pod_info{namespace=~\"$namespace\", created_by_kind=\"$kind\", created_by_name=\"$workload\"})", ++ "expr": "sum((sum(irate(container_network_transmit_bytes_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod) OR sum(irate(windows_container_network_transmit_bytes_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)) * on(pod) kube_pod_info{namespace=~\"$namespace\", created_by_kind=\"$kind\", created_by_name=\"$workload\"})", + "interval": "", + "legendFormat": "Transmit Total", + "refId": "B" +@@ -460,7 +460,7 @@ + "bars": false, + "dashLength": 10, + "dashes": false, +- "datasource": null, ++ "datasource": "$datasource", + "fieldConfig": { + "defaults": { + "custom": {} +@@ -561,6 +561,22 @@ + "tags": [], + "templating": { + "list": [ ++ { ++ "current": { ++ "text": "Prometheus", ++ "value": "Prometheus" ++ }, ++ "hide": 0, ++ "label": "Data Source", ++ "name": "datasource", ++ "options": [ ++ ++ ], ++ "query": "prometheus", ++ "refresh": 1, ++ "regex": "", ++ "type": "datasource" ++ }, + { + "allValue": null, + "hide": 0, diff --git a/packages/rancher-project-monitoring/generated-changes/patch/templates/_helpers.tpl.patch b/packages/rancher-project-monitoring/generated-changes/patch/templates/_helpers.tpl.patch index 02a4a80a..c62694c8 100644 --- a/packages/rancher-project-monitoring/generated-changes/patch/templates/_helpers.tpl.patch +++ b/packages/rancher-project-monitoring/generated-changes/patch/templates/_helpers.tpl.patch @@ -119,7 +119,7 @@ {{- if .Values.fullnameOverride -}} {{- .Values.fullnameOverride | trunc 26 | trimSuffix "-" -}} {{- else -}} -@@ -166,32 +72,32 @@ +@@ -166,32 +72,40 @@ {{- end -}} {{/* Fullname suffixed with operator */}} @@ -129,19 +129,29 @@ +{{- printf "%s-operator" (include "project-prometheus-stack.fullname" .) -}} {{- end }} - {{/* Fullname suffixed with prometheus */}} +-{{/* Fullname suffixed with prometheus */}} -{{- define "kube-prometheus-stack.prometheus.fullname" -}} -{{- printf "%s-prometheus" (include "kube-prometheus-stack.fullname" .) -}} -+{{- define "project-prometheus-stack.prometheus.fullname" -}} -+{{- printf "%s-prometheus" (include "project-prometheus-stack.fullname" .) -}} ++{{/* Prometheus custom resource instance name */}} ++{{- define "project-prometheus-stack.prometheus.crname" -}} ++{{- if .Values.cleanPrometheusOperatorObjectNames }} ++{{- include "project-prometheus-stack.fullname" . }} ++{{- else }} ++{{- print (include "project-prometheus-stack.fullname" .) "-prometheus" }} {{- end }} ++{{- end }} - {{/* Fullname suffixed with alertmanager */}} +-{{/* Fullname suffixed with alertmanager */}} -{{- define "kube-prometheus-stack.alertmanager.fullname" -}} -{{- printf "%s-alertmanager" (include "kube-prometheus-stack.fullname" .) -}} -+{{- define "project-prometheus-stack.alertmanager.fullname" -}} -+{{- printf "%s-alertmanager" (include "project-prometheus-stack.fullname" .) -}} ++{{/* Alertmanager custom resource instance name */}} ++{{- define "project-prometheus-stack.alertmanager.crname" -}} ++{{- if .Values.cleanPrometheusOperatorObjectNames }} ++{{- include "project-prometheus-stack.fullname" . }} ++{{- else }} ++{{- print (include "project-prometheus-stack.fullname" .) "-alertmanager" -}} {{- end }} ++{{- end }} {{/* Create chart name and version as used by the chart label. */}} -{{- define "kube-prometheus-stack.chartref" -}} @@ -162,28 +172,25 @@ release: {{ $.Release.Name | quote }} heritage: {{ $.Release.Service | quote }} {{- if .Values.commonLabels}} -@@ -199,28 +105,28 @@ +@@ -199,28 +113,19 @@ {{- end }} {{- end }} -{{/* Create the name of kube-prometheus-stack service account to use */}} -{{- define "kube-prometheus-stack.operator.serviceAccountName" -}} -+{{/* Create the name of project-prometheus-stack service account to use */}} -+{{- define "project-prometheus-stack.operator.serviceAccountName" -}} - {{- if .Values.prometheusOperator.serviceAccount.create -}} +-{{- if .Values.prometheusOperator.serviceAccount.create -}} - {{ default (include "kube-prometheus-stack.operator.fullname" .) .Values.prometheusOperator.serviceAccount.name }} -+ {{ default (include "project-prometheus-stack.operator.fullname" .) .Values.prometheusOperator.serviceAccount.name }} - {{- else -}} - {{ default "default" .Values.prometheusOperator.serviceAccount.name }} - {{- end -}} - {{- end -}} - +-{{- else -}} +- {{ default "default" .Values.prometheusOperator.serviceAccount.name }} +-{{- end -}} +-{{- end -}} +- {{/* Create the name of prometheus service account to use */}} -{{- define "kube-prometheus-stack.prometheus.serviceAccountName" -}} +{{- define "project-prometheus-stack.prometheus.serviceAccountName" -}} {{- if .Values.prometheus.serviceAccount.create -}} - {{ default (include "kube-prometheus-stack.prometheus.fullname" .) .Values.prometheus.serviceAccount.name }} -+ {{ default (include "project-prometheus-stack.prometheus.fullname" .) .Values.prometheus.serviceAccount.name }} ++ {{ default (print (include "project-prometheus-stack.fullname" .) "-prometheus") .Values.prometheus.serviceAccount.name }} {{- else -}} {{ default "default" .Values.prometheus.serviceAccount.name }} {{- end -}} @@ -194,11 +201,11 @@ +{{- define "project-prometheus-stack.alertmanager.serviceAccountName" -}} {{- if .Values.alertmanager.serviceAccount.create -}} - {{ default (include "kube-prometheus-stack.alertmanager.fullname" .) .Values.alertmanager.serviceAccount.name }} -+ {{ default (include "project-prometheus-stack.alertmanager.fullname" .) .Values.alertmanager.serviceAccount.name }} ++ {{ default (print (include "project-prometheus-stack.fullname" .) "-alertmanager") .Values.alertmanager.serviceAccount.name }} {{- else -}} {{ default "default" .Values.alertmanager.serviceAccount.name }} {{- end -}} -@@ -229,7 +135,7 @@ +@@ -229,7 +134,7 @@ {{/* Allow the release namespace to be overridden for multi-namespace deployments in combined charts */}} @@ -207,7 +214,7 @@ {{- if .Values.namespaceOverride -}} {{- .Values.namespaceOverride -}} {{- else -}} -@@ -240,7 +146,7 @@ +@@ -240,7 +145,7 @@ {{/* Use the grafana namespace override for multi-namespace deployments in combined charts */}} @@ -216,7 +223,7 @@ {{- if .Values.grafana.namespaceOverride -}} {{- .Values.grafana.namespaceOverride -}} {{- else -}} -@@ -248,36 +154,14 @@ +@@ -248,36 +153,14 @@ {{- end -}} {{- end -}} @@ -256,7 +263,7 @@ {{- print "networking.k8s.io/v1" -}} {{- else if .Capabilities.APIVersions.Has "networking.k8s.io/v1beta1" -}} {{- print "networking.k8s.io/v1beta1" -}} -@@ -287,19 +171,19 @@ +@@ -287,21 +170,82 @@ {{- end -}} {{/* Check Ingress stability */}} @@ -282,3 +289,66 @@ {{- print "policy/v1" -}} {{- else -}} {{- print "policy/v1beta1" -}} + {{- end -}} ++ {{- end -}} ++ ++{{/* Get value based on current Kubernetes version */}} ++{{- define "kube-prometheus-stack.kubeVersionDefaultValue" -}} ++ {{- $values := index . 0 100644 ++ {{- $kubeVersion := index . 1 100644 ++ {{- $old := index . 2 100644 ++ {{- $new := index . 3 100644 ++ {{- $default := index . 4 100644 ++ {{- if kindIs "invalid" $default -}} ++ {{- if semverCompare $kubeVersion (include "kube-prometheus-stack.kubeVersion" $values) -}} ++ {{- print $new -}} ++ {{- else -}} ++ {{- print $old -}} ++ {{- end -}} ++ {{- else -}} ++ {{- print $default }} ++ {{- end -}} ++{{- end -}} ++ ++{{/* Get value for kube-controller-manager depending on insecure scraping availability */}} ++{{- define "kube-prometheus-stack.kubeControllerManager.insecureScrape" -}} ++ {{- $values := index . 0 100644 ++ {{- $insecure := index . 1 100644 ++ {{- $secure := index . 2 100644 ++ {{- $userValue := index . 3 100644 ++ {{- include "kube-prometheus-stack.kubeVersionDefaultValue" (list $values ">= 1.22-0" $insecure $secure $userValue) -}} ++{{- end -}} ++ ++{{/* Get value for kube-scheduler depending on insecure scraping availability */}} ++{{- define "kube-prometheus-stack.kubeScheduler.insecureScrape" -}} ++ {{- $values := index . 0 100644 ++ {{- $insecure := index . 1 100644 ++ {{- $secure := index . 2 100644 ++ {{- $userValue := index . 3 100644 ++ {{- include "kube-prometheus-stack.kubeVersionDefaultValue" (list $values ">= 1.23-0" $insecure $secure $userValue) -}} ++{{- end -}} ++ ++{{/* ++To help compatibility with other charts which use global.imagePullSecrets. ++Allow either an array of {name: pullSecret} maps (k8s-style), or an array of strings (more common helm-style). ++global: ++ imagePullSecrets: ++ - name: pullSecret1 ++ - name: pullSecret2 ++ ++or ++ ++global: ++ imagePullSecrets: ++ - pullSecret1 ++ - pullSecret2 ++*/}} ++{{- define "kube-prometheus-stack.imagePullSecrets" -}} ++{{- range .Values.global.imagePullSecrets }} ++ {{- if eq (typeOf .) "map[string]interface {}" }} ++- {{ toYaml . | trim }} ++ {{- else }} ++- name: {{ . }} ++ {{- end }} ++{{- end }} + {{- end -}} diff --git a/packages/rancher-project-monitoring/generated-changes/patch/templates/alertmanager/alertmanager.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/templates/alertmanager/alertmanager.yaml.patch index 7092c13e..6f8cee57 100644 --- a/packages/rancher-project-monitoring/generated-changes/patch/templates/alertmanager/alertmanager.yaml.patch +++ b/packages/rancher-project-monitoring/generated-changes/patch/templates/alertmanager/alertmanager.yaml.patch @@ -1,12 +1,12 @@ --- charts-original/templates/alertmanager/alertmanager.yaml +++ charts/templates/alertmanager/alertmanager.yaml -@@ -2,11 +2,11 @@ +@@ -2,18 +2,26 @@ apiVersion: monitoring.coreos.com/v1 kind: Alertmanager metadata: - name: {{ template "kube-prometheus-stack.fullname" . }}-alertmanager - namespace: {{ template "kube-prometheus-stack.namespace" . }} -+ name: {{ template "project-prometheus-stack.fullname" . }}-alertmanager ++ name: {{ template "project-prometheus-stack.alertmanager.crname" . }} + namespace: {{ template "project-prometheus-stack.namespace" . }} labels: - app: {{ template "kube-prometheus-stack.name" . }}-alertmanager @@ -16,7 +16,23 @@ {{- if .Values.alertmanager.annotations }} annotations: {{ toYaml .Values.alertmanager.annotations | indent 4 }} -@@ -21,15 +21,15 @@ + {{- end }} + spec: + {{- if .Values.alertmanager.alertmanagerSpec.image }} +- image: {{ template "system_default_registry" . }}{{ .Values.alertmanager.alertmanagerSpec.image.repository }}:{{ .Values.alertmanager.alertmanagerSpec.image.tag }} ++ {{- if and .Values.alertmanager.alertmanagerSpec.image.tag .Values.alertmanager.alertmanagerSpec.image.sha }} ++ image: "{{ template "system_default_registry" . }}{{ .Values.alertmanager.alertmanagerSpec.image.repository }}:{{ .Values.alertmanager.alertmanagerSpec.image.tag }}@sha256:{{ .Values.alertmanager.alertmanagerSpec.image.sha }}" ++ {{- else if .Values.alertmanager.alertmanagerSpec.image.sha }} ++ image: "{{ template "system_default_registry" . }}{{ .Values.alertmanager.alertmanagerSpec.image.repository }}@sha256:{{ .Values.alertmanager.alertmanagerSpec.image.sha }}" ++ {{- else if .Values.alertmanager.alertmanagerSpec.image.tag }} ++ image: "{{ template "system_default_registry" . }}{{ .Values.alertmanager.alertmanagerSpec.image.repository }}:{{ .Values.alertmanager.alertmanagerSpec.image.tag }}" ++ {{- else }} ++ image: "{{ template "system_default_registry" . }}{{ .Values.alertmanager.alertmanagerSpec.image.repository }}" ++ {{- end }} + version: {{ .Values.alertmanager.alertmanagerSpec.image.tag }} + {{- if .Values.alertmanager.alertmanagerSpec.image.sha }} + sha: {{ .Values.alertmanager.alertmanagerSpec.image.sha }} +@@ -21,15 +29,15 @@ {{- end }} replicas: {{ .Values.alertmanager.alertmanagerSpec.replicas }} listenLocal: {{ .Values.alertmanager.alertmanagerSpec.listenLocal }} @@ -35,7 +51,7 @@ {{- end }} nodeSelector: {{ include "linux-node-selector" . | nindent 4 }} {{- if .Values.alertmanager.alertmanagerSpec.nodeSelector }} -@@ -56,12 +56,7 @@ +@@ -56,12 +64,15 @@ {{ else }} alertmanagerConfigSelector: {} {{- end }} @@ -44,26 +60,72 @@ -{{ toYaml .Values.alertmanager.alertmanagerSpec.alertmanagerConfigNamespaceSelector | indent 4}} -{{ else }} - alertmanagerConfigNamespaceSelector: {} --{{- end }} + alertmanagerConfigNamespaceSelector: {{ .Values.global.cattle.projectNamespaceSelector | toYaml | nindent 4 }} ++{{- if .Values.alertmanager.alertmanagerSpec.web }} ++ web: ++{{ toYaml .Values.alertmanager.alertmanagerSpec.web | indent 4 }} + {{- end }} ++{{- if .Values.alertmanager.alertmanagerSpec.alertmanagerConfiguration }} ++ alertmanagerConfiguration: ++{{ toYaml .Values.alertmanager.alertmanagerSpec.alertmanagerConfiguration | indent 4 }} ++{{- end }} {{- if .Values.alertmanager.alertmanagerSpec.resources }} resources: {{ toYaml .Values.alertmanager.alertmanagerSpec.resources | indent 4 }} -@@ -93,7 +88,7 @@ +@@ -75,7 +86,7 @@ + {{- end }} + {{- if .Values.alertmanager.alertmanagerSpec.storage }} + storage: +-{{ toYaml .Values.alertmanager.alertmanagerSpec.storage | indent 4 }} ++{{ tpl (toYaml .Values.alertmanager.alertmanagerSpec.storage | indent 4) . }} + {{- end }} + {{- if .Values.alertmanager.alertmanagerSpec.podMetadata }} + podMetadata: +@@ -83,6 +94,7 @@ + {{- end }} + {{- if or .Values.alertmanager.alertmanagerSpec.podAntiAffinity .Values.alertmanager.alertmanagerSpec.affinity }} + affinity: ++{{- end }} + {{- if .Values.alertmanager.alertmanagerSpec.affinity }} + {{ toYaml .Values.alertmanager.alertmanagerSpec.affinity | indent 4 }} + {{- end }} +@@ -92,8 +104,8 @@ + - topologyKey: {{ .Values.alertmanager.alertmanagerSpec.podAntiAffinityTopologyKey }} labelSelector: matchExpressions: - - {key: app, operator: In, values: [alertmanager]} +- - {key: app, operator: In, values: [alertmanager]} - - {key: alertmanager, operator: In, values: [{{ template "kube-prometheus-stack.fullname" . }}-alertmanager]} -+ - {key: alertmanager, operator: In, values: [{{ template "project-prometheus-stack.fullname" . }}-alertmanager]} ++ - {key: app.kubernetes.io/name, operator: In, values: [alertmanager]} ++ - {key: alertmanager, operator: In, values: [{{ template "project-prometheus-stack.alertmanager.crname" . }}]} {{- else if eq .Values.alertmanager.alertmanagerSpec.podAntiAffinity "soft" }} podAntiAffinity: preferredDuringSchedulingIgnoredDuringExecution: -@@ -103,7 +98,7 @@ +@@ -102,8 +114,8 @@ + topologyKey: {{ .Values.alertmanager.alertmanagerSpec.podAntiAffinityTopologyKey }} labelSelector: matchExpressions: - - {key: app, operator: In, values: [alertmanager]} +- - {key: app, operator: In, values: [alertmanager]} - - {key: alertmanager, operator: In, values: [{{ template "kube-prometheus-stack.fullname" . }}-alertmanager]} -+ - {key: alertmanager, operator: In, values: [{{ template "project-prometheus-stack.fullname" . }}-alertmanager]} ++ - {key: app.kubernetes.io/name, operator: In, values: [alertmanager]} ++ - {key: alertmanager, operator: In, values: [{{ template "project-prometheus-stack.alertmanager.crname" . }}]} {{- end }} {{- end }} tolerations: {{ include "linux-node-tolerations" . | nindent 4 }} +@@ -116,7 +128,7 @@ + {{- end }} + {{- if .Values.global.imagePullSecrets }} + imagePullSecrets: +-{{ toYaml .Values.global.imagePullSecrets | indent 4 }} ++{{ include "kube-prometheus-stack.imagePullSecrets" . | trim | indent 4 }} + {{- end }} + {{- if .Values.alertmanager.alertmanagerSpec.containers }} + containers: +@@ -147,5 +159,8 @@ + {{- end }} + {{- if .Values.alertmanager.alertmanagerSpec.forceEnableClusterMode }} + forceEnableClusterMode: {{ .Values.alertmanager.alertmanagerSpec.forceEnableClusterMode }} ++{{- end }} ++{{- if .Values.alertmanager.alertmanagerSpec.minReadySeconds }} ++ minReadySeconds: {{ .Values.alertmanager.alertmanagerSpec.minReadySeconds }} + {{- end }} + {{- end }} diff --git a/packages/rancher-project-monitoring/generated-changes/patch/templates/alertmanager/ingress.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/templates/alertmanager/ingress.yaml.patch index bce631c3..dc6afdce 100644 --- a/packages/rancher-project-monitoring/generated-changes/patch/templates/alertmanager/ingress.yaml.patch +++ b/packages/rancher-project-monitoring/generated-changes/patch/templates/alertmanager/ingress.yaml.patch @@ -4,8 +4,9 @@ {{- if and .Values.alertmanager.enabled .Values.alertmanager.ingress.enabled }} {{- $pathType := .Values.alertmanager.ingress.pathType | default "ImplementationSpecific" }} -{{- $serviceName := printf "%s-%s" (include "kube-prometheus-stack.fullname" .) "alertmanager" }} +-{{- $servicePort := .Values.alertmanager.service.port -}} +{{- $serviceName := printf "%s-%s" (include "project-prometheus-stack.fullname" .) "alertmanager" }} - {{- $servicePort := .Values.alertmanager.service.port -}} ++{{- $servicePort := .Values.alertmanager.ingress.servicePort | default .Values.alertmanager.service.port -}} {{- $routePrefix := list .Values.alertmanager.alertmanagerSpec.routePrefix }} {{- $paths := .Values.alertmanager.ingress.paths | default $routePrefix -}} -{{- $apiIsStable := eq (include "kube-prometheus-stack.ingress.isStable" .) "true" -}} diff --git a/packages/rancher-project-monitoring/generated-changes/patch/templates/alertmanager/podDisruptionBudget.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/templates/alertmanager/podDisruptionBudget.yaml.patch index fbbd7d8d..583d3a64 100644 --- a/packages/rancher-project-monitoring/generated-changes/patch/templates/alertmanager/podDisruptionBudget.yaml.patch +++ b/packages/rancher-project-monitoring/generated-changes/patch/templates/alertmanager/podDisruptionBudget.yaml.patch @@ -18,10 +18,12 @@ spec: {{- if .Values.alertmanager.podDisruptionBudget.minAvailable }} minAvailable: {{ .Values.alertmanager.podDisruptionBudget.minAvailable }} -@@ -17,5 +17,5 @@ +@@ -16,6 +16,6 @@ + {{- end }} selector: matchLabels: - app: alertmanager +- app: alertmanager - alertmanager: {{ template "kube-prometheus-stack.fullname" . }}-alertmanager -+ alertmanager: {{ template "project-prometheus-stack.fullname" . }}-alertmanager ++ app.kubernetes.io/name: alertmanager ++ alertmanager: {{ template "project-prometheus-stack.alertmanager.crname" . }} {{- end }} diff --git a/packages/rancher-project-monitoring/generated-changes/patch/templates/alertmanager/psp.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/templates/alertmanager/psp.yaml.patch index 8458acff..7b83d013 100644 --- a/packages/rancher-project-monitoring/generated-changes/patch/templates/alertmanager/psp.yaml.patch +++ b/packages/rancher-project-monitoring/generated-changes/patch/templates/alertmanager/psp.yaml.patch @@ -1,6 +1,6 @@ --- charts-original/templates/alertmanager/psp.yaml +++ charts/templates/alertmanager/psp.yaml -@@ -2,14 +2,14 @@ +@@ -2,22 +2,16 @@ apiVersion: policy/v1beta1 kind: PodSecurityPolicy metadata: @@ -17,4 +17,28 @@ +{{ include "project-prometheus-stack.labels" . | indent 4 }} spec: privileged: false - # Required to prevent escalations to root. +- # Required to prevent escalations to root. +- # allowPrivilegeEscalation: false +- # This is redundant with non-root + disallow privilege escalation, +- # but we can provide it for defense in depth. +- #requiredDropCapabilities: +- # - ALL + # Allow core volume types. + volumes: + - 'configMap' +@@ -38,13 +32,13 @@ + supplementalGroups: + rule: 'MustRunAs' + ranges: +- # Forbid adding the root group. ++ # Allow adding the root group. + - min: 0 + max: 65535 + fsGroup: + rule: 'MustRunAs' + ranges: +- # Forbid adding the root group. ++ # Allow adding the root group. + - min: 0 + max: 65535 + readOnlyRootFilesystem: false diff --git a/packages/rancher-project-monitoring/generated-changes/patch/templates/alertmanager/service.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/templates/alertmanager/service.yaml.patch index 72aa43e5..bc396f80 100644 --- a/packages/rancher-project-monitoring/generated-changes/patch/templates/alertmanager/service.yaml.patch +++ b/packages/rancher-project-monitoring/generated-changes/patch/templates/alertmanager/service.yaml.patch @@ -17,11 +17,23 @@ {{- if .Values.alertmanager.service.labels }} {{ toYaml .Values.alertmanager.service.labels | indent 4 }} {{- end }} -@@ -45,6 +45,6 @@ +@@ -32,6 +32,9 @@ + - {{ $cidr }} + {{- end }} + {{- end }} ++{{- if ne .Values.alertmanager.service.type "ClusterIP" }} ++ externalTrafficPolicy: {{ .Values.alertmanager.service.externalTrafficPolicy }} ++{{- end }} + ports: + - name: {{ .Values.alertmanager.alertmanagerSpec.portName }} + {{- if eq .Values.alertmanager.service.type "NodePort" }} +@@ -44,7 +47,7 @@ + {{ toYaml .Values.alertmanager.service.additionalPorts | indent 2 }} {{- end }} selector: - app: alertmanager +- app: alertmanager - alertmanager: {{ template "kube-prometheus-stack.fullname" . }}-alertmanager -+ alertmanager: {{ template "project-prometheus-stack.fullname" . }}-alertmanager ++ app.kubernetes.io/name: alertmanager ++ alertmanager: {{ template "project-prometheus-stack.alertmanager.crname" . }} type: "{{ .Values.alertmanager.service.type }}" {{- end }} diff --git a/packages/rancher-project-monitoring/generated-changes/patch/templates/alertmanager/serviceaccount.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/templates/alertmanager/serviceaccount.yaml.patch index 0c17c122..0d8ffafa 100644 --- a/packages/rancher-project-monitoring/generated-changes/patch/templates/alertmanager/serviceaccount.yaml.patch +++ b/packages/rancher-project-monitoring/generated-changes/patch/templates/alertmanager/serviceaccount.yaml.patch @@ -1,6 +1,6 @@ --- charts-original/templates/alertmanager/serviceaccount.yaml +++ charts/templates/alertmanager/serviceaccount.yaml -@@ -2,13 +2,13 @@ +@@ -2,19 +2,19 @@ apiVersion: v1 kind: ServiceAccount metadata: @@ -19,3 +19,10 @@ {{- if .Values.alertmanager.serviceAccount.annotations }} annotations: {{ toYaml .Values.alertmanager.serviceAccount.annotations | indent 4 }} + {{- end }} + {{- if .Values.global.imagePullSecrets }} + imagePullSecrets: +-{{ toYaml .Values.global.imagePullSecrets | indent 2 }} ++{{ include "kube-prometheus-stack.imagePullSecrets" . | trim | indent 2}} + {{- end }} + {{- end }} diff --git a/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/configmap-dashboards.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/configmap-dashboards.yaml.patch index 2af75a8f..2affe557 100644 --- a/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/configmap-dashboards.yaml.patch +++ b/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/configmap-dashboards.yaml.patch @@ -10,7 +10,8 @@ + namespace: {{ template "project-prometheus-stack.namespace" . }} labels: {{- if $.Values.grafana.sidecar.dashboards.label }} - {{ $.Values.grafana.sidecar.dashboards.label }}: "1" +- {{ $.Values.grafana.sidecar.dashboards.label }}: "1" ++ {{ $.Values.grafana.sidecar.dashboards.label }}: {{ ternary $.Values.grafana.sidecar.dashboards.labelValue "1" (not (empty $.Values.grafana.sidecar.dashboards.labelValue)) | quote }} {{- end }} - app: {{ template "kube-prometheus-stack.name" $ }}-grafana -{{ include "kube-prometheus-stack.labels" $ | indent 6 }} diff --git a/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/configmaps-datasources.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/configmaps-datasources.yaml.patch index 20f55641..c494defd 100644 --- a/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/configmaps-datasources.yaml.patch +++ b/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/configmaps-datasources.yaml.patch @@ -1,6 +1,6 @@ --- charts-original/templates/grafana/configmaps-datasources.yaml +++ charts/templates/grafana/configmaps-datasources.yaml -@@ -2,16 +2,16 @@ +@@ -2,43 +2,42 @@ apiVersion: v1 kind: ConfigMap metadata: @@ -21,7 +21,16 @@ data: datasource.yaml: |- apiVersion: 1 -@@ -23,23 +23,12 @@ ++{{- if .Values.grafana.deleteDatasources }} ++ deleteDatasources: ++{{ tpl (toYaml .Values.grafana.deleteDatasources | indent 6) . }} ++{{- end }} + datasources: + {{- $scrapeInterval := .Values.grafana.sidecar.datasources.defaultDatasourceScrapeInterval | default .Values.prometheus.prometheusSpec.scrapeInterval | default "30s" }} + {{- if .Values.grafana.sidecar.datasources.defaultDatasourceEnabled }} + - name: Prometheus + type: prometheus ++ uid: {{ .Values.grafana.sidecar.datasources.uid }} {{- if .Values.grafana.sidecar.datasources.url }} url: {{ .Values.grafana.sidecar.datasources.url }} {{- else }} @@ -42,7 +51,10 @@ - jsonData: - timeInterval: {{ $scrapeInterval }} -{{- end }} --{{- end }} ++{{- if .Values.grafana.sidecar.datasources.exemplarTraceIdDestinations }} ++ exemplarTraceIdDestinations: ++ - datasourceUid: {{ .Values.grafana.sidecar.datasources.exemplarTraceIdDestinations.datasourceUid }} ++ name: {{ .Values.grafana.sidecar.datasources.exemplarTraceIdDestinations.traceIdLabelName }} + {{- end }} {{- end }} {{- if .Values.grafana.additionalDataSources }} - {{ tpl (toYaml .Values.grafana.additionalDataSources | indent 4) . }} diff --git a/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/alertmanager-overview.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/alertmanager-overview.yaml.patch index fe5b7618..2533845b 100644 --- a/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/alertmanager-overview.yaml.patch +++ b/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/alertmanager-overview.yaml.patch @@ -21,7 +21,8 @@ {{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} labels: {{- if $.Values.grafana.sidecar.dashboards.label }} - {{ $.Values.grafana.sidecar.dashboards.label }}: "1" +- {{ $.Values.grafana.sidecar.dashboards.label }}: "1" ++ {{ $.Values.grafana.sidecar.dashboards.label }}: {{ ternary $.Values.grafana.sidecar.dashboards.labelValue "1" (not (empty $.Values.grafana.sidecar.dashboards.labelValue)) | quote }} {{- end }} - app: {{ template "kube-prometheus-stack.name" $ }}-grafana -{{ include "kube-prometheus-stack.labels" $ | indent 4 }} @@ -30,3 +31,130 @@ data: alertmanager-overview.json: |- { +@@ -55,6 +55,7 @@ + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", ++ "description": "current set of alerts stored in the Alertmanager", + "fill": 1, + "fillGradient": 0, + "gridPos": { +@@ -93,7 +94,7 @@ + "steppedLine": false, + "targets": [ + { +- "expr": "sum(alertmanager_alerts{namespace=\"$namespace\",service=\"$service\"}) by (namespace,service,instance)", ++ "expr": "sum(alertmanager_alerts{namespace=~\"$namespace\",service=~\"$service\"}) by (namespace,service,instance)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}instance{{`}}`}}", +@@ -148,6 +149,7 @@ + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", ++ "description": "rate of successful and invalid alerts received by the Alertmanager", + "fill": 1, + "fillGradient": 0, + "gridPos": { +@@ -186,14 +188,14 @@ + "steppedLine": false, + "targets": [ + { +- "expr": "sum(rate(alertmanager_alerts_received_total{namespace=\"$namespace\",service=\"$service\"}[5m])) by (namespace,service,instance)", ++ "expr": "sum(rate(alertmanager_alerts_received_total{namespace=~\"$namespace\",service=~\"$service\"}[$__rate_interval])) by (namespace,service,instance)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}instance{{`}}`}} Received", + "refId": "A" + }, + { +- "expr": "sum(rate(alertmanager_alerts_invalid_total{namespace=\"$namespace\",service=\"$service\"}[5m])) by (namespace,service,instance)", ++ "expr": "sum(rate(alertmanager_alerts_invalid_total{namespace=~\"$namespace\",service=~\"$service\"}[$__rate_interval])) by (namespace,service,instance)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}instance{{`}}`}} Invalid", +@@ -261,6 +263,7 @@ + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", ++ "description": "rate of successful and invalid notifications sent by the Alertmanager", + "fill": 1, + "fillGradient": 0, + "gridPos": { +@@ -298,14 +301,14 @@ + "steppedLine": false, + "targets": [ + { +- "expr": "sum(rate(alertmanager_notifications_total{namespace=\"$namespace\",service=\"$service\", integration=\"$integration\"}[5m])) by (integration,namespace,service,instance)", ++ "expr": "sum(rate(alertmanager_notifications_total{namespace=~\"$namespace\",service=~\"$service\", integration=\"$integration\"}[$__rate_interval])) by (integration,namespace,service,instance)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}instance{{`}}`}} Total", + "refId": "A" + }, + { +- "expr": "sum(rate(alertmanager_notifications_failed_total{namespace=\"$namespace\",service=\"$service\", integration=\"$integration\"}[5m])) by (integration,namespace,service,instance)", ++ "expr": "sum(rate(alertmanager_notifications_failed_total{namespace=~\"$namespace\",service=~\"$service\", integration=\"$integration\"}[$__rate_interval])) by (integration,namespace,service,instance)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}instance{{`}}`}} Failed", +@@ -360,6 +363,7 @@ + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", ++ "description": "latency of notifications sent by the Alertmanager", + "fill": 1, + "fillGradient": 0, + "gridPos": { +@@ -397,21 +401,21 @@ + "steppedLine": false, + "targets": [ + { +- "expr": "histogram_quantile(0.99,\n sum(rate(alertmanager_notification_latency_seconds_bucket{namespace=\"$namespace\",service=\"$service\", integration=\"$integration\"}[5m])) by (le,namespace,service,instance)\n) \n", ++ "expr": "histogram_quantile(0.99,\n sum(rate(alertmanager_notification_latency_seconds_bucket{namespace=~\"$namespace\",service=~\"$service\", integration=\"$integration\"}[$__rate_interval])) by (le,namespace,service,instance)\n) \n", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}instance{{`}}`}} 99th Percentile", + "refId": "A" + }, + { +- "expr": "histogram_quantile(0.50,\n sum(rate(alertmanager_notification_latency_seconds_bucket{namespace=\"$namespace\",service=\"$service\", integration=\"$integration\"}[5m])) by (le,namespace,service,instance)\n) \n", ++ "expr": "histogram_quantile(0.50,\n sum(rate(alertmanager_notification_latency_seconds_bucket{namespace=~\"$namespace\",service=~\"$service\", integration=\"$integration\"}[$__rate_interval])) by (le,namespace,service,instance)\n) \n", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}instance{{`}}`}} Median", + "refId": "B" + }, + { +- "expr": "sum(rate(alertmanager_notification_latency_seconds_sum{namespace=\"$namespace\",service=\"$service\", integration=\"$integration\"}[5m])) by (namespace,service,instance)\n/\nsum(rate(alertmanager_notification_latency_seconds_count{namespace=\"$namespace\",service=\"$service\", integration=\"$integration\"}[5m])) by (namespace,service,instance)\n", ++ "expr": "sum(rate(alertmanager_notification_latency_seconds_sum{namespace=~\"$namespace\",service=~\"$service\", integration=\"$integration\"}[$__rate_interval])) by (namespace,service,instance)\n/\nsum(rate(alertmanager_notification_latency_seconds_count{namespace=~\"$namespace\",service=~\"$service\", integration=\"$integration\"}[$__rate_interval])) by (namespace,service,instance)\n", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}instance{{`}}`}} Average", +@@ -481,7 +485,7 @@ + "value": "Prometheus" + }, + "hide": 0, +- "label": null, ++ "label": "Data Source", + "name": "datasource", + "options": [ + +@@ -500,7 +504,7 @@ + "datasource": "$datasource", + "hide": 0, + "includeAll": false, +- "label": null, ++ "label": "namespace", + "multi": false, + "name": "namespace", + "options": [ +@@ -527,7 +531,7 @@ + "datasource": "$datasource", + "hide": 0, + "includeAll": false, +- "label": null, ++ "label": "service", + "multi": false, + "name": "service", + "options": [ diff --git a/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/cluster-total.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/cluster-total.yaml.patch index eaee833d..5fb301ef 100644 --- a/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/cluster-total.yaml.patch +++ b/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/cluster-total.yaml.patch @@ -20,7 +20,8 @@ {{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} labels: {{- if $.Values.grafana.sidecar.dashboards.label }} - {{ $.Values.grafana.sidecar.dashboards.label }}: "1" +- {{ $.Values.grafana.sidecar.dashboards.label }}: "1" ++ {{ $.Values.grafana.sidecar.dashboards.label }}: {{ ternary $.Values.grafana.sidecar.dashboards.labelValue "1" (not (empty $.Values.grafana.sidecar.dashboards.labelValue)) | quote }} {{- end }} - app: {{ template "kube-prometheus-stack.name" $ }}-grafana -{{ include "kube-prometheus-stack.labels" $ | indent 4 }} @@ -408,6 +409,21 @@ } ], "repeat": null, +@@ -1803,11 +1593,11 @@ + }, + { + "current": { +- "text": "default", +- "value": "default" ++ "text": "Prometheus", ++ "value": "Prometheus" + }, + "hide": 0, +- "label": null, ++ "label": "Data Source", + "name": "datasource", + "options": [ + @@ -1816,32 +1606,6 @@ "refresh": 1, "regex": "", diff --git a/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-resources-namespace.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-resources-namespace.yaml.patch index 85b19023..1ca42665 100644 --- a/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-resources-namespace.yaml.patch +++ b/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-resources-namespace.yaml.patch @@ -20,7 +20,8 @@ {{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} labels: {{- if $.Values.grafana.sidecar.dashboards.label }} - {{ $.Values.grafana.sidecar.dashboards.label }}: "1" +- {{ $.Values.grafana.sidecar.dashboards.label }}: "1" ++ {{ $.Values.grafana.sidecar.dashboards.label }}: {{ ternary $.Values.grafana.sidecar.dashboards.labelValue "1" (not (empty $.Values.grafana.sidecar.dashboards.labelValue)) | quote }} {{- end }} - app: {{ template "kube-prometheus-stack.name" $ }}-grafana -{{ include "kube-prometheus-stack.labels" $ | indent 4 }} @@ -29,7 +30,22 @@ data: k8s-resources-namespace.json: |- { -@@ -78,7 +78,7 @@ +@@ -50,11 +50,14 @@ + "fill": 1, + "format": "percentunit", + "id": 1, ++ "interval": "1m", + "legend": { ++ "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, ++ "rightSide": true, + "show": true, + "total": false, + "values": false +@@ -78,7 +81,7 @@ "steppedLine": false, "targets": [ { @@ -38,7 +54,31 @@ "format": "time_series", "instant": true, "intervalFactor": 2, -@@ -162,7 +162,7 @@ +@@ -91,7 +94,7 @@ + "title": "CPU Utilisation (from requests)", + "tooltip": { + "shared": false, +- "sort": 0, ++ "sort": 2, + "value_type": "individual" + }, + "type": "singlestat", +@@ -134,11 +137,14 @@ + "fill": 1, + "format": "percentunit", + "id": 2, ++ "interval": "1m", + "legend": { ++ "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, ++ "rightSide": true, + "show": true, + "total": false, + "values": false +@@ -162,7 +168,7 @@ "steppedLine": false, "targets": [ { @@ -47,7 +87,31 @@ "format": "time_series", "instant": true, "intervalFactor": 2, -@@ -246,7 +246,7 @@ +@@ -175,7 +181,7 @@ + "title": "CPU Utilisation (from limits)", + "tooltip": { + "shared": false, +- "sort": 0, ++ "sort": 2, + "value_type": "individual" + }, + "type": "singlestat", +@@ -218,11 +224,14 @@ + "fill": 1, + "format": "percentunit", + "id": 3, ++ "interval": "1m", + "legend": { ++ "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, ++ "rightSide": true, + "show": true, + "total": false, + "values": false +@@ -246,7 +255,7 @@ "steppedLine": false, "targets": [ { @@ -56,7 +120,31 @@ "format": "time_series", "instant": true, "intervalFactor": 2, -@@ -330,7 +330,7 @@ +@@ -259,7 +268,7 @@ + "title": "Memory Utilisation (from requests)", + "tooltip": { + "shared": false, +- "sort": 0, ++ "sort": 2, + "value_type": "individual" + }, + "type": "singlestat", +@@ -302,11 +311,14 @@ + "fill": 1, + "format": "percentunit", + "id": 4, ++ "interval": "1m", + "legend": { ++ "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, ++ "rightSide": true, + "show": true, + "total": false, + "values": false +@@ -330,7 +342,7 @@ "steppedLine": false, "targets": [ { @@ -65,7 +153,31 @@ "format": "time_series", "instant": true, "intervalFactor": 2, -@@ -446,7 +446,7 @@ +@@ -343,7 +355,7 @@ + "title": "Memory Utilisation (from limits)", + "tooltip": { + "shared": false, +- "sort": 0, ++ "sort": 2, + "value_type": "individual" + }, + "type": "singlestat", +@@ -397,11 +409,14 @@ + "datasource": "$datasource", + "fill": 10, + "id": 5, ++ "interval": "1m", + "legend": { ++ "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, ++ "rightSide": true, + "show": true, + "total": false, + "values": false +@@ -446,7 +461,7 @@ "steppedLine": false, "targets": [ { @@ -74,7 +186,7 @@ "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}pod{{`}}`}}", -@@ -454,7 +454,7 @@ +@@ -454,7 +469,7 @@ "step": 10 }, { @@ -83,7 +195,7 @@ "format": "time_series", "intervalFactor": 2, "legendFormat": "quota - requests", -@@ -462,7 +462,7 @@ +@@ -462,7 +477,7 @@ "step": 10 }, { @@ -92,7 +204,40 @@ "format": "time_series", "intervalFactor": 2, "legendFormat": "quota - limits", -@@ -697,7 +697,7 @@ +@@ -478,7 +493,7 @@ + "title": "CPU Usage", + "tooltip": { + "shared": false, +- "sort": 0, ++ "sort": 2, + "value_type": "individual" + }, + "type": "graph", +@@ -532,11 +547,14 @@ + "datasource": "$datasource", + "fill": 1, + "id": 6, ++ "interval": "1m", + "legend": { ++ "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, ++ "rightSide": true, + "show": true, + "total": false, + "values": false +@@ -671,7 +689,7 @@ + "link": true, + "linkTargetBlank": false, + "linkTooltip": "Drill down", +- "linkUrl": "/d/6581e46e4e5c7ba40a07646395ef7b23/k8s-resources-pod?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$namespace&var-pod=$__cell", ++ "linkUrl": "d/6581e46e4e5c7ba40a07646395ef7b23/k8s-resources-pod?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$namespace&var-pod=$__cell", + "pattern": "pod", + "thresholds": [ + +@@ -697,7 +715,7 @@ ], "targets": [ { @@ -101,7 +246,7 @@ "format": "table", "instant": true, "intervalFactor": 2, -@@ -706,7 +706,7 @@ +@@ -706,7 +724,7 @@ "step": 10 }, { @@ -110,7 +255,7 @@ "format": "table", "instant": true, "intervalFactor": 2, -@@ -715,7 +715,7 @@ +@@ -715,7 +733,7 @@ "step": 10 }, { @@ -119,7 +264,7 @@ "format": "table", "instant": true, "intervalFactor": 2, -@@ -724,7 +724,7 @@ +@@ -724,7 +742,7 @@ "step": 10 }, { @@ -128,7 +273,7 @@ "format": "table", "instant": true, "intervalFactor": 2, -@@ -733,7 +733,7 @@ +@@ -733,7 +751,7 @@ "step": 10 }, { @@ -137,7 +282,31 @@ "format": "table", "instant": true, "intervalFactor": 2, -@@ -854,7 +854,7 @@ +@@ -750,7 +768,7 @@ + "title": "CPU Quota", + "tooltip": { + "shared": false, +- "sort": 0, ++ "sort": 2, + "value_type": "individual" + }, + "transform": "table", +@@ -805,11 +823,14 @@ + "datasource": "$datasource", + "fill": 10, + "id": 7, ++ "interval": "1m", + "legend": { ++ "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, ++ "rightSide": true, + "show": true, + "total": false, + "values": false +@@ -854,7 +875,7 @@ "steppedLine": false, "targets": [ { @@ -146,7 +315,7 @@ "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}pod{{`}}`}}", -@@ -862,7 +862,7 @@ +@@ -862,7 +883,7 @@ "step": 10 }, { @@ -155,7 +324,7 @@ "format": "time_series", "intervalFactor": 2, "legendFormat": "quota - requests", -@@ -870,7 +870,7 @@ +@@ -870,7 +891,7 @@ "step": 10 }, { @@ -164,7 +333,40 @@ "format": "time_series", "intervalFactor": 2, "legendFormat": "quota - limits", -@@ -1162,7 +1162,7 @@ +@@ -886,7 +907,7 @@ + "title": "Memory Usage (w/o cache)", + "tooltip": { + "shared": false, +- "sort": 0, ++ "sort": 2, + "value_type": "individual" + }, + "type": "graph", +@@ -940,11 +961,14 @@ + "datasource": "$datasource", + "fill": 1, + "id": 8, ++ "interval": "1m", + "legend": { ++ "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, ++ "rightSide": true, + "show": true, + "total": false, + "values": false +@@ -1136,7 +1160,7 @@ + "link": true, + "linkTargetBlank": false, + "linkTooltip": "Drill down", +- "linkUrl": "/d/6581e46e4e5c7ba40a07646395ef7b23/k8s-resources-pod?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$namespace&var-pod=$__cell", ++ "linkUrl": "d/6581e46e4e5c7ba40a07646395ef7b23/k8s-resources-pod?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$namespace&var-pod=$__cell", + "pattern": "pod", + "thresholds": [ + +@@ -1162,7 +1186,7 @@ ], "targets": [ { @@ -173,7 +375,7 @@ "format": "table", "instant": true, "intervalFactor": 2, -@@ -1171,7 +1171,7 @@ +@@ -1171,7 +1195,7 @@ "step": 10 }, { @@ -182,7 +384,7 @@ "format": "table", "instant": true, "intervalFactor": 2, -@@ -1180,7 +1180,7 @@ +@@ -1180,7 +1204,7 @@ "step": 10 }, { @@ -191,7 +393,7 @@ "format": "table", "instant": true, "intervalFactor": 2, -@@ -1189,7 +1189,7 @@ +@@ -1189,7 +1213,7 @@ "step": 10 }, { @@ -200,7 +402,7 @@ "format": "table", "instant": true, "intervalFactor": 2, -@@ -1198,7 +1198,7 @@ +@@ -1198,7 +1222,7 @@ "step": 10 }, { @@ -209,7 +411,7 @@ "format": "table", "instant": true, "intervalFactor": 2, -@@ -1207,7 +1207,7 @@ +@@ -1207,7 +1231,7 @@ "step": 10 }, { @@ -218,7 +420,7 @@ "format": "table", "instant": true, "intervalFactor": 2, -@@ -1216,7 +1216,7 @@ +@@ -1216,7 +1240,7 @@ "step": 10 }, { @@ -227,7 +429,7 @@ "format": "table", "instant": true, "intervalFactor": 2, -@@ -1225,7 +1225,7 @@ +@@ -1225,7 +1249,7 @@ "step": 10 }, { @@ -236,187 +438,467 @@ "format": "table", "instant": true, "intervalFactor": 2, -@@ -1482,7 +1482,7 @@ +@@ -1242,7 +1266,7 @@ + "title": "Memory Quota", + "tooltip": { + "shared": false, +- "sort": 0, ++ "sort": 2, + "value_type": "individual" + }, + "transform": "table", +@@ -1299,10 +1323,12 @@ + "id": 9, + "interval": "1m", + "legend": { ++ "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, ++ "rightSide": true, + "show": true, + "total": false, + "values": false +@@ -1456,7 +1482,7 @@ + "link": true, + "linkTargetBlank": false, + "linkTooltip": "Drill down to pods", +- "linkUrl": "/d/6581e46e4e5c7ba40a07646395ef7b23/k8s-resources-pod?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$namespace&var-pod=$__cell", ++ "linkUrl": "d/6581e46e4e5c7ba40a07646395ef7b23/k8s-resources-pod?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$namespace&var-pod=$__cell", + "pattern": "pod", + "thresholds": [ + +@@ -1482,7 +1508,7 @@ ], "targets": [ { - "expr": "sum(irate(container_network_receive_bytes_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__rate_interval])) by (pod)", -+ "expr": "sum(irate(container_network_receive_bytes_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)", ++ "expr": "sum(irate(container_network_receive_bytes_total{namespace=\"$namespace\"}[$__rate_interval])) by (pod)", "format": "table", "instant": true, "intervalFactor": 2, -@@ -1491,7 +1491,7 @@ +@@ -1491,7 +1517,7 @@ "step": 10 }, { - "expr": "sum(irate(container_network_transmit_bytes_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__rate_interval])) by (pod)", -+ "expr": "sum(irate(container_network_transmit_bytes_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)", ++ "expr": "sum(irate(container_network_transmit_bytes_total{namespace=\"$namespace\"}[$__rate_interval])) by (pod)", "format": "table", "instant": true, "intervalFactor": 2, -@@ -1500,7 +1500,7 @@ +@@ -1500,7 +1526,7 @@ "step": 10 }, { - "expr": "sum(irate(container_network_receive_packets_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__rate_interval])) by (pod)", -+ "expr": "sum(irate(container_network_receive_packets_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)", ++ "expr": "sum(irate(container_network_receive_packets_total{namespace=\"$namespace\"}[$__rate_interval])) by (pod)", "format": "table", "instant": true, "intervalFactor": 2, -@@ -1509,7 +1509,7 @@ +@@ -1509,7 +1535,7 @@ "step": 10 }, { - "expr": "sum(irate(container_network_transmit_packets_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__rate_interval])) by (pod)", -+ "expr": "sum(irate(container_network_transmit_packets_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)", ++ "expr": "sum(irate(container_network_transmit_packets_total{namespace=\"$namespace\"}[$__rate_interval])) by (pod)", "format": "table", "instant": true, "intervalFactor": 2, -@@ -1518,7 +1518,7 @@ +@@ -1518,7 +1544,7 @@ "step": 10 }, { - "expr": "sum(irate(container_network_receive_packets_dropped_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__rate_interval])) by (pod)", -+ "expr": "sum(irate(container_network_receive_packets_dropped_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)", ++ "expr": "sum(irate(container_network_receive_packets_dropped_total{namespace=\"$namespace\"}[$__rate_interval])) by (pod)", "format": "table", "instant": true, "intervalFactor": 2, -@@ -1527,7 +1527,7 @@ +@@ -1527,7 +1553,7 @@ "step": 10 }, { - "expr": "sum(irate(container_network_transmit_packets_dropped_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__rate_interval])) by (pod)", -+ "expr": "sum(irate(container_network_transmit_packets_dropped_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)", ++ "expr": "sum(irate(container_network_transmit_packets_dropped_total{namespace=\"$namespace\"}[$__rate_interval])) by (pod)", "format": "table", "instant": true, "intervalFactor": 2, -@@ -1627,7 +1627,7 @@ +@@ -1544,7 +1570,7 @@ + "title": "Current Network Usage", + "tooltip": { + "shared": false, +- "sort": 0, ++ "sort": 2, + "value_type": "individual" + }, + "transform": "table", +@@ -1599,11 +1625,14 @@ + "datasource": "$datasource", + "fill": 10, + "id": 10, ++ "interval": "1m", + "legend": { ++ "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, ++ "rightSide": true, + "show": true, + "total": false, + "values": false +@@ -1627,7 +1656,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum(irate(container_network_receive_bytes_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__rate_interval])) by (pod)", -+ "expr": "sum(irate(container_network_receive_bytes_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)", ++ "expr": "sum(irate(container_network_receive_bytes_total{namespace=\"$namespace\"}[$__rate_interval])) by (pod)", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}pod{{`}}`}}", -@@ -1713,7 +1713,7 @@ +@@ -1643,7 +1672,7 @@ + "title": "Receive Bandwidth", + "tooltip": { + "shared": false, +- "sort": 0, ++ "sort": 2, + "value_type": "individual" + }, + "type": "graph", +@@ -1685,11 +1714,14 @@ + "datasource": "$datasource", + "fill": 10, + "id": 11, ++ "interval": "1m", + "legend": { ++ "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, ++ "rightSide": true, + "show": true, + "total": false, + "values": false +@@ -1713,7 +1745,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum(irate(container_network_transmit_bytes_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__rate_interval])) by (pod)", -+ "expr": "sum(irate(container_network_transmit_bytes_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)", ++ "expr": "sum(irate(container_network_transmit_bytes_total{namespace=\"$namespace\"}[$__rate_interval])) by (pod)", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}pod{{`}}`}}", -@@ -1811,7 +1811,7 @@ +@@ -1729,7 +1761,7 @@ + "title": "Transmit Bandwidth", + "tooltip": { + "shared": false, +- "sort": 0, ++ "sort": 2, + "value_type": "individual" + }, + "type": "graph", +@@ -1783,11 +1815,14 @@ + "datasource": "$datasource", + "fill": 10, + "id": 12, ++ "interval": "1m", + "legend": { ++ "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, ++ "rightSide": true, + "show": true, + "total": false, + "values": false +@@ -1811,7 +1846,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum(irate(container_network_receive_packets_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__rate_interval])) by (pod)", -+ "expr": "sum(irate(container_network_receive_packets_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)", ++ "expr": "sum(irate(container_network_receive_packets_total{namespace=\"$namespace\"}[$__rate_interval])) by (pod)", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}pod{{`}}`}}", -@@ -1897,7 +1897,7 @@ +@@ -1827,7 +1862,7 @@ + "title": "Rate of Received Packets", + "tooltip": { + "shared": false, +- "sort": 0, ++ "sort": 2, + "value_type": "individual" + }, + "type": "graph", +@@ -1869,11 +1904,14 @@ + "datasource": "$datasource", + "fill": 10, + "id": 13, ++ "interval": "1m", + "legend": { ++ "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, ++ "rightSide": true, + "show": true, + "total": false, + "values": false +@@ -1897,7 +1935,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum(irate(container_network_transmit_packets_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__rate_interval])) by (pod)", -+ "expr": "sum(irate(container_network_transmit_packets_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)", ++ "expr": "sum(irate(container_network_transmit_packets_total{namespace=\"$namespace\"}[$__rate_interval])) by (pod)", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}pod{{`}}`}}", -@@ -1995,7 +1995,7 @@ +@@ -1913,7 +1951,7 @@ + "title": "Rate of Transmitted Packets", + "tooltip": { + "shared": false, +- "sort": 0, ++ "sort": 2, + "value_type": "individual" + }, + "type": "graph", +@@ -1967,11 +2005,14 @@ + "datasource": "$datasource", + "fill": 10, + "id": 14, ++ "interval": "1m", + "legend": { ++ "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, ++ "rightSide": true, + "show": true, + "total": false, + "values": false +@@ -1995,7 +2036,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum(irate(container_network_receive_packets_dropped_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__rate_interval])) by (pod)", -+ "expr": "sum(irate(container_network_receive_packets_dropped_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)", ++ "expr": "sum(irate(container_network_receive_packets_dropped_total{namespace=\"$namespace\"}[$__rate_interval])) by (pod)", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}pod{{`}}`}}", -@@ -2081,7 +2081,7 @@ +@@ -2011,7 +2052,7 @@ + "title": "Rate of Received Packets Dropped", + "tooltip": { + "shared": false, +- "sort": 0, ++ "sort": 2, + "value_type": "individual" + }, + "type": "graph", +@@ -2053,11 +2094,14 @@ + "datasource": "$datasource", + "fill": 10, + "id": 15, ++ "interval": "1m", + "legend": { ++ "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, ++ "rightSide": true, + "show": true, + "total": false, + "values": false +@@ -2081,7 +2125,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum(irate(container_network_transmit_packets_dropped_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__rate_interval])) by (pod)", -+ "expr": "sum(irate(container_network_transmit_packets_dropped_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)", ++ "expr": "sum(irate(container_network_transmit_packets_dropped_total{namespace=\"$namespace\"}[$__rate_interval])) by (pod)", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}pod{{`}}`}}", -@@ -2180,7 +2180,7 @@ +@@ -2097,7 +2141,7 @@ + "title": "Rate of Transmitted Packets Dropped", + "tooltip": { + "shared": false, +- "sort": 0, ++ "sort": 2, + "value_type": "individual" + }, + "type": "graph", +@@ -2152,11 +2196,14 @@ + "decimals": -1, + "fill": 10, + "id": 16, ++ "interval": "1m", + "legend": { ++ "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, ++ "rightSide": true, + "show": true, + "total": false, + "values": false +@@ -2180,7 +2227,7 @@ "steppedLine": false, "targets": [ { - "expr": "ceil(sum by(pod) (rate(container_fs_reads_total{container!=\"\", cluster=\"$cluster\",namespace=~\"$namespace\"}[5m]) + rate(container_fs_writes_total{container!=\"\", cluster=\"$cluster\",namespace=~\"$namespace\"}[5m])))", -+ "expr": "ceil(sum by(pod) (rate(container_fs_reads_total{container!=\"\",namespace=~\"$namespace\"}[5m]) + rate(container_fs_writes_total{container!=\"\",namespace=~\"$namespace\"}[5m])))", ++ "expr": "ceil(sum by(pod) (rate(container_fs_reads_total{container!=\"\", device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", namespace=\"$namespace\"}[$__rate_interval]) + rate(container_fs_writes_total{container!=\"\", device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", namespace=\"$namespace\"}[$__rate_interval])))", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}pod{{`}}`}}", -@@ -2266,7 +2266,7 @@ +@@ -2196,7 +2243,7 @@ + "title": "IOPS(Reads+Writes)", + "tooltip": { + "shared": false, +- "sort": 0, ++ "sort": 2, + "value_type": "individual" + }, + "type": "graph", +@@ -2238,11 +2285,14 @@ + "datasource": "$datasource", + "fill": 10, + "id": 17, ++ "interval": "1m", + "legend": { ++ "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, ++ "rightSide": true, + "show": true, + "total": false, + "values": false +@@ -2266,7 +2316,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum by(pod) (rate(container_fs_reads_bytes_total{container!=\"\", cluster=\"$cluster\",namespace=~\"$namespace\"}[5m]) + rate(container_fs_writes_bytes_total{container!=\"\", cluster=\"$cluster\",namespace=~\"$namespace\"}[5m]))", -+ "expr": "sum by(pod) (rate(container_fs_reads_bytes_total{container!=\"\",namespace=~\"$namespace\"}[5m]) + rate(container_fs_writes_bytes_total{container!=\"\",namespace=~\"$namespace\"}[5m]))", ++ "expr": "sum by(pod) (rate(container_fs_reads_bytes_total{container!=\"\", device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", namespace=\"$namespace\"}[$__rate_interval]) + rate(container_fs_writes_bytes_total{container!=\"\", device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", namespace=\"$namespace\"}[$__rate_interval]))", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}pod{{`}}`}}", -@@ -2524,7 +2524,7 @@ +@@ -2282,7 +2332,7 @@ + "title": "ThroughPut(Read+Write)", + "tooltip": { + "shared": false, +- "sort": 0, ++ "sort": 2, + "value_type": "individual" + }, + "type": "graph", +@@ -2336,11 +2386,14 @@ + "datasource": "$datasource", + "fill": 1, + "id": 18, ++ "interval": "1m", + "legend": { ++ "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, ++ "rightSide": true, + "show": true, + "total": false, + "values": false +@@ -2498,7 +2551,7 @@ + "link": true, + "linkTargetBlank": false, + "linkTooltip": "Drill down to pods", +- "linkUrl": "/d/6581e46e4e5c7ba40a07646395ef7b23/k8s-resources-pod?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$namespace&var-pod=$__cell", ++ "linkUrl": "d/6581e46e4e5c7ba40a07646395ef7b23/k8s-resources-pod?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$namespace&var-pod=$__cell", + "pattern": "pod", + "thresholds": [ + +@@ -2524,7 +2577,7 @@ ], "targets": [ { - "expr": "sum by(pod) (rate(container_fs_reads_total{container!=\"\", cluster=\"$cluster\",namespace=~\"$namespace\"}[5m]))", -+ "expr": "sum by(pod) (rate(container_fs_reads_total{container!=\"\",namespace=~\"$namespace\"}[5m]))", ++ "expr": "sum by(pod) (rate(container_fs_reads_total{device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", container!=\"\",namespace=\"$namespace\"}[$__rate_interval]))", "format": "table", "instant": true, "intervalFactor": 2, -@@ -2533,7 +2533,7 @@ +@@ -2533,7 +2586,7 @@ "step": 10 }, { - "expr": "sum by(pod) (rate(container_fs_writes_total{container!=\"\", cluster=\"$cluster\",namespace=~\"$namespace\"}[5m]))", -+ "expr": "sum by(pod) (rate(container_fs_writes_total{container!=\"\",namespace=~\"$namespace\"}[5m]))", ++ "expr": "sum by(pod) (rate(container_fs_writes_total{device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", container!=\"\",namespace=\"$namespace\"}[$__rate_interval]))", "format": "table", "instant": true, "intervalFactor": 2, -@@ -2542,7 +2542,7 @@ +@@ -2542,7 +2595,7 @@ "step": 10 }, { - "expr": "sum by(pod) (rate(container_fs_reads_total{container!=\"\", cluster=\"$cluster\",namespace=~\"$namespace\"}[5m]) + rate(container_fs_writes_total{container!=\"\", cluster=\"$cluster\",namespace=~\"$namespace\"}[5m]))", -+ "expr": "sum by(pod) (rate(container_fs_reads_total{container!=\"\",namespace=~\"$namespace\"}[5m]) + rate(container_fs_writes_total{container!=\"\",namespace=~\"$namespace\"}[5m]))", ++ "expr": "sum by(pod) (rate(container_fs_reads_total{device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", container!=\"\",namespace=\"$namespace\"}[$__rate_interval]) + rate(container_fs_writes_total{device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", container!=\"\",namespace=\"$namespace\"}[$__rate_interval]))", "format": "table", "instant": true, "intervalFactor": 2, -@@ -2551,7 +2551,7 @@ +@@ -2551,7 +2604,7 @@ "step": 10 }, { - "expr": "sum by(pod) (rate(container_fs_reads_bytes_total{container!=\"\", cluster=\"$cluster\",namespace=~\"$namespace\"}[5m]))", -+ "expr": "sum by(pod) (rate(container_fs_reads_bytes_total{container!=\"\",namespace=~\"$namespace\"}[5m]))", ++ "expr": "sum by(pod) (rate(container_fs_reads_bytes_total{device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", container!=\"\",namespace=\"$namespace\"}[$__rate_interval]))", "format": "table", "instant": true, "intervalFactor": 2, -@@ -2560,7 +2560,7 @@ +@@ -2560,7 +2613,7 @@ "step": 10 }, { - "expr": "sum by(pod) (rate(container_fs_writes_bytes_total{container!=\"\", cluster=\"$cluster\",namespace=~\"$namespace\"}[5m]))", -+ "expr": "sum by(pod) (rate(container_fs_writes_bytes_total{container!=\"\",namespace=~\"$namespace\"}[5m]))", ++ "expr": "sum by(pod) (rate(container_fs_writes_bytes_total{device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", container!=\"\",namespace=\"$namespace\"}[$__rate_interval]))", "format": "table", "instant": true, "intervalFactor": 2, -@@ -2569,7 +2569,7 @@ +@@ -2569,7 +2622,7 @@ "step": 10 }, { - "expr": "sum by(pod) (rate(container_fs_reads_bytes_total{container!=\"\", cluster=\"$cluster\",namespace=~\"$namespace\"}[5m]) + rate(container_fs_writes_bytes_total{container!=\"\", cluster=\"$cluster\",namespace=~\"$namespace\"}[5m]))", -+ "expr": "sum by(pod) (rate(container_fs_reads_bytes_total{container!=\"\",namespace=~\"$namespace\"}[5m]) + rate(container_fs_writes_bytes_total{container!=\"\",namespace=~\"$namespace\"}[5m]))", ++ "expr": "sum by(pod) (rate(container_fs_reads_bytes_total{device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", container!=\"\",namespace=\"$namespace\"}[$__rate_interval]) + rate(container_fs_writes_bytes_total{device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", container!=\"\",namespace=\"$namespace\"}[$__rate_interval]))", "format": "table", "instant": true, "intervalFactor": 2, -@@ -2658,33 +2658,6 @@ +@@ -2586,7 +2639,7 @@ + "title": "Current Storage IO", + "tooltip": { + "shared": false, +- "sort": 0, ++ "sort": 2, + "value_type": "individual" + }, + "transform": "table", +@@ -2637,11 +2690,11 @@ + "list": [ + { + "current": { +- "text": "default", +- "value": "default" ++ "text": "Prometheus", ++ "value": "Prometheus" + }, + "hide": 0, +- "label": null, ++ "label": "Data Source", + "name": "datasource", + "options": [ + +@@ -2658,33 +2711,6 @@ "value": "" }, "datasource": "$datasource", @@ -450,7 +932,7 @@ "hide": 0, "includeAll": false, "label": null, -@@ -2693,7 +2666,7 @@ +@@ -2693,7 +2719,7 @@ "options": [ ], diff --git a/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-resources-node.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-resources-node.yaml.patch index 89817b93..e6730dc7 100644 --- a/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-resources-node.yaml.patch +++ b/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-resources-node.yaml.patch @@ -20,7 +20,8 @@ {{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} labels: {{- if $.Values.grafana.sidecar.dashboards.label }} - {{ $.Values.grafana.sidecar.dashboards.label }}: "1" +- {{ $.Values.grafana.sidecar.dashboards.label }}: "1" ++ {{ $.Values.grafana.sidecar.dashboards.label }}: {{ ternary $.Values.grafana.sidecar.dashboards.labelValue "1" (not (empty $.Values.grafana.sidecar.dashboards.labelValue)) | quote }} {{- end }} - app: {{ template "kube-prometheus-stack.name" $ }}-grafana -{{ include "kube-prometheus-stack.labels" $ | indent 4 }} @@ -29,7 +30,22 @@ data: k8s-resources-node.json: |- { -@@ -77,7 +77,7 @@ +@@ -49,11 +49,14 @@ + "datasource": "$datasource", + "fill": 10, + "id": 1, ++ "interval": "1m", + "legend": { ++ "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, ++ "rightSide": true, + "show": true, + "total": false, + "values": false +@@ -77,7 +80,7 @@ "steppedLine": false, "targets": [ { @@ -38,7 +54,31 @@ "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}pod{{`}}`}}", -@@ -312,7 +312,7 @@ +@@ -93,7 +96,7 @@ + "title": "CPU Usage", + "tooltip": { + "shared": false, +- "sort": 0, ++ "sort": 2, + "value_type": "individual" + }, + "type": "graph", +@@ -147,11 +150,14 @@ + "datasource": "$datasource", + "fill": 1, + "id": 2, ++ "interval": "1m", + "legend": { ++ "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, ++ "rightSide": true, + "show": true, + "total": false, + "values": false +@@ -312,7 +318,7 @@ ], "targets": [ { @@ -47,7 +87,7 @@ "format": "table", "instant": true, "intervalFactor": 2, -@@ -321,7 +321,7 @@ +@@ -321,7 +327,7 @@ "step": 10 }, { @@ -56,7 +96,7 @@ "format": "table", "instant": true, "intervalFactor": 2, -@@ -330,7 +330,7 @@ +@@ -330,7 +336,7 @@ "step": 10 }, { @@ -65,7 +105,7 @@ "format": "table", "instant": true, "intervalFactor": 2, -@@ -339,7 +339,7 @@ +@@ -339,7 +345,7 @@ "step": 10 }, { @@ -74,7 +114,7 @@ "format": "table", "instant": true, "intervalFactor": 2, -@@ -348,7 +348,7 @@ +@@ -348,7 +354,7 @@ "step": 10 }, { @@ -83,7 +123,31 @@ "format": "table", "instant": true, "intervalFactor": 2, -@@ -448,7 +448,7 @@ +@@ -365,7 +371,7 @@ + "title": "CPU Quota", + "tooltip": { + "shared": false, +- "sort": 0, ++ "sort": 2, + "value_type": "individual" + }, + "transform": "table", +@@ -420,11 +426,14 @@ + "datasource": "$datasource", + "fill": 10, + "id": 3, ++ "interval": "1m", + "legend": { ++ "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, ++ "rightSide": true, + "show": true, + "total": false, + "values": false +@@ -448,7 +457,7 @@ "steppedLine": false, "targets": [ { @@ -92,7 +156,31 @@ "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}pod{{`}}`}}", -@@ -740,7 +740,7 @@ +@@ -464,7 +473,7 @@ + "title": "Memory Usage (w/o cache)", + "tooltip": { + "shared": false, +- "sort": 0, ++ "sort": 2, + "value_type": "individual" + }, + "type": "graph", +@@ -518,11 +527,14 @@ + "datasource": "$datasource", + "fill": 1, + "id": 4, ++ "interval": "1m", + "legend": { ++ "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, ++ "rightSide": true, + "show": true, + "total": false, + "values": false +@@ -740,7 +752,7 @@ ], "targets": [ { @@ -101,7 +189,7 @@ "format": "table", "instant": true, "intervalFactor": 2, -@@ -749,7 +749,7 @@ +@@ -749,7 +761,7 @@ "step": 10 }, { @@ -110,7 +198,7 @@ "format": "table", "instant": true, "intervalFactor": 2, -@@ -758,7 +758,7 @@ +@@ -758,7 +770,7 @@ "step": 10 }, { @@ -119,7 +207,7 @@ "format": "table", "instant": true, "intervalFactor": 2, -@@ -767,7 +767,7 @@ +@@ -767,7 +779,7 @@ "step": 10 }, { @@ -128,7 +216,7 @@ "format": "table", "instant": true, "intervalFactor": 2, -@@ -776,7 +776,7 @@ +@@ -776,7 +788,7 @@ "step": 10 }, { @@ -137,7 +225,7 @@ "format": "table", "instant": true, "intervalFactor": 2, -@@ -785,7 +785,7 @@ +@@ -785,7 +797,7 @@ "step": 10 }, { @@ -146,7 +234,7 @@ "format": "table", "instant": true, "intervalFactor": 2, -@@ -794,7 +794,7 @@ +@@ -794,7 +806,7 @@ "step": 10 }, { @@ -155,7 +243,7 @@ "format": "table", "instant": true, "intervalFactor": 2, -@@ -803,7 +803,7 @@ +@@ -803,7 +815,7 @@ "step": 10 }, { @@ -164,7 +252,31 @@ "format": "table", "instant": true, "intervalFactor": 2, -@@ -892,33 +892,6 @@ +@@ -820,7 +832,7 @@ + "title": "Memory Quota", + "tooltip": { + "shared": false, +- "sort": 0, ++ "sort": 2, + "value_type": "individual" + }, + "transform": "table", +@@ -871,11 +883,11 @@ + "list": [ + { + "current": { +- "text": "default", +- "value": "default" ++ "text": "Prometheus", ++ "value": "Prometheus" + }, + "hide": 0, +- "label": null, ++ "label": "Data Source", + "name": "datasource", + "options": [ + +@@ -892,33 +904,6 @@ "value": "" }, "datasource": "$datasource", @@ -198,7 +310,7 @@ "hide": 0, "includeAll": false, "label": null, -@@ -927,7 +900,7 @@ +@@ -927,7 +912,7 @@ "options": [ ], diff --git a/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-resources-pod.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-resources-pod.yaml.patch index 8daa2023..45b7ddd4 100644 --- a/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-resources-pod.yaml.patch +++ b/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-resources-pod.yaml.patch @@ -20,7 +20,8 @@ {{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} labels: {{- if $.Values.grafana.sidecar.dashboards.label }} - {{ $.Values.grafana.sidecar.dashboards.label }}: "1" +- {{ $.Values.grafana.sidecar.dashboards.label }}: "1" ++ {{ $.Values.grafana.sidecar.dashboards.label }}: {{ ternary $.Values.grafana.sidecar.dashboards.labelValue "1" (not (empty $.Values.grafana.sidecar.dashboards.labelValue)) | quote }} {{- end }} - app: {{ template "kube-prometheus-stack.name" $ }}-grafana -{{ include "kube-prometheus-stack.labels" $ | indent 4 }} @@ -29,7 +30,22 @@ data: k8s-resources-pod.json: |- { -@@ -94,7 +94,7 @@ +@@ -49,11 +49,14 @@ + "datasource": "$datasource", + "fill": 10, + "id": 1, ++ "interval": "1m", + "legend": { ++ "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, ++ "rightSide": true, + "show": true, + "total": false, + "values": false +@@ -94,7 +97,7 @@ "steppedLine": false, "targets": [ { @@ -38,7 +54,7 @@ "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}container{{`}}`}}", -@@ -102,7 +102,7 @@ +@@ -102,7 +105,7 @@ "step": 10 }, { @@ -47,7 +63,7 @@ "format": "time_series", "intervalFactor": 2, "legendFormat": "requests", -@@ -110,7 +110,7 @@ +@@ -110,7 +113,7 @@ "step": 10 }, { @@ -56,16 +72,64 @@ "format": "time_series", "intervalFactor": 2, "legendFormat": "limits", -@@ -208,7 +208,7 @@ +@@ -126,7 +129,7 @@ + "title": "CPU Usage", + "tooltip": { + "shared": false, +- "sort": 0, ++ "sort": 2, + "value_type": "individual" + }, + "type": "graph", +@@ -180,11 +183,14 @@ + "datasource": "$datasource", + "fill": 10, + "id": 2, ++ "interval": "1m", + "legend": { ++ "alignAsTable": true, + "avg": false, + "current": true, + "max": true, + "min": false, ++ "rightSide": true, + "show": true, + "total": false, + "values": false +@@ -208,7 +214,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum(increase(container_cpu_cfs_throttled_periods_total{namespace=\"$namespace\", pod=\"$pod\", container!=\"\", cluster=\"$cluster\"}[5m])) by (container) /sum(increase(container_cpu_cfs_periods_total{namespace=\"$namespace\", pod=\"$pod\", container!=\"\", cluster=\"$cluster\"}[5m])) by (container)", -+ "expr": "sum(increase(container_cpu_cfs_throttled_periods_total{namespace=\"$namespace\", pod=\"$pod\", container!=\"\"}[5m])) by (container) /sum(increase(container_cpu_cfs_periods_total{namespace=\"$namespace\", pod=\"$pod\", container!=\"\"}[5m])) by (container)", ++ "expr": "sum(increase(container_cpu_cfs_throttled_periods_total{namespace=\"$namespace\", pod=\"$pod\", container!=\"\"}[$__rate_interval])) by (container) /sum(increase(container_cpu_cfs_periods_total{namespace=\"$namespace\", pod=\"$pod\", container!=\"\"}[$__rate_interval])) by (container)", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}container{{`}}`}}", -@@ -450,7 +450,7 @@ +@@ -231,7 +237,7 @@ + "title": "CPU Throttling", + "tooltip": { + "shared": false, +- "sort": 0, ++ "sort": 2, + "value_type": "individual" + }, + "type": "graph", +@@ -285,11 +291,14 @@ + "datasource": "$datasource", + "fill": 1, + "id": 3, ++ "interval": "1m", + "legend": { ++ "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, ++ "rightSide": true, + "show": true, + "total": false, + "values": false +@@ -450,7 +459,7 @@ ], "targets": [ { @@ -74,7 +138,7 @@ "format": "table", "instant": true, "intervalFactor": 2, -@@ -459,7 +459,7 @@ +@@ -459,7 +468,7 @@ "step": 10 }, { @@ -83,7 +147,7 @@ "format": "table", "instant": true, "intervalFactor": 2, -@@ -468,7 +468,7 @@ +@@ -468,7 +477,7 @@ "step": 10 }, { @@ -92,7 +156,7 @@ "format": "table", "instant": true, "intervalFactor": 2, -@@ -477,7 +477,7 @@ +@@ -477,7 +486,7 @@ "step": 10 }, { @@ -101,7 +165,7 @@ "format": "table", "instant": true, "intervalFactor": 2, -@@ -486,7 +486,7 @@ +@@ -486,7 +495,7 @@ "step": 10 }, { @@ -110,7 +174,31 @@ "format": "table", "instant": true, "intervalFactor": 2, -@@ -605,7 +605,7 @@ +@@ -503,7 +512,7 @@ + "title": "CPU Quota", + "tooltip": { + "shared": false, +- "sort": 0, ++ "sort": 2, + "value_type": "individual" + }, + "transform": "table", +@@ -558,11 +567,14 @@ + "datasource": "$datasource", + "fill": 10, + "id": 4, ++ "interval": "1m", + "legend": { ++ "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, ++ "rightSide": true, + "show": true, + "total": false, + "values": false +@@ -605,7 +617,7 @@ "steppedLine": false, "targets": [ { @@ -119,7 +207,7 @@ "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}container{{`}}`}}", -@@ -613,7 +613,7 @@ +@@ -613,7 +625,7 @@ "step": 10 }, { @@ -128,7 +216,7 @@ "format": "time_series", "intervalFactor": 2, "legendFormat": "requests", -@@ -621,7 +621,7 @@ +@@ -621,7 +633,7 @@ "step": 10 }, { @@ -137,7 +225,31 @@ "format": "time_series", "intervalFactor": 2, "legendFormat": "limits", -@@ -913,7 +913,7 @@ +@@ -637,7 +649,7 @@ + "title": "Memory Usage (WSS)", + "tooltip": { + "shared": false, +- "sort": 0, ++ "sort": 2, + "value_type": "individual" + }, + "type": "graph", +@@ -691,11 +703,14 @@ + "datasource": "$datasource", + "fill": 1, + "id": 5, ++ "interval": "1m", + "legend": { ++ "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, ++ "rightSide": true, + "show": true, + "total": false, + "values": false +@@ -913,7 +928,7 @@ ], "targets": [ { @@ -146,7 +258,7 @@ "format": "table", "instant": true, "intervalFactor": 2, -@@ -922,7 +922,7 @@ +@@ -922,7 +937,7 @@ "step": 10 }, { @@ -155,7 +267,7 @@ "format": "table", "instant": true, "intervalFactor": 2, -@@ -931,7 +931,7 @@ +@@ -931,7 +946,7 @@ "step": 10 }, { @@ -164,7 +276,7 @@ "format": "table", "instant": true, "intervalFactor": 2, -@@ -940,7 +940,7 @@ +@@ -940,7 +955,7 @@ "step": 10 }, { @@ -173,7 +285,7 @@ "format": "table", "instant": true, "intervalFactor": 2, -@@ -949,7 +949,7 @@ +@@ -949,7 +964,7 @@ "step": 10 }, { @@ -182,7 +294,7 @@ "format": "table", "instant": true, "intervalFactor": 2, -@@ -958,7 +958,7 @@ +@@ -958,7 +973,7 @@ "step": 10 }, { @@ -191,7 +303,7 @@ "format": "table", "instant": true, "intervalFactor": 2, -@@ -967,7 +967,7 @@ +@@ -967,7 +982,7 @@ "step": 10 }, { @@ -200,7 +312,7 @@ "format": "table", "instant": true, "intervalFactor": 2, -@@ -976,7 +976,7 @@ +@@ -976,7 +991,7 @@ "step": 10 }, { @@ -209,169 +321,445 @@ "format": "table", "instant": true, "intervalFactor": 2, -@@ -1077,7 +1077,7 @@ +@@ -993,7 +1008,7 @@ + "title": "Memory Quota", + "tooltip": { + "shared": false, +- "sort": 0, ++ "sort": 2, + "value_type": "individual" + }, + "transform": "table", +@@ -1050,10 +1065,12 @@ + "id": 6, + "interval": "1m", + "legend": { ++ "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, ++ "rightSide": true, + "show": true, + "total": false, + "values": false +@@ -1077,7 +1094,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum(irate(container_network_receive_bytes_total{cluster=\"$cluster\", namespace=~\"$namespace\", pod=~\"$pod\"}[$__rate_interval])) by (pod)", -+ "expr": "sum(irate(container_network_receive_bytes_total{namespace=~\"$namespace\", pod=~\"$pod\"}[$__rate_interval])) by (pod)", ++ "expr": "sum(irate(container_network_receive_bytes_total{namespace=\"$namespace\", pod=~\"$pod\"}[$__rate_interval])) by (pod)", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}pod{{`}}`}}", -@@ -1164,7 +1164,7 @@ +@@ -1093,7 +1110,7 @@ + "title": "Receive Bandwidth", + "tooltip": { + "shared": false, +- "sort": 0, ++ "sort": 2, + "value_type": "individual" + }, + "type": "graph", +@@ -1137,10 +1154,12 @@ + "id": 7, + "interval": "1m", + "legend": { ++ "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, ++ "rightSide": true, + "show": true, + "total": false, + "values": false +@@ -1164,7 +1183,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum(irate(container_network_transmit_bytes_total{cluster=\"$cluster\", namespace=~\"$namespace\", pod=~\"$pod\"}[$__rate_interval])) by (pod)", -+ "expr": "sum(irate(container_network_transmit_bytes_total{namespace=~\"$namespace\", pod=~\"$pod\"}[$__rate_interval])) by (pod)", ++ "expr": "sum(irate(container_network_transmit_bytes_total{namespace=\"$namespace\", pod=~\"$pod\"}[$__rate_interval])) by (pod)", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}pod{{`}}`}}", -@@ -1263,7 +1263,7 @@ +@@ -1180,7 +1199,7 @@ + "title": "Transmit Bandwidth", + "tooltip": { + "shared": false, +- "sort": 0, ++ "sort": 2, + "value_type": "individual" + }, + "type": "graph", +@@ -1236,10 +1255,12 @@ + "id": 8, + "interval": "1m", + "legend": { ++ "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, ++ "rightSide": true, + "show": true, + "total": false, + "values": false +@@ -1263,7 +1284,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum(irate(container_network_receive_packets_total{cluster=\"$cluster\", namespace=~\"$namespace\", pod=~\"$pod\"}[$__rate_interval])) by (pod)", -+ "expr": "sum(irate(container_network_receive_packets_total{namespace=~\"$namespace\", pod=~\"$pod\"}[$__rate_interval])) by (pod)", ++ "expr": "sum(irate(container_network_receive_packets_total{namespace=\"$namespace\", pod=~\"$pod\"}[$__rate_interval])) by (pod)", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}pod{{`}}`}}", -@@ -1350,7 +1350,7 @@ +@@ -1279,7 +1300,7 @@ + "title": "Rate of Received Packets", + "tooltip": { + "shared": false, +- "sort": 0, ++ "sort": 2, + "value_type": "individual" + }, + "type": "graph", +@@ -1323,10 +1344,12 @@ + "id": 9, + "interval": "1m", + "legend": { ++ "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, ++ "rightSide": true, + "show": true, + "total": false, + "values": false +@@ -1350,7 +1373,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum(irate(container_network_transmit_packets_total{cluster=\"$cluster\", namespace=~\"$namespace\", pod=~\"$pod\"}[$__rate_interval])) by (pod)", -+ "expr": "sum(irate(container_network_transmit_packets_total{namespace=~\"$namespace\", pod=~\"$pod\"}[$__rate_interval])) by (pod)", ++ "expr": "sum(irate(container_network_transmit_packets_total{namespace=\"$namespace\", pod=~\"$pod\"}[$__rate_interval])) by (pod)", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}pod{{`}}`}}", -@@ -1449,7 +1449,7 @@ +@@ -1366,7 +1389,7 @@ + "title": "Rate of Transmitted Packets", + "tooltip": { + "shared": false, +- "sort": 0, ++ "sort": 2, + "value_type": "individual" + }, + "type": "graph", +@@ -1422,10 +1445,12 @@ + "id": 10, + "interval": "1m", + "legend": { ++ "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, ++ "rightSide": true, + "show": true, + "total": false, + "values": false +@@ -1449,7 +1474,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum(irate(container_network_receive_packets_dropped_total{cluster=\"$cluster\", namespace=~\"$namespace\", pod=~\"$pod\"}[$__rate_interval])) by (pod)", -+ "expr": "sum(irate(container_network_receive_packets_dropped_total{namespace=~\"$namespace\", pod=~\"$pod\"}[$__rate_interval])) by (pod)", ++ "expr": "sum(irate(container_network_receive_packets_dropped_total{namespace=\"$namespace\", pod=~\"$pod\"}[$__rate_interval])) by (pod)", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}pod{{`}}`}}", -@@ -1536,7 +1536,7 @@ +@@ -1465,7 +1490,7 @@ + "title": "Rate of Received Packets Dropped", + "tooltip": { + "shared": false, +- "sort": 0, ++ "sort": 2, + "value_type": "individual" + }, + "type": "graph", +@@ -1509,10 +1534,12 @@ + "id": 11, + "interval": "1m", + "legend": { ++ "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, ++ "rightSide": true, + "show": true, + "total": false, + "values": false +@@ -1536,7 +1563,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum(irate(container_network_transmit_packets_dropped_total{cluster=\"$cluster\", namespace=~\"$namespace\", pod=~\"$pod\"}[$__rate_interval])) by (pod)", -+ "expr": "sum(irate(container_network_transmit_packets_dropped_total{namespace=~\"$namespace\", pod=~\"$pod\"}[$__rate_interval])) by (pod)", ++ "expr": "sum(irate(container_network_transmit_packets_dropped_total{namespace=\"$namespace\", pod=~\"$pod\"}[$__rate_interval])) by (pod)", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}pod{{`}}`}}", -@@ -1635,7 +1635,7 @@ +@@ -1552,7 +1579,7 @@ + "title": "Rate of Transmitted Packets Dropped", + "tooltip": { + "shared": false, +- "sort": 0, ++ "sort": 2, + "value_type": "individual" + }, + "type": "graph", +@@ -1607,11 +1634,14 @@ + "decimals": -1, + "fill": 10, + "id": 12, ++ "interval": "1m", + "legend": { ++ "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, ++ "rightSide": true, + "show": true, + "total": false, + "values": false +@@ -1635,7 +1665,7 @@ "steppedLine": false, "targets": [ { - "expr": "ceil(sum by(pod) (rate(container_fs_reads_total{container!=\"\", cluster=\"$cluster\",namespace=~\"$namespace\", pod=~\"$pod\"}[5m])))", -+ "expr": "ceil(sum by(pod) (rate(container_fs_reads_total{container!=\"\",namespace=~\"$namespace\", pod=~\"$pod\"}[5m])))", ++ "expr": "ceil(sum by(pod) (rate(container_fs_reads_total{device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", container!=\"\", namespace=\"$namespace\", pod=~\"$pod\"}[$__rate_interval])))", "format": "time_series", "intervalFactor": 2, "legendFormat": "Reads", -@@ -1643,7 +1643,7 @@ +@@ -1643,7 +1673,7 @@ "step": 10 }, { - "expr": "ceil(sum by(pod) (rate(container_fs_writes_total{container!=\"\", cluster=\"$cluster\",namespace=~\"$namespace\", pod=~\"$pod\"}[5m])))", -+ "expr": "ceil(sum by(pod) (rate(container_fs_writes_total{container!=\"\",namespace=~\"$namespace\", pod=~\"$pod\"}[5m])))", ++ "expr": "ceil(sum by(pod) (rate(container_fs_writes_total{device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", container!=\"\", namespace=\"$namespace\", pod=~\"$pod\"}[$__rate_interval])))", "format": "time_series", "intervalFactor": 2, "legendFormat": "Writes", -@@ -1729,7 +1729,7 @@ +@@ -1659,7 +1689,7 @@ + "title": "IOPS", + "tooltip": { + "shared": false, +- "sort": 0, ++ "sort": 2, + "value_type": "individual" + }, + "type": "graph", +@@ -1701,11 +1731,14 @@ + "datasource": "$datasource", + "fill": 10, + "id": 13, ++ "interval": "1m", + "legend": { ++ "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, ++ "rightSide": true, + "show": true, + "total": false, + "values": false +@@ -1729,7 +1762,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum by(pod) (rate(container_fs_reads_bytes_total{container!=\"\", cluster=\"$cluster\",namespace=~\"$namespace\", pod=~\"$pod\"}[5m]))", -+ "expr": "sum by(pod) (rate(container_fs_reads_bytes_total{container!=\"\",namespace=~\"$namespace\", pod=~\"$pod\"}[5m]))", ++ "expr": "sum by(pod) (rate(container_fs_reads_bytes_total{device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", container!=\"\", namespace=\"$namespace\", pod=~\"$pod\"}[$__rate_interval]))", "format": "time_series", "intervalFactor": 2, "legendFormat": "Reads", -@@ -1737,7 +1737,7 @@ +@@ -1737,7 +1770,7 @@ "step": 10 }, { - "expr": "sum by(pod) (rate(container_fs_writes_bytes_total{container!=\"\", cluster=\"$cluster\",namespace=~\"$namespace\", pod=~\"$pod\"}[5m]))", -+ "expr": "sum by(pod) (rate(container_fs_writes_bytes_total{container!=\"\",namespace=~\"$namespace\", pod=~\"$pod\"}[5m]))", ++ "expr": "sum by(pod) (rate(container_fs_writes_bytes_total{device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", container!=\"\", namespace=\"$namespace\", pod=~\"$pod\"}[$__rate_interval]))", "format": "time_series", "intervalFactor": 2, "legendFormat": "Writes", -@@ -1836,7 +1836,7 @@ +@@ -1753,7 +1786,7 @@ + "title": "ThroughPut", + "tooltip": { + "shared": false, +- "sort": 0, ++ "sort": 2, + "value_type": "individual" + }, + "type": "graph", +@@ -1808,11 +1841,14 @@ + "decimals": -1, + "fill": 10, + "id": 14, ++ "interval": "1m", + "legend": { ++ "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, ++ "rightSide": true, + "show": true, + "total": false, + "values": false +@@ -1836,7 +1872,7 @@ "steppedLine": false, "targets": [ { - "expr": "ceil(sum by(container) (rate(container_fs_reads_total{container!=\"\", cluster=\"$cluster\",namespace=~\"$namespace\", pod=\"$pod\"}[5m]) + rate(container_fs_writes_total{container!=\"\", cluster=\"$cluster\",namespace=~\"$namespace\", pod=\"$pod\"}[5m])))", -+ "expr": "ceil(sum by(container) (rate(container_fs_reads_total{container!=\"\",namespace=~\"$namespace\", pod=\"$pod\"}[5m]) + rate(container_fs_writes_total{container!=\"\",namespace=~\"$namespace\", pod=\"$pod\"}[5m])))", ++ "expr": "ceil(sum by(container) (rate(container_fs_reads_total{container!=\"\", namespace=\"$namespace\", pod=\"$pod\"}[$__rate_interval]) + rate(container_fs_writes_total{container!=\"\", namespace=\"$namespace\", pod=\"$pod\"}[$__rate_interval])))", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}container{{`}}`}}", -@@ -1922,7 +1922,7 @@ +@@ -1852,7 +1888,7 @@ + "title": "IOPS(Reads+Writes)", + "tooltip": { + "shared": false, +- "sort": 0, ++ "sort": 2, + "value_type": "individual" + }, + "type": "graph", +@@ -1894,11 +1930,14 @@ + "datasource": "$datasource", + "fill": 10, + "id": 15, ++ "interval": "1m", + "legend": { ++ "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, ++ "rightSide": true, + "show": true, + "total": false, + "values": false +@@ -1922,7 +1961,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum by(container) (rate(container_fs_reads_bytes_total{container!=\"\", cluster=\"$cluster\",namespace=~\"$namespace\", pod=\"$pod\"}[5m]) + rate(container_fs_writes_bytes_total{container!=\"\", cluster=\"$cluster\",namespace=~\"$namespace\", pod=\"$pod\"}[5m]))", -+ "expr": "sum by(container) (rate(container_fs_reads_bytes_total{container!=\"\",namespace=~\"$namespace\", pod=\"$pod\"}[5m]) + rate(container_fs_writes_bytes_total{container!=\"\",namespace=~\"$namespace\", pod=\"$pod\"}[5m]))", ++ "expr": "sum by(container) (rate(container_fs_reads_bytes_total{container!=\"\", namespace=\"$namespace\", pod=\"$pod\"}[$__rate_interval]) + rate(container_fs_writes_bytes_total{container!=\"\", namespace=\"$namespace\", pod=\"$pod\"}[$__rate_interval]))", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}container{{`}}`}}", -@@ -2180,7 +2180,7 @@ +@@ -1938,7 +1977,7 @@ + "title": "ThroughPut(Read+Write)", + "tooltip": { + "shared": false, +- "sort": 0, ++ "sort": 2, + "value_type": "individual" + }, + "type": "graph", +@@ -1992,11 +2031,14 @@ + "datasource": "$datasource", + "fill": 1, + "id": 16, ++ "interval": "1m", + "legend": { ++ "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, ++ "rightSide": true, + "show": true, + "total": false, + "values": false +@@ -2180,7 +2222,7 @@ ], "targets": [ { - "expr": "sum by(container) (rate(container_fs_reads_total{container!=\"\", cluster=\"$cluster\",namespace=~\"$namespace\", pod=\"$pod\"}[5m]))", -+ "expr": "sum by(container) (rate(container_fs_reads_total{container!=\"\",namespace=~\"$namespace\", pod=\"$pod\"}[5m]))", ++ "expr": "sum by(container) (rate(container_fs_reads_total{device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", container!=\"\", namespace=\"$namespace\", pod=\"$pod\"}[$__rate_interval]))", "format": "table", "instant": true, "intervalFactor": 2, -@@ -2189,7 +2189,7 @@ +@@ -2189,7 +2231,7 @@ "step": 10 }, { - "expr": "sum by(container) (rate(container_fs_writes_total{container!=\"\", cluster=\"$cluster\",namespace=~\"$namespace\", pod=\"$pod\"}[5m]))", -+ "expr": "sum by(container) (rate(container_fs_writes_total{container!=\"\",namespace=~\"$namespace\", pod=\"$pod\"}[5m]))", ++ "expr": "sum by(container) (rate(container_fs_writes_total{device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", container!=\"\", namespace=\"$namespace\", pod=\"$pod\"}[$__rate_interval]))", "format": "table", "instant": true, "intervalFactor": 2, -@@ -2198,7 +2198,7 @@ +@@ -2198,7 +2240,7 @@ "step": 10 }, { - "expr": "sum by(container) (rate(container_fs_reads_total{container!=\"\", cluster=\"$cluster\",namespace=~\"$namespace\", pod=\"$pod\"}[5m]) + rate(container_fs_writes_total{container!=\"\", cluster=\"$cluster\",namespace=~\"$namespace\", pod=\"$pod\"}[5m]))", -+ "expr": "sum by(container) (rate(container_fs_reads_total{container!=\"\",namespace=~\"$namespace\", pod=\"$pod\"}[5m]) + rate(container_fs_writes_total{container!=\"\",namespace=~\"$namespace\", pod=\"$pod\"}[5m]))", ++ "expr": "sum by(container) (rate(container_fs_reads_total{device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", container!=\"\", namespace=\"$namespace\", pod=\"$pod\"}[$__rate_interval]) + rate(container_fs_writes_total{container!=\"\", namespace=\"$namespace\", pod=\"$pod\"}[$__rate_interval]))", "format": "table", "instant": true, "intervalFactor": 2, -@@ -2207,7 +2207,7 @@ +@@ -2207,7 +2249,7 @@ "step": 10 }, { - "expr": "sum by(container) (rate(container_fs_reads_bytes_total{container!=\"\", cluster=\"$cluster\",namespace=~\"$namespace\", pod=\"$pod\"}[5m]))", -+ "expr": "sum by(container) (rate(container_fs_reads_bytes_total{container!=\"\",namespace=~\"$namespace\", pod=\"$pod\"}[5m]))", ++ "expr": "sum by(container) (rate(container_fs_reads_bytes_total{device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", container!=\"\", namespace=\"$namespace\", pod=\"$pod\"}[$__rate_interval]))", "format": "table", "instant": true, "intervalFactor": 2, -@@ -2216,7 +2216,7 @@ +@@ -2216,7 +2258,7 @@ "step": 10 }, { - "expr": "sum by(container) (rate(container_fs_writes_bytes_total{container!=\"\", cluster=\"$cluster\",namespace=~\"$namespace\", pod=\"$pod\"}[5m]))", -+ "expr": "sum by(container) (rate(container_fs_writes_bytes_total{container!=\"\",namespace=~\"$namespace\", pod=\"$pod\"}[5m]))", ++ "expr": "sum by(container) (rate(container_fs_writes_bytes_total{device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", container!=\"\", namespace=\"$namespace\", pod=\"$pod\"}[$__rate_interval]))", "format": "table", "instant": true, "intervalFactor": 2, -@@ -2225,7 +2225,7 @@ +@@ -2225,7 +2267,7 @@ "step": 10 }, { - "expr": "sum by(container) (rate(container_fs_reads_bytes_total{container!=\"\", cluster=\"$cluster\",namespace=~\"$namespace\", pod=\"$pod\"}[5m]) + rate(container_fs_writes_bytes_total{container!=\"\", cluster=\"$cluster\",namespace=~\"$namespace\", pod=\"$pod\"}[5m]))", -+ "expr": "sum by(container) (rate(container_fs_reads_bytes_total{container!=\"\",namespace=~\"$namespace\", pod=\"$pod\"}[5m]) + rate(container_fs_writes_bytes_total{container!=\"\",namespace=~\"$namespace\", pod=\"$pod\"}[5m]))", ++ "expr": "sum by(container) (rate(container_fs_reads_bytes_total{device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", container!=\"\", namespace=\"$namespace\", pod=\"$pod\"}[$__rate_interval]) + rate(container_fs_writes_bytes_total{container!=\"\", namespace=\"$namespace\", pod=\"$pod\"}[$__rate_interval]))", "format": "table", "instant": true, "intervalFactor": 2, -@@ -2314,33 +2314,6 @@ +@@ -2242,7 +2284,7 @@ + "title": "Current Storage IO", + "tooltip": { + "shared": false, +- "sort": 0, ++ "sort": 2, + "value_type": "individual" + }, + "transform": "table", +@@ -2293,11 +2335,11 @@ + "list": [ + { + "current": { +- "text": "default", +- "value": "default" ++ "text": "Prometheus", ++ "value": "Prometheus" + }, + "hide": 0, +- "label": null, ++ "label": "Data Source", + "name": "datasource", + "options": [ + +@@ -2314,33 +2356,6 @@ "value": "" }, "datasource": "$datasource", @@ -405,7 +793,7 @@ "hide": 0, "includeAll": false, "label": null, -@@ -2349,7 +2322,7 @@ +@@ -2349,7 +2364,7 @@ "options": [ ], @@ -414,7 +802,7 @@ "refresh": 2, "regex": "", "sort": 1, -@@ -2376,7 +2349,7 @@ +@@ -2376,7 +2391,7 @@ "options": [ ], diff --git a/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-resources-workload.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-resources-workload.yaml.patch index ebcd9ece..e989c366 100644 --- a/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-resources-workload.yaml.patch +++ b/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-resources-workload.yaml.patch @@ -20,7 +20,8 @@ {{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} labels: {{- if $.Values.grafana.sidecar.dashboards.label }} - {{ $.Values.grafana.sidecar.dashboards.label }}: "1" +- {{ $.Values.grafana.sidecar.dashboards.label }}: "1" ++ {{ $.Values.grafana.sidecar.dashboards.label }}: {{ ternary $.Values.grafana.sidecar.dashboards.labelValue "1" (not (empty $.Values.grafana.sidecar.dashboards.labelValue)) | quote }} {{- end }} - app: {{ template "kube-prometheus-stack.name" $ }}-grafana -{{ include "kube-prometheus-stack.labels" $ | indent 4 }} @@ -29,7 +30,22 @@ data: k8s-resources-workload.json: |- { -@@ -77,7 +77,7 @@ +@@ -49,11 +49,14 @@ + "datasource": "$datasource", + "fill": 10, + "id": 1, ++ "interval": "1m", + "legend": { ++ "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, ++ "rightSide": true, + "show": true, + "total": false, + "values": false +@@ -77,7 +80,7 @@ "steppedLine": false, "targets": [ { @@ -38,7 +54,40 @@ "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}pod{{`}}`}}", -@@ -312,7 +312,7 @@ +@@ -93,7 +96,7 @@ + "title": "CPU Usage", + "tooltip": { + "shared": false, +- "sort": 0, ++ "sort": 2, + "value_type": "individual" + }, + "type": "graph", +@@ -147,11 +150,14 @@ + "datasource": "$datasource", + "fill": 1, + "id": 2, ++ "interval": "1m", + "legend": { ++ "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, ++ "rightSide": true, + "show": true, + "total": false, + "values": false +@@ -286,7 +292,7 @@ + "link": true, + "linkTargetBlank": false, + "linkTooltip": "Drill down", +- "linkUrl": "/d/6581e46e4e5c7ba40a07646395ef7b23/k8s-resources-pod?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$namespace&var-pod=$__cell", ++ "linkUrl": "d/6581e46e4e5c7ba40a07646395ef7b23/k8s-resources-pod?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$namespace&var-pod=$__cell", + "pattern": "pod", + "thresholds": [ + +@@ -312,7 +318,7 @@ ], "targets": [ { @@ -47,7 +96,7 @@ "format": "table", "instant": true, "intervalFactor": 2, -@@ -321,7 +321,7 @@ +@@ -321,7 +327,7 @@ "step": 10 }, { @@ -56,7 +105,7 @@ "format": "table", "instant": true, "intervalFactor": 2, -@@ -330,7 +330,7 @@ +@@ -330,7 +336,7 @@ "step": 10 }, { @@ -65,7 +114,7 @@ "format": "table", "instant": true, "intervalFactor": 2, -@@ -339,7 +339,7 @@ +@@ -339,7 +345,7 @@ "step": 10 }, { @@ -74,7 +123,7 @@ "format": "table", "instant": true, "intervalFactor": 2, -@@ -348,7 +348,7 @@ +@@ -348,7 +354,7 @@ "step": 10 }, { @@ -83,7 +132,31 @@ "format": "table", "instant": true, "intervalFactor": 2, -@@ -448,7 +448,7 @@ +@@ -365,7 +371,7 @@ + "title": "CPU Quota", + "tooltip": { + "shared": false, +- "sort": 0, ++ "sort": 2, + "value_type": "individual" + }, + "transform": "table", +@@ -420,11 +426,14 @@ + "datasource": "$datasource", + "fill": 10, + "id": 3, ++ "interval": "1m", + "legend": { ++ "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, ++ "rightSide": true, + "show": true, + "total": false, + "values": false +@@ -448,7 +457,7 @@ "steppedLine": false, "targets": [ { @@ -92,7 +165,40 @@ "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}pod{{`}}`}}", -@@ -683,7 +683,7 @@ +@@ -464,7 +473,7 @@ + "title": "Memory Usage", + "tooltip": { + "shared": false, +- "sort": 0, ++ "sort": 2, + "value_type": "individual" + }, + "type": "graph", +@@ -518,11 +527,14 @@ + "datasource": "$datasource", + "fill": 1, + "id": 4, ++ "interval": "1m", + "legend": { ++ "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, ++ "rightSide": true, + "show": true, + "total": false, + "values": false +@@ -657,7 +669,7 @@ + "link": true, + "linkTargetBlank": false, + "linkTooltip": "Drill down", +- "linkUrl": "/d/6581e46e4e5c7ba40a07646395ef7b23/k8s-resources-pod?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$namespace&var-pod=$__cell", ++ "linkUrl": "d/6581e46e4e5c7ba40a07646395ef7b23/k8s-resources-pod?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$namespace&var-pod=$__cell", + "pattern": "pod", + "thresholds": [ + +@@ -683,7 +695,7 @@ ], "targets": [ { @@ -101,7 +207,7 @@ "format": "table", "instant": true, "intervalFactor": 2, -@@ -692,7 +692,7 @@ +@@ -692,7 +704,7 @@ "step": 10 }, { @@ -110,7 +216,7 @@ "format": "table", "instant": true, "intervalFactor": 2, -@@ -701,7 +701,7 @@ +@@ -701,7 +713,7 @@ "step": 10 }, { @@ -119,7 +225,7 @@ "format": "table", "instant": true, "intervalFactor": 2, -@@ -710,7 +710,7 @@ +@@ -710,7 +722,7 @@ "step": 10 }, { @@ -128,7 +234,7 @@ "format": "table", "instant": true, "intervalFactor": 2, -@@ -719,7 +719,7 @@ +@@ -719,7 +731,7 @@ "step": 10 }, { @@ -137,133 +243,380 @@ "format": "table", "instant": true, "intervalFactor": 2, -@@ -976,7 +976,7 @@ +@@ -736,7 +748,7 @@ + "title": "Memory Quota", + "tooltip": { + "shared": false, +- "sort": 0, ++ "sort": 2, + "value_type": "individual" + }, + "transform": "table", +@@ -793,10 +805,12 @@ + "id": 5, + "interval": "1m", + "legend": { ++ "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, ++ "rightSide": true, + "show": true, + "total": false, + "values": false +@@ -950,7 +964,7 @@ + "link": true, + "linkTargetBlank": false, + "linkTooltip": "Drill down", +- "linkUrl": "/d/6581e46e4e5c7ba40a07646395ef7b23/k8s-resources-pod?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$namespace&var-pod=$__cell", ++ "linkUrl": "d/6581e46e4e5c7ba40a07646395ef7b23/k8s-resources-pod?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$namespace&var-pod=$__cell", + "pattern": "pod", + "thresholds": [ + +@@ -976,7 +990,7 @@ ], "targets": [ { - "expr": "(sum(irate(container_network_receive_bytes_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=~\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", -+ "expr": "(sum(irate(container_network_receive_bytes_total{namespace=~\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=~\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", ++ "expr": "(sum(irate(container_network_receive_bytes_total{namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", "format": "table", "instant": true, "intervalFactor": 2, -@@ -985,7 +985,7 @@ +@@ -985,7 +999,7 @@ "step": 10 }, { - "expr": "(sum(irate(container_network_transmit_bytes_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=~\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", -+ "expr": "(sum(irate(container_network_transmit_bytes_total{namespace=~\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=~\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", ++ "expr": "(sum(irate(container_network_transmit_bytes_total{namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", "format": "table", "instant": true, "intervalFactor": 2, -@@ -994,7 +994,7 @@ +@@ -994,7 +1008,7 @@ "step": 10 }, { - "expr": "(sum(irate(container_network_receive_packets_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=~\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", -+ "expr": "(sum(irate(container_network_receive_packets_total{namespace=~\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=~\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", ++ "expr": "(sum(irate(container_network_receive_packets_total{namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", "format": "table", "instant": true, "intervalFactor": 2, -@@ -1003,7 +1003,7 @@ +@@ -1003,7 +1017,7 @@ "step": 10 }, { - "expr": "(sum(irate(container_network_transmit_packets_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=~\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", -+ "expr": "(sum(irate(container_network_transmit_packets_total{namespace=~\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=~\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", ++ "expr": "(sum(irate(container_network_transmit_packets_total{namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", "format": "table", "instant": true, "intervalFactor": 2, -@@ -1012,7 +1012,7 @@ +@@ -1012,7 +1026,7 @@ "step": 10 }, { - "expr": "(sum(irate(container_network_receive_packets_dropped_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=~\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", -+ "expr": "(sum(irate(container_network_receive_packets_dropped_total{namespace=~\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=~\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", ++ "expr": "(sum(irate(container_network_receive_packets_dropped_total{namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", "format": "table", "instant": true, "intervalFactor": 2, -@@ -1021,7 +1021,7 @@ +@@ -1021,7 +1035,7 @@ "step": 10 }, { - "expr": "(sum(irate(container_network_transmit_packets_dropped_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=~\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", -+ "expr": "(sum(irate(container_network_transmit_packets_dropped_total{namespace=~\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=~\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", ++ "expr": "(sum(irate(container_network_transmit_packets_dropped_total{namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", "format": "table", "instant": true, "intervalFactor": 2, -@@ -1121,7 +1121,7 @@ +@@ -1038,7 +1052,7 @@ + "title": "Current Network Usage", + "tooltip": { + "shared": false, +- "sort": 0, ++ "sort": 2, + "value_type": "individual" + }, + "transform": "table", +@@ -1093,11 +1107,14 @@ + "datasource": "$datasource", + "fill": 10, + "id": 6, ++ "interval": "1m", + "legend": { ++ "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, ++ "rightSide": true, + "show": true, + "total": false, + "values": false +@@ -1121,7 +1138,7 @@ "steppedLine": false, "targets": [ { - "expr": "(sum(irate(container_network_receive_bytes_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=~\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", -+ "expr": "(sum(irate(container_network_receive_bytes_total{namespace=~\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=~\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", ++ "expr": "(sum(irate(container_network_receive_bytes_total{namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}pod{{`}}`}}", -@@ -1207,7 +1207,7 @@ +@@ -1137,7 +1154,7 @@ + "title": "Receive Bandwidth", + "tooltip": { + "shared": false, +- "sort": 0, ++ "sort": 2, + "value_type": "individual" + }, + "type": "graph", +@@ -1179,11 +1196,14 @@ + "datasource": "$datasource", + "fill": 10, + "id": 7, ++ "interval": "1m", + "legend": { ++ "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, ++ "rightSide": true, + "show": true, + "total": false, + "values": false +@@ -1207,7 +1227,7 @@ "steppedLine": false, "targets": [ { - "expr": "(sum(irate(container_network_transmit_bytes_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=~\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", -+ "expr": "(sum(irate(container_network_transmit_bytes_total{namespace=~\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=~\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", ++ "expr": "(sum(irate(container_network_transmit_bytes_total{namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}pod{{`}}`}}", -@@ -1305,7 +1305,7 @@ +@@ -1223,7 +1243,7 @@ + "title": "Transmit Bandwidth", + "tooltip": { + "shared": false, +- "sort": 0, ++ "sort": 2, + "value_type": "individual" + }, + "type": "graph", +@@ -1277,11 +1297,14 @@ + "datasource": "$datasource", + "fill": 10, + "id": 8, ++ "interval": "1m", + "legend": { ++ "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, ++ "rightSide": true, + "show": true, + "total": false, + "values": false +@@ -1305,7 +1328,7 @@ "steppedLine": false, "targets": [ { - "expr": "(avg(irate(container_network_receive_bytes_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=~\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", -+ "expr": "(avg(irate(container_network_receive_bytes_total{namespace=~\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=~\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", ++ "expr": "(avg(irate(container_network_receive_bytes_total{namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}pod{{`}}`}}", -@@ -1391,7 +1391,7 @@ +@@ -1321,7 +1344,7 @@ + "title": "Average Container Bandwidth by Pod: Received", + "tooltip": { + "shared": false, +- "sort": 0, ++ "sort": 2, + "value_type": "individual" + }, + "type": "graph", +@@ -1363,11 +1386,14 @@ + "datasource": "$datasource", + "fill": 10, + "id": 9, ++ "interval": "1m", + "legend": { ++ "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, ++ "rightSide": true, + "show": true, + "total": false, + "values": false +@@ -1391,7 +1417,7 @@ "steppedLine": false, "targets": [ { - "expr": "(avg(irate(container_network_transmit_bytes_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=~\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", -+ "expr": "(avg(irate(container_network_transmit_bytes_total{namespace=~\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=~\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", ++ "expr": "(avg(irate(container_network_transmit_bytes_total{namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}pod{{`}}`}}", -@@ -1489,7 +1489,7 @@ +@@ -1407,7 +1433,7 @@ + "title": "Average Container Bandwidth by Pod: Transmitted", + "tooltip": { + "shared": false, +- "sort": 0, ++ "sort": 2, + "value_type": "individual" + }, + "type": "graph", +@@ -1461,11 +1487,14 @@ + "datasource": "$datasource", + "fill": 10, + "id": 10, ++ "interval": "1m", + "legend": { ++ "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, ++ "rightSide": true, + "show": true, + "total": false, + "values": false +@@ -1489,7 +1518,7 @@ "steppedLine": false, "targets": [ { - "expr": "(sum(irate(container_network_receive_packets_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=~\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", -+ "expr": "(sum(irate(container_network_receive_packets_total{namespace=~\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=~\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", ++ "expr": "(sum(irate(container_network_receive_packets_total{namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}pod{{`}}`}}", -@@ -1575,7 +1575,7 @@ +@@ -1505,7 +1534,7 @@ + "title": "Rate of Received Packets", + "tooltip": { + "shared": false, +- "sort": 0, ++ "sort": 2, + "value_type": "individual" + }, + "type": "graph", +@@ -1547,11 +1576,14 @@ + "datasource": "$datasource", + "fill": 10, + "id": 11, ++ "interval": "1m", + "legend": { ++ "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, ++ "rightSide": true, + "show": true, + "total": false, + "values": false +@@ -1575,7 +1607,7 @@ "steppedLine": false, "targets": [ { - "expr": "(sum(irate(container_network_transmit_packets_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=~\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", -+ "expr": "(sum(irate(container_network_transmit_packets_total{namespace=~\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=~\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", ++ "expr": "(sum(irate(container_network_transmit_packets_total{namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}pod{{`}}`}}", -@@ -1673,7 +1673,7 @@ +@@ -1591,7 +1623,7 @@ + "title": "Rate of Transmitted Packets", + "tooltip": { + "shared": false, +- "sort": 0, ++ "sort": 2, + "value_type": "individual" + }, + "type": "graph", +@@ -1645,11 +1677,14 @@ + "datasource": "$datasource", + "fill": 10, + "id": 12, ++ "interval": "1m", + "legend": { ++ "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, ++ "rightSide": true, + "show": true, + "total": false, + "values": false +@@ -1673,7 +1708,7 @@ "steppedLine": false, "targets": [ { - "expr": "(sum(irate(container_network_receive_packets_dropped_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=~\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", -+ "expr": "(sum(irate(container_network_receive_packets_dropped_total{namespace=~\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=~\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", ++ "expr": "(sum(irate(container_network_receive_packets_dropped_total{namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}pod{{`}}`}}", -@@ -1759,7 +1759,7 @@ +@@ -1689,7 +1724,7 @@ + "title": "Rate of Received Packets Dropped", + "tooltip": { + "shared": false, +- "sort": 0, ++ "sort": 2, + "value_type": "individual" + }, + "type": "graph", +@@ -1731,11 +1766,14 @@ + "datasource": "$datasource", + "fill": 10, + "id": 13, ++ "interval": "1m", + "legend": { ++ "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, ++ "rightSide": true, + "show": true, + "total": false, + "values": false +@@ -1759,7 +1797,7 @@ "steppedLine": false, "targets": [ { - "expr": "(sum(irate(container_network_transmit_packets_dropped_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=~\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", -+ "expr": "(sum(irate(container_network_transmit_packets_dropped_total{namespace=~\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=~\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", ++ "expr": "(sum(irate(container_network_transmit_packets_dropped_total{namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}pod{{`}}`}}", -@@ -1846,33 +1846,6 @@ +@@ -1775,7 +1813,7 @@ + "title": "Rate of Transmitted Packets Dropped", + "tooltip": { + "shared": false, +- "sort": 0, ++ "sort": 2, + "value_type": "individual" + }, + "type": "graph", +@@ -1825,11 +1863,11 @@ + "list": [ + { + "current": { +- "text": "default", +- "value": "default" ++ "text": "Prometheus", ++ "value": "Prometheus" + }, + "hide": 0, +- "label": null, ++ "label": "Data Source", + "name": "datasource", + "options": [ + +@@ -1846,33 +1884,6 @@ "value": "" }, "datasource": "$datasource", @@ -297,7 +650,7 @@ "hide": 0, "includeAll": false, "label": null, -@@ -1881,7 +1854,7 @@ +@@ -1881,7 +1892,7 @@ "options": [ ], @@ -306,7 +659,7 @@ "refresh": 2, "regex": "", "sort": 1, -@@ -1908,7 +1881,7 @@ +@@ -1908,7 +1919,7 @@ "options": [ ], @@ -315,7 +668,7 @@ "refresh": 2, "regex": "", "sort": 1, -@@ -1935,7 +1908,7 @@ +@@ -1935,7 +1946,7 @@ "options": [ ], diff --git a/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-resources-workloads-namespace.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-resources-workloads-namespace.yaml.patch index 16d5652f..d718d477 100644 --- a/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-resources-workloads-namespace.yaml.patch +++ b/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-resources-workloads-namespace.yaml.patch @@ -20,7 +20,8 @@ {{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} labels: {{- if $.Values.grafana.sidecar.dashboards.label }} - {{ $.Values.grafana.sidecar.dashboards.label }}: "1" +- {{ $.Values.grafana.sidecar.dashboards.label }}: "1" ++ {{ $.Values.grafana.sidecar.dashboards.label }}: {{ ternary $.Values.grafana.sidecar.dashboards.labelValue "1" (not (empty $.Values.grafana.sidecar.dashboards.labelValue)) | quote }} {{- end }} - app: {{ template "kube-prometheus-stack.name" $ }}-grafana -{{ include "kube-prometheus-stack.labels" $ | indent 4 }} @@ -29,7 +30,22 @@ data: k8s-resources-workloads-namespace.json: |- { -@@ -98,7 +98,7 @@ +@@ -49,11 +49,14 @@ + "datasource": "$datasource", + "fill": 10, + "id": 1, ++ "interval": "1m", + "legend": { ++ "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, ++ "rightSide": true, + "show": true, + "total": false, + "values": false +@@ -98,7 +101,7 @@ "steppedLine": false, "targets": [ { @@ -38,7 +54,7 @@ "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}workload{{`}}`}} - {{`{{`}}workload_type{{`}}`}}", -@@ -106,7 +106,7 @@ +@@ -106,7 +109,7 @@ "step": 10 }, { @@ -47,7 +63,7 @@ "format": "time_series", "intervalFactor": 2, "legendFormat": "quota - requests", -@@ -114,7 +114,7 @@ +@@ -114,7 +117,7 @@ "step": 10 }, { @@ -56,7 +72,40 @@ "format": "time_series", "intervalFactor": 2, "legendFormat": "quota - limits", -@@ -387,7 +387,7 @@ +@@ -130,7 +133,7 @@ + "title": "CPU Usage", + "tooltip": { + "shared": false, +- "sort": 0, ++ "sort": 2, + "value_type": "individual" + }, + "type": "graph", +@@ -184,11 +187,14 @@ + "datasource": "$datasource", + "fill": 1, + "id": 2, ++ "interval": "1m", + "legend": { ++ "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, ++ "rightSide": true, + "show": true, + "total": false, + "values": false +@@ -342,7 +348,7 @@ + "link": true, + "linkTargetBlank": false, + "linkTooltip": "Drill down", +- "linkUrl": "/d/a164a7f0339f99e89cea5cb47e9be617/k8s-resources-workload?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$namespace&var-workload=$__cell&var-type=$__cell_2", ++ "linkUrl": "d/a164a7f0339f99e89cea5cb47e9be617/k8s-resources-workload?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$namespace&var-workload=$__cell&var-type=$__cell_2", + "pattern": "workload", + "thresholds": [ + +@@ -387,7 +393,7 @@ ], "targets": [ { @@ -65,7 +114,7 @@ "format": "table", "instant": true, "intervalFactor": 2, -@@ -396,7 +396,7 @@ +@@ -396,7 +402,7 @@ "step": 10 }, { @@ -74,7 +123,7 @@ "format": "table", "instant": true, "intervalFactor": 2, -@@ -405,7 +405,7 @@ +@@ -405,7 +411,7 @@ "step": 10 }, { @@ -83,7 +132,7 @@ "format": "table", "instant": true, "intervalFactor": 2, -@@ -414,7 +414,7 @@ +@@ -414,7 +420,7 @@ "step": 10 }, { @@ -92,7 +141,7 @@ "format": "table", "instant": true, "intervalFactor": 2, -@@ -423,7 +423,7 @@ +@@ -423,7 +429,7 @@ "step": 10 }, { @@ -101,7 +150,7 @@ "format": "table", "instant": true, "intervalFactor": 2, -@@ -432,7 +432,7 @@ +@@ -432,7 +438,7 @@ "step": 10 }, { @@ -110,7 +159,31 @@ "format": "table", "instant": true, "intervalFactor": 2, -@@ -553,7 +553,7 @@ +@@ -449,7 +455,7 @@ + "title": "CPU Quota", + "tooltip": { + "shared": false, +- "sort": 0, ++ "sort": 2, + "value_type": "individual" + }, + "transform": "table", +@@ -504,11 +510,14 @@ + "datasource": "$datasource", + "fill": 10, + "id": 3, ++ "interval": "1m", + "legend": { ++ "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, ++ "rightSide": true, + "show": true, + "total": false, + "values": false +@@ -553,7 +562,7 @@ "steppedLine": false, "targets": [ { @@ -119,7 +192,7 @@ "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}workload{{`}}`}} - {{`{{`}}workload_type{{`}}`}}", -@@ -561,7 +561,7 @@ +@@ -561,7 +570,7 @@ "step": 10 }, { @@ -128,7 +201,7 @@ "format": "time_series", "intervalFactor": 2, "legendFormat": "quota - requests", -@@ -569,7 +569,7 @@ +@@ -569,7 +578,7 @@ "step": 10 }, { @@ -137,7 +210,40 @@ "format": "time_series", "intervalFactor": 2, "legendFormat": "quota - limits", -@@ -842,7 +842,7 @@ +@@ -585,7 +594,7 @@ + "title": "Memory Usage", + "tooltip": { + "shared": false, +- "sort": 0, ++ "sort": 2, + "value_type": "individual" + }, + "type": "graph", +@@ -639,11 +648,14 @@ + "datasource": "$datasource", + "fill": 1, + "id": 4, ++ "interval": "1m", + "legend": { ++ "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, ++ "rightSide": true, + "show": true, + "total": false, + "values": false +@@ -797,7 +809,7 @@ + "link": true, + "linkTargetBlank": false, + "linkTooltip": "Drill down", +- "linkUrl": "/d/a164a7f0339f99e89cea5cb47e9be617/k8s-resources-workload?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$namespace&var-workload=$__cell&var-type=$__cell_2", ++ "linkUrl": "d/a164a7f0339f99e89cea5cb47e9be617/k8s-resources-workload?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$namespace&var-workload=$__cell&var-type=$__cell_2", + "pattern": "workload", + "thresholds": [ + +@@ -842,7 +854,7 @@ ], "targets": [ { @@ -146,7 +252,7 @@ "format": "table", "instant": true, "intervalFactor": 2, -@@ -851,7 +851,7 @@ +@@ -851,7 +863,7 @@ "step": 10 }, { @@ -155,7 +261,7 @@ "format": "table", "instant": true, "intervalFactor": 2, -@@ -860,7 +860,7 @@ +@@ -860,7 +872,7 @@ "step": 10 }, { @@ -164,7 +270,7 @@ "format": "table", "instant": true, "intervalFactor": 2, -@@ -869,7 +869,7 @@ +@@ -869,7 +881,7 @@ "step": 10 }, { @@ -173,7 +279,7 @@ "format": "table", "instant": true, "intervalFactor": 2, -@@ -878,7 +878,7 @@ +@@ -878,7 +890,7 @@ "step": 10 }, { @@ -182,7 +288,7 @@ "format": "table", "instant": true, "intervalFactor": 2, -@@ -887,7 +887,7 @@ +@@ -887,7 +899,7 @@ "step": 10 }, { @@ -191,133 +297,380 @@ "format": "table", "instant": true, "intervalFactor": 2, -@@ -1163,7 +1163,7 @@ +@@ -904,7 +916,7 @@ + "title": "Memory Quota", + "tooltip": { + "shared": false, +- "sort": 0, ++ "sort": 2, + "value_type": "individual" + }, + "transform": "table", +@@ -961,10 +973,12 @@ + "id": 5, + "interval": "1m", + "legend": { ++ "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, ++ "rightSide": true, + "show": true, + "total": false, + "values": false +@@ -1118,7 +1132,7 @@ + "link": true, + "linkTargetBlank": false, + "linkTooltip": "Drill down to pods", +- "linkUrl": "/d/a164a7f0339f99e89cea5cb47e9be617/k8s-resources-workload?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$namespace&var-workload=$__cell&var-type=$type", ++ "linkUrl": "d/a164a7f0339f99e89cea5cb47e9be617/k8s-resources-workload?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$namespace&var-workload=$__cell&var-type=$type", + "pattern": "workload", + "thresholds": [ + +@@ -1163,7 +1177,7 @@ ], "targets": [ { - "expr": "(sum(irate(container_network_receive_bytes_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=~\"$namespace\", workload_type=\"$type\"}) by (workload))\n", -+ "expr": "(sum(irate(container_network_receive_bytes_total{namespace=~\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=~\"$namespace\", workload_type=\"$type\"}) by (workload))\n", ++ "expr": "(sum(irate(container_network_receive_bytes_total{namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload_type=\"$type\"}) by (workload))\n", "format": "table", "instant": true, "intervalFactor": 2, -@@ -1172,7 +1172,7 @@ +@@ -1172,7 +1186,7 @@ "step": 10 }, { - "expr": "(sum(irate(container_network_transmit_bytes_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=~\"$namespace\", workload_type=\"$type\"}) by (workload))\n", -+ "expr": "(sum(irate(container_network_transmit_bytes_total{namespace=~\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=~\"$namespace\", workload_type=\"$type\"}) by (workload))\n", ++ "expr": "(sum(irate(container_network_transmit_bytes_total{namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload_type=\"$type\"}) by (workload))\n", "format": "table", "instant": true, "intervalFactor": 2, -@@ -1181,7 +1181,7 @@ +@@ -1181,7 +1195,7 @@ "step": 10 }, { - "expr": "(sum(irate(container_network_receive_packets_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=~\"$namespace\", workload_type=\"$type\"}) by (workload))\n", -+ "expr": "(sum(irate(container_network_receive_packets_total{namespace=~\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=~\"$namespace\", workload_type=\"$type\"}) by (workload))\n", ++ "expr": "(sum(irate(container_network_receive_packets_total{namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload_type=\"$type\"}) by (workload))\n", "format": "table", "instant": true, "intervalFactor": 2, -@@ -1190,7 +1190,7 @@ +@@ -1190,7 +1204,7 @@ "step": 10 }, { - "expr": "(sum(irate(container_network_transmit_packets_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=~\"$namespace\", workload_type=\"$type\"}) by (workload))\n", -+ "expr": "(sum(irate(container_network_transmit_packets_total{namespace=~\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=~\"$namespace\", workload_type=\"$type\"}) by (workload))\n", ++ "expr": "(sum(irate(container_network_transmit_packets_total{namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload_type=\"$type\"}) by (workload))\n", "format": "table", "instant": true, "intervalFactor": 2, -@@ -1199,7 +1199,7 @@ +@@ -1199,7 +1213,7 @@ "step": 10 }, { - "expr": "(sum(irate(container_network_receive_packets_dropped_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=~\"$namespace\", workload_type=\"$type\"}) by (workload))\n", -+ "expr": "(sum(irate(container_network_receive_packets_dropped_total{namespace=~\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=~\"$namespace\", workload_type=\"$type\"}) by (workload))\n", ++ "expr": "(sum(irate(container_network_receive_packets_dropped_total{namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload_type=\"$type\"}) by (workload))\n", "format": "table", "instant": true, "intervalFactor": 2, -@@ -1208,7 +1208,7 @@ +@@ -1208,7 +1222,7 @@ "step": 10 }, { - "expr": "(sum(irate(container_network_transmit_packets_dropped_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=~\"$namespace\", workload_type=\"$type\"}) by (workload))\n", -+ "expr": "(sum(irate(container_network_transmit_packets_dropped_total{namespace=~\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=~\"$namespace\", workload_type=\"$type\"}) by (workload))\n", ++ "expr": "(sum(irate(container_network_transmit_packets_dropped_total{namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload_type=\"$type\"}) by (workload))\n", "format": "table", "instant": true, "intervalFactor": 2, -@@ -1308,7 +1308,7 @@ +@@ -1225,7 +1239,7 @@ + "title": "Current Network Usage", + "tooltip": { + "shared": false, +- "sort": 0, ++ "sort": 2, + "value_type": "individual" + }, + "transform": "table", +@@ -1280,11 +1294,14 @@ + "datasource": "$datasource", + "fill": 10, + "id": 6, ++ "interval": "1m", + "legend": { ++ "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, ++ "rightSide": true, + "show": true, + "total": false, + "values": false +@@ -1308,7 +1325,7 @@ "steppedLine": false, "targets": [ { - "expr": "(sum(irate(container_network_receive_bytes_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=~\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", -+ "expr": "(sum(irate(container_network_receive_bytes_total{namespace=~\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=~\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", ++ "expr": "(sum(irate(container_network_receive_bytes_total{namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}workload{{`}}`}}", -@@ -1394,7 +1394,7 @@ +@@ -1324,7 +1341,7 @@ + "title": "Receive Bandwidth", + "tooltip": { + "shared": false, +- "sort": 0, ++ "sort": 2, + "value_type": "individual" + }, + "type": "graph", +@@ -1366,11 +1383,14 @@ + "datasource": "$datasource", + "fill": 10, + "id": 7, ++ "interval": "1m", + "legend": { ++ "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, ++ "rightSide": true, + "show": true, + "total": false, + "values": false +@@ -1394,7 +1414,7 @@ "steppedLine": false, "targets": [ { - "expr": "(sum(irate(container_network_transmit_bytes_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=~\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", -+ "expr": "(sum(irate(container_network_transmit_bytes_total{namespace=~\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=~\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", ++ "expr": "(sum(irate(container_network_transmit_bytes_total{namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}workload{{`}}`}}", -@@ -1492,7 +1492,7 @@ +@@ -1410,7 +1430,7 @@ + "title": "Transmit Bandwidth", + "tooltip": { + "shared": false, +- "sort": 0, ++ "sort": 2, + "value_type": "individual" + }, + "type": "graph", +@@ -1464,11 +1484,14 @@ + "datasource": "$datasource", + "fill": 10, + "id": 8, ++ "interval": "1m", + "legend": { ++ "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, ++ "rightSide": true, + "show": true, + "total": false, + "values": false +@@ -1492,7 +1515,7 @@ "steppedLine": false, "targets": [ { - "expr": "(avg(irate(container_network_receive_bytes_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=~\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", -+ "expr": "(avg(irate(container_network_receive_bytes_total{namespace=~\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=~\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", ++ "expr": "(avg(irate(container_network_receive_bytes_total{namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}workload{{`}}`}}", -@@ -1578,7 +1578,7 @@ +@@ -1508,7 +1531,7 @@ + "title": "Average Container Bandwidth by Workload: Received", + "tooltip": { + "shared": false, +- "sort": 0, ++ "sort": 2, + "value_type": "individual" + }, + "type": "graph", +@@ -1550,11 +1573,14 @@ + "datasource": "$datasource", + "fill": 10, + "id": 9, ++ "interval": "1m", + "legend": { ++ "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, ++ "rightSide": true, + "show": true, + "total": false, + "values": false +@@ -1578,7 +1604,7 @@ "steppedLine": false, "targets": [ { - "expr": "(avg(irate(container_network_transmit_bytes_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=~\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", -+ "expr": "(avg(irate(container_network_transmit_bytes_total{namespace=~\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=~\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", ++ "expr": "(avg(irate(container_network_transmit_bytes_total{namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}workload{{`}}`}}", -@@ -1676,7 +1676,7 @@ +@@ -1594,7 +1620,7 @@ + "title": "Average Container Bandwidth by Workload: Transmitted", + "tooltip": { + "shared": false, +- "sort": 0, ++ "sort": 2, + "value_type": "individual" + }, + "type": "graph", +@@ -1648,11 +1674,14 @@ + "datasource": "$datasource", + "fill": 10, + "id": 10, ++ "interval": "1m", + "legend": { ++ "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, ++ "rightSide": true, + "show": true, + "total": false, + "values": false +@@ -1676,7 +1705,7 @@ "steppedLine": false, "targets": [ { - "expr": "(sum(irate(container_network_receive_packets_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=~\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", -+ "expr": "(sum(irate(container_network_receive_packets_total{namespace=~\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=~\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", ++ "expr": "(sum(irate(container_network_receive_packets_total{namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}workload{{`}}`}}", -@@ -1762,7 +1762,7 @@ +@@ -1692,7 +1721,7 @@ + "title": "Rate of Received Packets", + "tooltip": { + "shared": false, +- "sort": 0, ++ "sort": 2, + "value_type": "individual" + }, + "type": "graph", +@@ -1734,11 +1763,14 @@ + "datasource": "$datasource", + "fill": 10, + "id": 11, ++ "interval": "1m", + "legend": { ++ "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, ++ "rightSide": true, + "show": true, + "total": false, + "values": false +@@ -1762,7 +1794,7 @@ "steppedLine": false, "targets": [ { - "expr": "(sum(irate(container_network_transmit_packets_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=~\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", -+ "expr": "(sum(irate(container_network_transmit_packets_total{namespace=~\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=~\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", ++ "expr": "(sum(irate(container_network_transmit_packets_total{namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}workload{{`}}`}}", -@@ -1860,7 +1860,7 @@ +@@ -1778,7 +1810,7 @@ + "title": "Rate of Transmitted Packets", + "tooltip": { + "shared": false, +- "sort": 0, ++ "sort": 2, + "value_type": "individual" + }, + "type": "graph", +@@ -1832,11 +1864,14 @@ + "datasource": "$datasource", + "fill": 10, + "id": 12, ++ "interval": "1m", + "legend": { ++ "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, ++ "rightSide": true, + "show": true, + "total": false, + "values": false +@@ -1860,7 +1895,7 @@ "steppedLine": false, "targets": [ { - "expr": "(sum(irate(container_network_receive_packets_dropped_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=~\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", -+ "expr": "(sum(irate(container_network_receive_packets_dropped_total{namespace=~\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=~\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", ++ "expr": "(sum(irate(container_network_receive_packets_dropped_total{namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}workload{{`}}`}}", -@@ -1946,7 +1946,7 @@ +@@ -1876,7 +1911,7 @@ + "title": "Rate of Received Packets Dropped", + "tooltip": { + "shared": false, +- "sort": 0, ++ "sort": 2, + "value_type": "individual" + }, + "type": "graph", +@@ -1918,11 +1953,14 @@ + "datasource": "$datasource", + "fill": 10, + "id": 13, ++ "interval": "1m", + "legend": { ++ "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, ++ "rightSide": true, + "show": true, + "total": false, + "values": false +@@ -1946,7 +1984,7 @@ "steppedLine": false, "targets": [ { - "expr": "(sum(irate(container_network_transmit_packets_dropped_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=~\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", -+ "expr": "(sum(irate(container_network_transmit_packets_dropped_total{namespace=~\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=~\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", ++ "expr": "(sum(irate(container_network_transmit_packets_dropped_total{namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}workload{{`}}`}}", -@@ -2028,33 +2028,6 @@ +@@ -1962,7 +2000,7 @@ + "title": "Rate of Transmitted Packets Dropped", + "tooltip": { + "shared": false, +- "sort": 0, ++ "sort": 2, + "value_type": "individual" + }, + "type": "graph", +@@ -2012,11 +2050,11 @@ + "list": [ + { + "current": { +- "text": "default", +- "value": "default" ++ "text": "Prometheus", ++ "value": "Prometheus" + }, + "hide": 0, +- "label": null, ++ "label": "Data Source", + "name": "datasource", + "options": [ + +@@ -2028,33 +2066,6 @@ }, { "allValue": null, @@ -351,25 +704,25 @@ "auto": false, "auto_count": 30, "auto_min": "10s", -@@ -2063,7 +2036,7 @@ +@@ -2063,7 +2074,7 @@ "value": "deployment" }, "datasource": "$datasource", - "definition": "label_values(namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=~\"$namespace\", workload=~\".+\"}, workload_type)", -+ "definition": "label_values(namespace_workload_pod:kube_pod_owner:relabel{namespace=~\"$namespace\", workload=~\".+\"}, workload_type)", ++ "definition": "label_values(namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\".+\"}, workload_type)", "hide": 0, "includeAll": false, "label": null, -@@ -2072,7 +2045,7 @@ +@@ -2072,7 +2083,7 @@ "options": [ ], - "query": "label_values(namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=~\"$namespace\", workload=~\".+\"}, workload_type)", -+ "query": "label_values(namespace_workload_pod:kube_pod_owner:relabel{namespace=~\"$namespace\", workload=~\".+\"}, workload_type)", ++ "query": "label_values(namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\".+\"}, workload_type)", "refresh": 2, "regex": "", "skipUrlSync": false, -@@ -2100,7 +2073,7 @@ +@@ -2100,7 +2111,7 @@ "options": [ ], diff --git a/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/namespace-by-pod.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/namespace-by-pod.yaml.patch index 53940433..90c82999 100644 --- a/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/namespace-by-pod.yaml.patch +++ b/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/namespace-by-pod.yaml.patch @@ -20,7 +20,8 @@ {{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} labels: {{- if $.Values.grafana.sidecar.dashboards.label }} - {{ $.Values.grafana.sidecar.dashboards.label }}: "1" +- {{ $.Values.grafana.sidecar.dashboards.label }}: "1" ++ {{ $.Values.grafana.sidecar.dashboards.label }}: {{ ternary $.Values.grafana.sidecar.dashboards.labelValue "1" (not (empty $.Values.grafana.sidecar.dashboards.labelValue)) | quote }} {{- end }} - app: {{ template "kube-prometheus-stack.name" $ }}-grafana -{{ include "kube-prometheus-stack.labels" $ | indent 4 }} @@ -155,6 +156,21 @@ "format": "time_series", "intervalFactor": 1, "legendFormat": "{{`{{`}}pod{{`}}`}}", +@@ -1273,11 +1273,11 @@ + "list": [ + { + "current": { +- "text": "default", +- "value": "default" ++ "text": "Prometheus", ++ "value": "Prometheus" + }, + "hide": 0, +- "label": null, ++ "label": "Data Source", + "name": "datasource", + "options": [ + @@ -1288,32 +1288,6 @@ "type": "datasource" }, diff --git a/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/namespace-by-workload.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/namespace-by-workload.yaml.patch index 72ff4ec8..bb2d069d 100644 --- a/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/namespace-by-workload.yaml.patch +++ b/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/namespace-by-workload.yaml.patch @@ -20,7 +20,8 @@ {{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} labels: {{- if $.Values.grafana.sidecar.dashboards.label }} - {{ $.Values.grafana.sidecar.dashboards.label }}: "1" +- {{ $.Values.grafana.sidecar.dashboards.label }}: "1" ++ {{ $.Values.grafana.sidecar.dashboards.label }}: {{ ternary $.Values.grafana.sidecar.dashboards.labelValue "1" (not (empty $.Values.grafana.sidecar.dashboards.labelValue)) | quote }} {{- end }} - app: {{ template "kube-prometheus-stack.name" $ }}-grafana -{{ include "kube-prometheus-stack.labels" $ | indent 4 }} @@ -34,7 +35,7 @@ "targets": [ { - "expr": "sort_desc(sum(irate(container_network_receive_bytes_total{cluster=\"$cluster\",namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\",namespace=~\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", -+ "expr": "sort_desc(sum(irate(container_network_receive_bytes_total{namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=~\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", ++ "expr": "sort_desc(sum(irate(container_network_receive_bytes_total{namespace=\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", "format": "time_series", "intervalFactor": 1, "legendFormat": "{{`{{`}} workload {{`}}`}}", @@ -43,7 +44,7 @@ "targets": [ { - "expr": "sort_desc(sum(irate(container_network_transmit_bytes_total{cluster=\"$cluster\",namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\",namespace=~\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", -+ "expr": "sort_desc(sum(irate(container_network_transmit_bytes_total{namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=~\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", ++ "expr": "sort_desc(sum(irate(container_network_transmit_bytes_total{namespace=\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", "format": "time_series", "intervalFactor": 1, "legendFormat": "{{`{{`}} workload {{`}}`}}", @@ -52,7 +53,7 @@ "targets": [ { - "expr": "sort_desc(sum(irate(container_network_receive_bytes_total{cluster=\"$cluster\",namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\",namespace=~\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", -+ "expr": "sort_desc(sum(irate(container_network_receive_bytes_total{namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=~\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", ++ "expr": "sort_desc(sum(irate(container_network_receive_bytes_total{namespace=\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", "format": "table", "instant": true, "intervalFactor": 2, @@ -61,7 +62,7 @@ }, { - "expr": "sort_desc(sum(irate(container_network_transmit_bytes_total{cluster=\"$cluster\",namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\",namespace=~\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", -+ "expr": "sort_desc(sum(irate(container_network_transmit_bytes_total{namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=~\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", ++ "expr": "sort_desc(sum(irate(container_network_transmit_bytes_total{namespace=\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", "format": "table", "instant": true, "intervalFactor": 2, @@ -70,7 +71,7 @@ }, { - "expr": "sort_desc(avg(irate(container_network_receive_bytes_total{cluster=\"$cluster\",namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\",namespace=~\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", -+ "expr": "sort_desc(avg(irate(container_network_receive_bytes_total{namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=~\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", ++ "expr": "sort_desc(avg(irate(container_network_receive_bytes_total{namespace=\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", "format": "table", "instant": true, "intervalFactor": 2, @@ -79,7 +80,7 @@ }, { - "expr": "sort_desc(avg(irate(container_network_transmit_bytes_total{cluster=\"$cluster\",namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\",namespace=~\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", -+ "expr": "sort_desc(avg(irate(container_network_transmit_bytes_total{namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=~\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", ++ "expr": "sort_desc(avg(irate(container_network_transmit_bytes_total{namespace=\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", "format": "table", "instant": true, "intervalFactor": 2, @@ -88,7 +89,7 @@ }, { - "expr": "sort_desc(sum(irate(container_network_receive_packets_total{cluster=\"$cluster\",namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\",namespace=~\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", -+ "expr": "sort_desc(sum(irate(container_network_receive_packets_total{namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=~\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", ++ "expr": "sort_desc(sum(irate(container_network_receive_packets_total{namespace=\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", "format": "table", "instant": true, "intervalFactor": 2, @@ -97,7 +98,7 @@ }, { - "expr": "sort_desc(sum(irate(container_network_transmit_packets_total{cluster=\"$cluster\",namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\",namespace=~\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", -+ "expr": "sort_desc(sum(irate(container_network_transmit_packets_total{namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=~\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", ++ "expr": "sort_desc(sum(irate(container_network_transmit_packets_total{namespace=\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", "format": "table", "instant": true, "intervalFactor": 2, @@ -106,7 +107,7 @@ }, { - "expr": "sort_desc(sum(irate(container_network_receive_packets_dropped_total{cluster=\"$cluster\",namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\",namespace=~\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", -+ "expr": "sort_desc(sum(irate(container_network_receive_packets_dropped_total{namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=~\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", ++ "expr": "sort_desc(sum(irate(container_network_receive_packets_dropped_total{namespace=\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", "format": "table", "instant": true, "intervalFactor": 2, @@ -115,7 +116,7 @@ }, { - "expr": "sort_desc(sum(irate(container_network_transmit_packets_dropped_total{cluster=\"$cluster\",namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\",namespace=~\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", -+ "expr": "sort_desc(sum(irate(container_network_transmit_packets_dropped_total{namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=~\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", ++ "expr": "sort_desc(sum(irate(container_network_transmit_packets_dropped_total{namespace=\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", "format": "table", "instant": true, "intervalFactor": 2, @@ -124,7 +125,7 @@ "targets": [ { - "expr": "sort_desc(avg(irate(container_network_receive_bytes_total{cluster=\"$cluster\",namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\",namespace=~\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", -+ "expr": "sort_desc(avg(irate(container_network_receive_bytes_total{namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=~\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", ++ "expr": "sort_desc(avg(irate(container_network_receive_bytes_total{namespace=\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", "format": "time_series", "intervalFactor": 1, "legendFormat": "{{`{{`}} workload {{`}}`}}", @@ -133,7 +134,7 @@ "targets": [ { - "expr": "sort_desc(avg(irate(container_network_transmit_bytes_total{cluster=\"$cluster\",namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\",namespace=~\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", -+ "expr": "sort_desc(avg(irate(container_network_transmit_bytes_total{namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=~\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", ++ "expr": "sort_desc(avg(irate(container_network_transmit_bytes_total{namespace=\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", "format": "time_series", "intervalFactor": 1, "legendFormat": "{{`{{`}} workload {{`}}`}}", @@ -142,7 +143,7 @@ "targets": [ { - "expr": "sort_desc(sum(irate(container_network_receive_bytes_total{cluster=\"$cluster\",namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\",namespace=~\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", -+ "expr": "sort_desc(sum(irate(container_network_receive_bytes_total{namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=~\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", ++ "expr": "sort_desc(sum(irate(container_network_receive_bytes_total{namespace=\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", "format": "time_series", "intervalFactor": 1, "legendFormat": "{{`{{`}}workload{{`}}`}}", @@ -151,7 +152,7 @@ "targets": [ { - "expr": "sort_desc(sum(irate(container_network_transmit_bytes_total{cluster=\"$cluster\",namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\",namespace=~\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", -+ "expr": "sort_desc(sum(irate(container_network_transmit_bytes_total{namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=~\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", ++ "expr": "sort_desc(sum(irate(container_network_transmit_bytes_total{namespace=\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", "format": "time_series", "intervalFactor": 1, "legendFormat": "{{`{{`}}workload{{`}}`}}", @@ -160,7 +161,7 @@ "targets": [ { - "expr": "sort_desc(sum(irate(container_network_receive_packets_total{cluster=\"$cluster\",namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\",namespace=~\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", -+ "expr": "sort_desc(sum(irate(container_network_receive_packets_total{namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=~\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", ++ "expr": "sort_desc(sum(irate(container_network_receive_packets_total{namespace=\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", "format": "time_series", "intervalFactor": 1, "legendFormat": "{{`{{`}}workload{{`}}`}}", @@ -169,7 +170,7 @@ "targets": [ { - "expr": "sort_desc(sum(irate(container_network_transmit_packets_total{cluster=\"$cluster\",namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\",namespace=~\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", -+ "expr": "sort_desc(sum(irate(container_network_transmit_packets_total{namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=~\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", ++ "expr": "sort_desc(sum(irate(container_network_transmit_packets_total{namespace=\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", "format": "time_series", "intervalFactor": 1, "legendFormat": "{{`{{`}}workload{{`}}`}}", @@ -178,7 +179,7 @@ "targets": [ { - "expr": "sort_desc(sum(irate(container_network_receive_packets_dropped_total{cluster=\"$cluster\",namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\",namespace=~\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", -+ "expr": "sort_desc(sum(irate(container_network_receive_packets_dropped_total{namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=~\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", ++ "expr": "sort_desc(sum(irate(container_network_receive_packets_dropped_total{namespace=\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", "format": "time_series", "intervalFactor": 1, "legendFormat": "{{`{{`}}workload{{`}}`}}", @@ -187,10 +188,25 @@ "targets": [ { - "expr": "sort_desc(sum(irate(container_network_transmit_packets_dropped_total{cluster=\"$cluster\",namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\",namespace=~\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", -+ "expr": "sort_desc(sum(irate(container_network_transmit_packets_dropped_total{namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=~\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", ++ "expr": "sort_desc(sum(irate(container_network_transmit_packets_dropped_total{namespace=\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", "format": "time_series", "intervalFactor": 1, "legendFormat": "{{`{{`}}workload{{`}}`}}", +@@ -1513,11 +1513,11 @@ + "list": [ + { + "current": { +- "text": "default", +- "value": "default" ++ "text": "Prometheus", ++ "value": "Prometheus" + }, + "hide": 0, +- "label": null, ++ "label": "Data Source", + "name": "datasource", + "options": [ + @@ -1529,32 +1529,6 @@ }, { @@ -247,7 +263,7 @@ }, "datasource": "$datasource", - "definition": "label_values(namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\",namespace=~\"$namespace\", workload=~\".+\"}, workload_type)", -+ "definition": "label_values(namespace_workload_pod:kube_pod_owner:relabel{namespace=~\"$namespace\", workload=~\".+\"}, workload_type)", ++ "definition": "label_values(namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\".+\"}, workload_type)", "hide": 0, "includeAll": false, "label": null, @@ -256,7 +272,7 @@ ], - "query": "label_values(namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\",namespace=~\"$namespace\", workload=~\".+\"}, workload_type)", -+ "query": "label_values(namespace_workload_pod:kube_pod_owner:relabel{namespace=~\"$namespace\", workload=~\".+\"}, workload_type)", ++ "query": "label_values(namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\".+\"}, workload_type)", "refresh": 2, "regex": "", "skipUrlSync": false, diff --git a/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/persistentvolumesusage.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/persistentvolumesusage.yaml.patch index 63bdf77e..fe2af625 100644 --- a/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/persistentvolumesusage.yaml.patch +++ b/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/persistentvolumesusage.yaml.patch @@ -20,7 +20,8 @@ {{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} labels: {{- if $.Values.grafana.sidecar.dashboards.label }} - {{ $.Values.grafana.sidecar.dashboards.label }}: "1" +- {{ $.Values.grafana.sidecar.dashboards.label }}: "1" ++ {{ $.Values.grafana.sidecar.dashboards.label }}: {{ ternary $.Values.grafana.sidecar.dashboards.labelValue "1" (not (empty $.Values.grafana.sidecar.dashboards.labelValue)) | quote }} {{- end }} - app: {{ template "kube-prometheus-stack.name" $ }}-grafana -{{ include "kube-prometheus-stack.labels" $ | indent 4 }} @@ -29,7 +30,23 @@ data: persistentvolumesusage.json: |- { -@@ -92,14 +92,14 @@ +@@ -60,13 +60,14 @@ + + }, + "id": 2, ++ "interval": "1m", + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": true, +- "rightSide": false, ++ "rightSide": true, + "show": true, + "sideWidth": null, + "total": false, +@@ -92,14 +93,14 @@ "steppedLine": false, "targets": [ { @@ -46,7 +63,20 @@ "format": "time_series", "intervalFactor": 1, "legendFormat": "Free Space", -@@ -207,7 +207,7 @@ +@@ -168,7 +169,11 @@ + + }, + "id": 3, +- "interval": null, ++ "interval": "1m", ++ "legend": { ++ "alignAsTable": true, ++ "rightSide": true ++ }, + "links": [ + + ], +@@ -207,7 +212,7 @@ "tableColumn": "", "targets": [ { @@ -55,7 +85,23 @@ "format": "time_series", "intervalFactor": 2, "legendFormat": "", -@@ -289,14 +289,14 @@ +@@ -257,13 +262,14 @@ + + }, + "id": 4, ++ "interval": "1m", + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": true, +- "rightSide": false, ++ "rightSide": true, + "show": true, + "sideWidth": null, + "total": false, +@@ -289,14 +295,14 @@ "steppedLine": false, "targets": [ { @@ -72,7 +118,20 @@ "format": "time_series", "intervalFactor": 1, "legendFormat": " Free inodes", -@@ -404,7 +404,7 @@ +@@ -365,7 +371,11 @@ + + }, + "id": 5, +- "interval": null, ++ "interval": "1m", ++ "legend": { ++ "alignAsTable": true, ++ "rightSide": true ++ }, + "links": [ + + ], +@@ -404,7 +414,7 @@ "tableColumn": "", "targets": [ { @@ -81,7 +140,22 @@ "format": "time_series", "intervalFactor": 2, "legendFormat": "", -@@ -466,32 +466,6 @@ +@@ -446,11 +456,11 @@ + "list": [ + { + "current": { +- "text": "default", +- "value": "default" ++ "text": "Prometheus", ++ "value": "Prometheus" + }, + "hide": 0, +- "label": null, ++ "label": "Data Source", + "name": "datasource", + "options": [ + +@@ -466,32 +476,6 @@ }, "datasource": "$datasource", @@ -114,7 +188,7 @@ "hide": 0, "includeAll": false, "label": "Namespace", -@@ -500,7 +474,7 @@ +@@ -500,7 +484,7 @@ "options": [ ], @@ -123,7 +197,7 @@ "refresh": 2, "regex": "", "sort": 1, -@@ -526,7 +500,7 @@ +@@ -526,7 +510,7 @@ "options": [ ], diff --git a/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/pod-total.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/pod-total.yaml.patch index 0d5d3a4a..25c5b19f 100644 --- a/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/pod-total.yaml.patch +++ b/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/pod-total.yaml.patch @@ -20,7 +20,8 @@ {{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} labels: {{- if $.Values.grafana.sidecar.dashboards.label }} - {{ $.Values.grafana.sidecar.dashboards.label }}: "1" +- {{ $.Values.grafana.sidecar.dashboards.label }}: "1" ++ {{ $.Values.grafana.sidecar.dashboards.label }}: {{ ternary $.Values.grafana.sidecar.dashboards.labelValue "1" (not (empty $.Values.grafana.sidecar.dashboards.labelValue)) | quote }} {{- end }} - app: {{ template "kube-prometheus-stack.name" $ }}-grafana -{{ include "kube-prometheus-stack.labels" $ | indent 4 }} @@ -101,6 +102,21 @@ "format": "time_series", "intervalFactor": 1, "legendFormat": "{{`{{`}}pod{{`}}`}}", +@@ -1005,11 +1005,11 @@ + "list": [ + { + "current": { +- "text": "default", +- "value": "default" ++ "text": "Prometheus", ++ "value": "Prometheus" + }, + "hide": 0, +- "label": null, ++ "label": "Data Source", + "name": "datasource", + "options": [ + @@ -1020,32 +1020,6 @@ "type": "datasource" }, diff --git a/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/prometheus.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/prometheus.yaml.patch index 643d0008..af7754ef 100644 --- a/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/prometheus.yaml.patch +++ b/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/prometheus.yaml.patch @@ -20,7 +20,8 @@ {{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} labels: {{- if $.Values.grafana.sidecar.dashboards.label }} - {{ $.Values.grafana.sidecar.dashboards.label }}: "1" +- {{ $.Values.grafana.sidecar.dashboards.label }}: "1" ++ {{ $.Values.grafana.sidecar.dashboards.label }}: {{ ternary $.Values.grafana.sidecar.dashboards.labelValue "1" (not (empty $.Values.grafana.sidecar.dashboards.labelValue)) | quote }} {{- end }} - app: {{ template "kube-prometheus-stack.name" $ }}-grafana -{{ include "kube-prometheus-stack.labels" $ | indent 4 }} @@ -29,3 +30,128 @@ data: prometheus.json: |- { +@@ -220,8 +220,8 @@ + "timeShift": null, + "title": "Prometheus Stats", + "tooltip": { +- "shared": false, +- "sort": 0, ++ "shared": true, ++ "sort": 2, + "value_type": "individual" + }, + "transform": "table", +@@ -319,8 +319,8 @@ + "timeShift": null, + "title": "Target Sync", + "tooltip": { +- "shared": false, +- "sort": 0, ++ "shared": true, ++ "sort": 2, + "value_type": "individual" + }, + "type": "graph", +@@ -405,8 +405,8 @@ + "timeShift": null, + "title": "Targets", + "tooltip": { +- "shared": false, +- "sort": 0, ++ "shared": true, ++ "sort": 2, + "value_type": "individual" + }, + "type": "graph", +@@ -503,8 +503,8 @@ + "timeShift": null, + "title": "Average Scrape Interval Duration", + "tooltip": { +- "shared": false, +- "sort": 0, ++ "shared": true, ++ "sort": 2, + "value_type": "individual" + }, + "type": "graph", +@@ -621,8 +621,8 @@ + "timeShift": null, + "title": "Scrape failures", + "tooltip": { +- "shared": false, +- "sort": 0, ++ "shared": true, ++ "sort": 2, + "value_type": "individual" + }, + "type": "graph", +@@ -707,8 +707,8 @@ + "timeShift": null, + "title": "Appended Samples", + "tooltip": { +- "shared": false, +- "sort": 0, ++ "shared": true, ++ "sort": 2, + "value_type": "individual" + }, + "type": "graph", +@@ -805,8 +805,8 @@ + "timeShift": null, + "title": "Head Series", + "tooltip": { +- "shared": false, +- "sort": 0, ++ "shared": true, ++ "sort": 2, + "value_type": "individual" + }, + "type": "graph", +@@ -891,8 +891,8 @@ + "timeShift": null, + "title": "Head Chunks", + "tooltip": { +- "shared": false, +- "sort": 0, ++ "shared": true, ++ "sort": 2, + "value_type": "individual" + }, + "type": "graph", +@@ -989,8 +989,8 @@ + "timeShift": null, + "title": "Query Rate", + "tooltip": { +- "shared": false, +- "sort": 0, ++ "shared": true, ++ "sort": 2, + "value_type": "individual" + }, + "type": "graph", +@@ -1075,8 +1075,8 @@ + "timeShift": null, + "title": "Stage Duration", + "tooltip": { +- "shared": false, +- "sort": 0, ++ "shared": true, ++ "sort": 2, + "value_type": "individual" + }, + "type": "graph", +@@ -1126,11 +1126,11 @@ + "list": [ + { + "current": { +- "text": "default", +- "value": "default" ++ "text": "Prometheus", ++ "value": "Prometheus" + }, + "hide": 0, +- "label": null, ++ "label": "Data Source", + "name": "datasource", + "options": [ + diff --git a/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/statefulset.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/statefulset.yaml.patch deleted file mode 100644 index a1ac5ff5..00000000 --- a/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/statefulset.yaml.patch +++ /dev/null @@ -1,186 +0,0 @@ ---- charts-original/templates/grafana/dashboards-1.14/statefulset.yaml -+++ charts/templates/grafana/dashboards-1.14/statefulset.yaml -@@ -1,23 +1,23 @@ - {{- /* - Generated from 'statefulset' from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/master/manifests/grafana-dashboardDefinitions.yaml - Do not change in-place! In order to change this file first read following link: --https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack -+https://github.com/prometheus-community/helm-charts/tree/main/charts/project-prometheus-stack/hack - */ -}} - {{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} - {{- if and (or .Values.grafana.enabled .Values.grafana.forceDeployDashboards) (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.grafana.defaultDashboardsEnabled }} - apiVersion: v1 - kind: ConfigMap - metadata: -- namespace: {{ .Values.grafana.defaultDashboards.namespace }} -- name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" $) "statefulset" | trunc 63 | trimSuffix "-" }} -+ namespace: {{ template "project-prometheus-stack.namespace" . }} -+ name: {{ printf "%s-%s" (include "project-prometheus-stack.fullname" $) "statefulset" | trunc 63 | trimSuffix "-" }} - annotations: - {{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} - labels: - {{- if $.Values.grafana.sidecar.dashboards.label }} - {{ $.Values.grafana.sidecar.dashboards.label }}: "1" - {{- end }} -- app: {{ template "kube-prometheus-stack.name" $ }}-grafana --{{ include "kube-prometheus-stack.labels" $ | indent 4 }} -+ app: {{ template "project-prometheus-stack.name" $ }}-grafana -+{{ include "project-prometheus-stack.labels" $ | indent 4 }} - data: - statefulset.json: |- - { -@@ -106,7 +106,7 @@ - "tableColumn": "", - "targets": [ - { -- "expr": "sum(rate(container_cpu_usage_seconds_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", container!=\"\", namespace=\"$namespace\", pod=~\"$statefulset.*\"}[3m]))", -+ "expr": "sum(rate(container_cpu_usage_seconds_total{metrics_path=\"/metrics/cadvisor\", container!=\"\", namespace=\"$namespace\", pod=~\"$statefulset.*\"}[3m]))", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "", -@@ -189,7 +189,7 @@ - "tableColumn": "", - "targets": [ - { -- "expr": "sum(container_memory_usage_bytes{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", container!=\"\", namespace=\"$namespace\", pod=~\"$statefulset.*\"}) / 1024^3", -+ "expr": "sum(container_memory_usage_bytes{metrics_path=\"/metrics/cadvisor\", container!=\"\", namespace=\"$namespace\", pod=~\"$statefulset.*\"}) / 1024^3", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "", -@@ -272,7 +272,7 @@ - "tableColumn": "", - "targets": [ - { -- "expr": "sum(rate(container_network_transmit_bytes_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=\"$namespace\", pod=~\"$statefulset.*\"}[3m])) + sum(rate(container_network_receive_bytes_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=\"$namespace\",pod=~\"$statefulset.*\"}[3m]))", -+ "expr": "sum(rate(container_network_transmit_bytes_total{metrics_path=\"/metrics/cadvisor\", namespace=\"$namespace\", pod=~\"$statefulset.*\"}[3m])) + sum(rate(container_network_receive_bytes_total{metrics_path=\"/metrics/cadvisor\", namespace=\"$namespace\",pod=~\"$statefulset.*\"}[3m]))", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "", -@@ -370,7 +370,7 @@ - "tableColumn": "", - "targets": [ - { -- "expr": "max(kube_statefulset_replicas{job=\"kube-state-metrics\", cluster=\"$cluster\", namespace=\"$namespace\", statefulset=\"$statefulset\"}) without (instance, pod)", -+ "expr": "max(kube_statefulset_replicas{job=\"kube-state-metrics\", namespace=\"$namespace\", statefulset=\"$statefulset\"}) without (instance, pod)", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "", -@@ -454,7 +454,7 @@ - "tableColumn": "", - "targets": [ - { -- "expr": "min(kube_statefulset_status_replicas_current{job=\"kube-state-metrics\", cluster=\"$cluster\", namespace=\"$namespace\", statefulset=\"$statefulset\"}) without (instance, pod)", -+ "expr": "min(kube_statefulset_status_replicas_current{job=\"kube-state-metrics\", namespace=\"$namespace\", statefulset=\"$statefulset\"}) without (instance, pod)", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "", -@@ -538,7 +538,7 @@ - "tableColumn": "", - "targets": [ - { -- "expr": "max(kube_statefulset_status_observed_generation{job=\"kube-state-metrics\", cluster=\"$cluster\", namespace=\"$namespace\", statefulset=\"$statefulset\"}) without (instance, pod)", -+ "expr": "max(kube_statefulset_status_observed_generation{job=\"kube-state-metrics\", namespace=\"$namespace\", statefulset=\"$statefulset\"}) without (instance, pod)", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "", -@@ -622,7 +622,7 @@ - "tableColumn": "", - "targets": [ - { -- "expr": "max(kube_statefulset_metadata_generation{job=\"kube-state-metrics\", statefulset=\"$statefulset\", cluster=\"$cluster\", namespace=\"$namespace\"}) without (instance, pod)", -+ "expr": "max(kube_statefulset_metadata_generation{job=\"kube-state-metrics\", statefulset=\"$statefulset\", namespace=\"$namespace\"}) without (instance, pod)", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "", -@@ -703,35 +703,35 @@ - "steppedLine": false, - "targets": [ - { -- "expr": "max(kube_statefulset_replicas{job=\"kube-state-metrics\", statefulset=\"$statefulset\", cluster=\"$cluster\", namespace=\"$namespace\"}) without (instance, pod)", -+ "expr": "max(kube_statefulset_replicas{job=\"kube-state-metrics\", statefulset=\"$statefulset\", namespace=\"$namespace\"}) without (instance, pod)", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "replicas specified", - "refId": "A" - }, - { -- "expr": "max(kube_statefulset_status_replicas{job=\"kube-state-metrics\", statefulset=\"$statefulset\", cluster=\"$cluster\", namespace=\"$namespace\"}) without (instance, pod)", -+ "expr": "max(kube_statefulset_status_replicas{job=\"kube-state-metrics\", statefulset=\"$statefulset\", namespace=\"$namespace\"}) without (instance, pod)", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "replicas created", - "refId": "B" - }, - { -- "expr": "min(kube_statefulset_status_replicas_ready{job=\"kube-state-metrics\", statefulset=\"$statefulset\", cluster=\"$cluster\", namespace=\"$namespace\"}) without (instance, pod)", -+ "expr": "min(kube_statefulset_status_replicas_ready{job=\"kube-state-metrics\", statefulset=\"$statefulset\", namespace=\"$namespace\"}) without (instance, pod)", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "ready", - "refId": "C" - }, - { -- "expr": "min(kube_statefulset_status_replicas_current{job=\"kube-state-metrics\", statefulset=\"$statefulset\", cluster=\"$cluster\", namespace=\"$namespace\"}) without (instance, pod)", -+ "expr": "min(kube_statefulset_status_replicas_current{job=\"kube-state-metrics\", statefulset=\"$statefulset\", namespace=\"$namespace\"}) without (instance, pod)", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "replicas of current version", - "refId": "D" - }, - { -- "expr": "min(kube_statefulset_status_replicas_updated{job=\"kube-state-metrics\", statefulset=\"$statefulset\", cluster=\"$cluster\", namespace=\"$namespace\"}) without (instance, pod)", -+ "expr": "min(kube_statefulset_status_replicas_updated{job=\"kube-state-metrics\", statefulset=\"$statefulset\", namespace=\"$namespace\"}) without (instance, pod)", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "updated", -@@ -817,32 +817,6 @@ - - }, - "datasource": "$datasource", -- "hide": {{ if .Values.grafana.sidecar.dashboards.multicluster }}0{{ else }}2{{ end }}, -- "includeAll": false, -- "label": "cluster", -- "multi": false, -- "name": "cluster", -- "options": [ -- -- ], -- "query": "label_values(kube_statefulset_metadata_generation, cluster)", -- "refresh": 2, -- "regex": "", -- "sort": 1, -- "tagValuesQuery": "", -- "tags": [ -- -- ], -- "tagsQuery": "", -- "type": "query", -- "useTags": false -- }, -- { -- "allValue": null, -- "current": { -- -- }, -- "datasource": "$datasource", - "hide": 0, - "includeAll": false, - "label": "Namespace", -@@ -851,7 +825,7 @@ - "options": [ - - ], -- "query": "label_values(kube_statefulset_metadata_generation{job=\"kube-state-metrics\", cluster=\"$cluster\"}, namespace)", -+ "query": "label_values(kube_statefulset_metadata_generation{job=\"kube-state-metrics\"}, namespace)", - "refresh": 2, - "regex": "", - "sort": 1, -@@ -877,7 +851,7 @@ - "options": [ - - ], -- "query": "label_values(kube_statefulset_metadata_generation{job=\"kube-state-metrics\", cluster=\"$cluster\", namespace=\"$namespace\"}, statefulset)", -+ "query": "label_values(kube_statefulset_metadata_generation{job=\"kube-state-metrics\", namespace=\"$namespace\"}, statefulset)", - "refresh": 2, - "regex": "", - "sort": 1, diff --git a/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/workload-total.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/workload-total.yaml.patch index 1bc6adf6..0e5e39e5 100644 --- a/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/workload-total.yaml.patch +++ b/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/workload-total.yaml.patch @@ -20,7 +20,8 @@ {{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} labels: {{- if $.Values.grafana.sidecar.dashboards.label }} - {{ $.Values.grafana.sidecar.dashboards.label }}: "1" +- {{ $.Values.grafana.sidecar.dashboards.label }}: "1" ++ {{ $.Values.grafana.sidecar.dashboards.label }}: {{ ternary $.Values.grafana.sidecar.dashboards.labelValue "1" (not (empty $.Values.grafana.sidecar.dashboards.labelValue)) | quote }} {{- end }} - app: {{ template "kube-prometheus-stack.name" $ }}-grafana -{{ include "kube-prometheus-stack.labels" $ | indent 4 }} @@ -119,6 +120,21 @@ "format": "time_series", "intervalFactor": 1, "legendFormat": "{{`{{`}}pod{{`}}`}}", +@@ -1183,11 +1183,11 @@ + "list": [ + { + "current": { +- "text": "default", +- "value": "default" ++ "text": "Prometheus", ++ "value": "Prometheus" + }, + "hide": 0, +- "label": null, ++ "label": "Data Source", + "name": "datasource", + "options": [ + @@ -1198,32 +1198,6 @@ "type": "datasource" }, diff --git a/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/servicemonitor.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/servicemonitor.yaml.patch deleted file mode 100644 index 813a1b29..00000000 --- a/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/servicemonitor.yaml.patch +++ /dev/null @@ -1,27 +0,0 @@ ---- charts-original/templates/grafana/servicemonitor.yaml -+++ charts/templates/grafana/servicemonitor.yaml -@@ -2,11 +2,11 @@ - apiVersion: monitoring.coreos.com/v1 - kind: ServiceMonitor - metadata: -- name: {{ template "kube-prometheus-stack.fullname" . }}-grafana -- namespace: {{ template "kube-prometheus-stack-grafana.namespace" . }} -+ name: {{ template "project-prometheus-stack.fullname" . }}-grafana -+ namespace: {{ template "project-prometheus-stack-grafana.namespace" . }} - labels: -- app: {{ template "kube-prometheus-stack.name" . }}-grafana --{{ include "kube-prometheus-stack.labels" . | indent 4 }} -+ app: {{ template "project-prometheus-stack.name" . }}-grafana -+{{ include "project-prometheus-stack.labels" . | indent 4 }} - spec: - selector: - matchLabels: -@@ -14,7 +14,7 @@ - app.kubernetes.io/instance: {{ $.Release.Name | quote }} - namespaceSelector: - matchNames: -- - {{ printf "%s" (include "kube-prometheus-stack-grafana.namespace" .) | quote }} -+ - {{ printf "%s" (include "project-prometheus-stack-grafana.namespace" .) | quote }} - endpoints: - - port: {{ .Values.grafana.service.portName }} - {{- if .Values.grafana.serviceMonitor.interval }} diff --git a/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/ingress.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/ingress.yaml.patch index e6d1e779..74d383e9 100644 --- a/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/ingress.yaml.patch +++ b/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/ingress.yaml.patch @@ -4,8 +4,9 @@ {{- if and .Values.prometheus.enabled .Values.prometheus.ingress.enabled -}} {{- $pathType := .Values.prometheus.ingress.pathType | default "ImplementationSpecific" -}} - {{- $serviceName := printf "%s-%s" (include "kube-prometheus-stack.fullname" .) "prometheus" -}} +- {{- $servicePort := .Values.prometheus.service.port -}} + {{- $serviceName := printf "%s-%s" (include "project-prometheus-stack.fullname" .) "prometheus" -}} - {{- $servicePort := .Values.prometheus.service.port -}} ++ {{- $servicePort := .Values.prometheus.ingress.servicePort | default .Values.prometheus.service.port -}} {{- $routePrefix := list .Values.prometheus.prometheusSpec.routePrefix -}} {{- $paths := .Values.prometheus.ingress.paths | default $routePrefix -}} - {{- $apiIsStable := eq (include "kube-prometheus-stack.ingress.isStable" .) "true" -}} diff --git a/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/nginx-config.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/nginx-config.yaml.patch index de44c36b..73957ef5 100644 --- a/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/nginx-config.yaml.patch +++ b/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/nginx-config.yaml.patch @@ -14,3 +14,11 @@ {{- if .Values.prometheus.annotations }} annotations: {{ toYaml .Values.prometheus.annotations | indent 4 }} +@@ -54,7 +54,6 @@ + + proxy_pass http://localhost:9090/; + +- sub_filter_types text/html; + sub_filter_once off; + sub_filter 'var PATH_PREFIX = "";' 'var PATH_PREFIX = ".";'; + diff --git a/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/podDisruptionBudget.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/podDisruptionBudget.yaml.patch index 03c147f1..f75fed5b 100644 --- a/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/podDisruptionBudget.yaml.patch +++ b/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/podDisruptionBudget.yaml.patch @@ -23,5 +23,5 @@ matchLabels: app.kubernetes.io/name: prometheus - prometheus: {{ template "kube-prometheus-stack.fullname" . }}-prometheus -+ prometheus: {{ template "project-prometheus-stack.fullname" . }}-prometheus ++ prometheus: {{ template "project-prometheus-stack.prometheus.crname" . }} {{- end }} diff --git a/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/prometheus.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/prometheus.yaml.patch index 1829dc15..e577b95f 100644 --- a/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/prometheus.yaml.patch +++ b/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/prometheus.yaml.patch @@ -6,7 +6,7 @@ metadata: - name: {{ template "kube-prometheus-stack.fullname" . }}-prometheus - namespace: {{ template "kube-prometheus-stack.namespace" . }} -+ name: {{ template "project-prometheus-stack.fullname" . }}-prometheus ++ name: {{ template "project-prometheus-stack.prometheus.crname" . }} + namespace: {{ template "project-prometheus-stack.namespace" . }} labels: - app: {{ template "kube-prometheus-stack.name" . }}-prometheus @@ -27,7 +27,7 @@ port: {{ .Values.alertmanager.alertmanagerSpec.portName }} {{- if .Values.alertmanager.alertmanagerSpec.routePrefix }} pathPrefix: "{{ .Values.alertmanager.alertmanagerSpec.routePrefix }}" -@@ -55,19 +55,14 @@ +@@ -55,19 +55,17 @@ {{- else if .Values.prometheus.prometheusSpec.prometheusExternalLabelName }} prometheusExternalLabelName: "{{ .Values.prometheus.prometheusSpec.prometheusExternalLabelName }}" {{- end }} @@ -35,7 +35,9 @@ - replicaExternalLabelName: "" -{{- else if .Values.prometheus.prometheusSpec.replicaExternalLabelName }} - replicaExternalLabelName: "{{ .Values.prometheus.prometheusSpec.replicaExternalLabelName }}" --{{- end }} ++{{- if .Values.prometheus.prometheusSpec.enableRemoteWriteReceiver }} ++ enableRemoteWriteReceiver: {{ .Values.prometheus.prometheusSpec.enableRemoteWriteReceiver }} + {{- end }} {{- if .Values.prometheus.prometheusSpec.externalUrl }} externalUrl: "{{ tpl .Values.prometheus.prometheusSpec.externalUrl . }}" {{- else if and .Values.prometheus.ingress.enabled .Values.prometheus.ingress.hosts }} @@ -49,7 +51,31 @@ {{- end }} nodeSelector: {{ include "linux-node-selector" . | nindent 4 }} {{- if .Values.prometheus.prometheusSpec.nodeSelector }} -@@ -121,7 +116,7 @@ +@@ -84,6 +82,10 @@ + web: + {{ toYaml .Values.prometheus.prometheusSpec.web | indent 4 }} + {{- end }} ++{{- if .Values.prometheus.prometheusSpec.exemplars }} ++ exemplars: ++ {{ toYaml .Values.prometheus.prometheusSpec.exemplars | indent 4 }} ++{{- end }} + {{- if .Values.prometheus.prometheusSpec.enableFeatures }} + enableFeatures: + {{- range $enableFeatures := .Values.prometheus.prometheusSpec.enableFeatures }} +@@ -107,8 +109,10 @@ + {{- if .Values.prometheus.prometheusSpec.retentionSize }} + retentionSize: {{ .Values.prometheus.prometheusSpec.retentionSize | quote }} + {{- end }} +-{{- if .Values.prometheus.prometheusSpec.walCompression }} +- walCompression: {{ .Values.prometheus.prometheusSpec.walCompression }} ++{{- if eq .Values.prometheus.prometheusSpec.walCompression false }} ++ walCompression: false ++{{ else }} ++ walCompression: true + {{- end }} + {{- if .Values.prometheus.prometheusSpec.routePrefix }} + routePrefix: {{ .Values.prometheus.prometheusSpec.routePrefix | quote }} +@@ -121,7 +125,7 @@ configMaps: {{ toYaml .Values.prometheus.prometheusSpec.configMaps | indent 4 }} {{- end }} @@ -58,7 +84,7 @@ {{- if .Values.prometheus.prometheusSpec.serviceMonitorSelector }} serviceMonitorSelector: {{ toYaml .Values.prometheus.prometheusSpec.serviceMonitorSelector | indent 4 }} -@@ -132,12 +127,7 @@ +@@ -132,12 +136,7 @@ {{ else }} serviceMonitorSelector: {} {{- end }} @@ -72,7 +98,7 @@ {{- if .Values.prometheus.prometheusSpec.podMonitorSelector }} podMonitorSelector: {{ toYaml .Values.prometheus.prometheusSpec.podMonitorSelector | indent 4 }} -@@ -148,12 +138,7 @@ +@@ -148,12 +147,7 @@ {{ else }} podMonitorSelector: {} {{- end }} @@ -86,7 +112,7 @@ {{- if .Values.prometheus.prometheusSpec.probeSelector }} probeSelector: {{ toYaml .Values.prometheus.prometheusSpec.probeSelector | indent 4 }} -@@ -164,47 +149,19 @@ +@@ -164,54 +158,25 @@ {{ else }} probeSelector: {} {{- end }} @@ -133,11 +159,18 @@ ruleSelector: matchLabels: - app: {{ template "kube-prometheus-stack.name" . }} -+ app: {{ template "project-prometheus-stack.name" . }} release: {{ $.Release.Name | quote }} {{ else }} ruleSelector: {} -@@ -233,7 +190,7 @@ + {{- end }} + {{- if .Values.prometheus.prometheusSpec.storageSpec }} + storage: +-{{ toYaml .Values.prometheus.prometheusSpec.storageSpec | indent 4 }} ++{{ tpl (toYaml .Values.prometheus.prometheusSpec.storageSpec | indent 4) . }} + {{- end }} + {{- if .Values.prometheus.prometheusSpec.podMetadata }} + podMetadata: +@@ -233,7 +198,7 @@ labelSelector: matchExpressions: - {key: app.kubernetes.io/name, operator: In, values: [prometheus]} @@ -146,7 +179,7 @@ {{- else if eq .Values.prometheus.prometheusSpec.podAntiAffinity "soft" }} podAntiAffinity: preferredDuringSchedulingIgnoredDuringExecution: -@@ -243,7 +200,7 @@ +@@ -243,7 +208,7 @@ labelSelector: matchExpressions: - {key: app.kubernetes.io/name, operator: In, values: [prometheus]} @@ -155,9 +188,12 @@ {{- end }} {{- end }} tolerations: {{ include "linux-node-tolerations" . | nindent 4 }} -@@ -258,32 +215,11 @@ +@@ -256,34 +221,13 @@ + {{- end }} + {{- if .Values.global.imagePullSecrets }} imagePullSecrets: - {{ toYaml .Values.global.imagePullSecrets | indent 4 }} +-{{ toYaml .Values.global.imagePullSecrets | indent 4 }} ++{{ include "project-prometheus-stack.imagePullSecrets" . | trim | indent 4 }} {{- end }} -{{- if .Values.prometheus.prometheusSpec.additionalScrapeConfigs }} +{{- if .Values.federate.enabled }} @@ -191,7 +227,7 @@ {{- if .Values.prometheus.prometheusSpec.containers }} containers: {{ tpl .Values.prometheus.prometheusSpec.containers $ | indent 4 }} -@@ -295,10 +231,6 @@ +@@ -295,16 +239,10 @@ {{- if .Values.prometheus.prometheusSpec.priorityClassName }} priorityClassName: {{ .Values.prometheus.prometheusSpec.priorityClassName }} {{- end }} @@ -202,7 +238,13 @@ {{- if .Values.prometheus.prometheusSpec.disableCompaction }} disableCompaction: {{ .Values.prometheus.prometheusSpec.disableCompaction }} {{- end }} -@@ -323,16 +255,14 @@ +-{{- if .Values.prometheus.prometheusSpec.portName }} + portName: {{ .Values.prometheus.prometheusSpec.portName }} +-{{- end }} + {{- if .Values.prometheus.prometheusSpec.volumes }} + volumes: + {{ toYaml .Values.prometheus.prometheusSpec.volumes | indent 4 }} +@@ -323,21 +261,28 @@ {{- if .Values.prometheus.prometheusSpec.overrideHonorTimestamps }} overrideHonorTimestamps: {{ .Values.prometheus.prometheusSpec.overrideHonorTimestamps }} {{- end }} @@ -222,3 +264,28 @@ {{- end }} {{- if .Values.prometheus.prometheusSpec.prometheusRulesExcludedFromEnforce }} {{ toYaml .Values.prometheus.prometheusSpec.prometheusRulesExcludedFromEnforce | indent 4 }} + {{- end }} ++ excludedFromEnforcement: ++{{- range $prometheusDefaultRulesExcludedFromEnforce.rules }} ++ - resource: prometheusrules ++ namespace: "{{ template "kube-prometheus-stack.namespace" $ }}" ++ name: "{{ printf "%s-%s" (include "kube-prometheus-stack.fullname" $) . | trunc 63 | trimSuffix "-" }}" + {{- end }} ++{{- if .Values.prometheus.prometheusSpec.excludedFromEnforcement }} ++{{ tpl (toYaml .Values.prometheus.prometheusSpec.excludedFromEnforcement | indent 4) . }} ++{{- end }} ++{{- end }} + {{- if .Values.prometheus.prometheusSpec.queryLogFile }} + queryLogFile: {{ .Values.prometheus.prometheusSpec.queryLogFile }} + {{- end }} +@@ -358,5 +303,8 @@ + {{- end }} + {{- if .Values.prometheus.prometheusSpec.allowOverlappingBlocks }} + allowOverlappingBlocks: {{ .Values.prometheus.prometheusSpec.allowOverlappingBlocks }} ++{{- end }} ++{{- if .Values.prometheus.prometheusSpec.minReadySeconds }} ++ minReadySeconds: {{ .Values.prometheus.prometheusSpec.minReadySeconds }} + {{- end }} +-{{- end }} ++{{- end }} +\ No newline at end of file diff --git a/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/psp.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/psp.yaml.patch index cf621e16..072c5397 100644 --- a/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/psp.yaml.patch +++ b/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/psp.yaml.patch @@ -1,6 +1,6 @@ --- charts-original/templates/prometheus/psp.yaml +++ charts/templates/prometheus/psp.yaml -@@ -2,14 +2,14 @@ +@@ -2,22 +2,16 @@ apiVersion: policy/v1beta1 kind: PodSecurityPolicy metadata: @@ -17,8 +17,31 @@ +{{ include "project-prometheus-stack.labels" . | indent 4 }} spec: privileged: false - # Required to prevent escalations to root. -@@ -54,9 +54,5 @@ +- # Required to prevent escalations to root. +- # allowPrivilegeEscalation: false +- # This is redundant with non-root + disallow privilege escalation, +- # but we can provide it for defense in depth. +- #requiredDropCapabilities: +- # - ALL + # Allow core volume types. + volumes: + - 'configMap' +@@ -41,22 +35,18 @@ + supplementalGroups: + rule: 'MustRunAs' + ranges: +- # Forbid adding the root group. ++ # Allow adding the root group. + - min: 0 + max: 65535 + fsGroup: + rule: 'MustRunAs' + ranges: +- # Forbid adding the root group. ++ # Allow adding the root group. + - min: 0 + max: 65535 + readOnlyRootFilesystem: false {{- if .Values.prometheus.podSecurityPolicy.allowedCapabilities }} allowedCapabilities: {{ toYaml .Values.prometheus.podSecurityPolicy.allowedCapabilities | indent 4 }} diff --git a/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/rules-1.14/alertmanager.rules.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/rules-1.14/alertmanager.rules.yaml.patch index 87cff12b..c173343d 100644 --- a/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/rules-1.14/alertmanager.rules.yaml.patch +++ b/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/rules-1.14/alertmanager.rules.yaml.patch @@ -29,3 +29,138 @@ {{- if .Values.defaultRules.labels }} {{ toYaml .Values.defaultRules.labels | indent 4 }} {{- end }} +@@ -27,10 +27,14 @@ + groups: + - name: alertmanager.rules + rules: ++{{- if not (.Values.defaultRules.disabled.AlertmanagerFailedReload | default false) }} + - alert: AlertmanagerFailedReload + annotations: ++{{- if .Values.defaultRules.additionalRuleAnnotations }} ++{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} ++{{- end }} + description: Configuration has failed to load for {{`{{`}} $labels.namespace {{`}}`}}/{{`{{`}} $labels.pod{{`}}`}}. +- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-alertmanagerfailedreload ++ runbook_url: {{ .Values.defaultRules.runbookUrl }}/alertmanager/alertmanagerfailedreload + summary: Reloading an Alertmanager configuration has failed. + expr: |- + # Without max_over_time, failed scrapes could create false negatives, see +@@ -42,10 +46,15 @@ + {{- if .Values.defaultRules.additionalRuleLabels }} + {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} + {{- end }} ++{{- end }} ++{{- if not (.Values.defaultRules.disabled.AlertmanagerMembersInconsistent | default false) }} + - alert: AlertmanagerMembersInconsistent + annotations: ++{{- if .Values.defaultRules.additionalRuleAnnotations }} ++{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} ++{{- end }} + description: Alertmanager {{`{{`}} $labels.namespace {{`}}`}}/{{`{{`}} $labels.pod{{`}}`}} has only found {{`{{`}} $value {{`}}`}} members of the {{`{{`}}$labels.job{{`}}`}} cluster. +- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-alertmanagermembersinconsistent ++ runbook_url: {{ .Values.defaultRules.runbookUrl }}/alertmanager/alertmanagermembersinconsistent + summary: A member of an Alertmanager cluster has not found all other cluster members. + expr: |- + # Without max_over_time, failed scrapes could create false negatives, see +@@ -59,10 +68,15 @@ + {{- if .Values.defaultRules.additionalRuleLabels }} + {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} + {{- end }} ++{{- end }} ++{{- if not (.Values.defaultRules.disabled.AlertmanagerFailedToSendAlerts | default false) }} + - alert: AlertmanagerFailedToSendAlerts + annotations: ++{{- if .Values.defaultRules.additionalRuleAnnotations }} ++{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} ++{{- end }} + description: Alertmanager {{`{{`}} $labels.namespace {{`}}`}}/{{`{{`}} $labels.pod{{`}}`}} failed to send {{`{{`}} $value | humanizePercentage {{`}}`}} of notifications to {{`{{`}} $labels.integration {{`}}`}}. +- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-alertmanagerfailedtosendalerts ++ runbook_url: {{ .Values.defaultRules.runbookUrl }}/alertmanager/alertmanagerfailedtosendalerts + summary: An Alertmanager instance failed to send notifications. + expr: |- + ( +@@ -77,10 +91,15 @@ + {{- if .Values.defaultRules.additionalRuleLabels }} + {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} + {{- end }} ++{{- end }} ++{{- if not (.Values.defaultRules.disabled.AlertmanagerClusterFailedToSendAlerts | default false) }} + - alert: AlertmanagerClusterFailedToSendAlerts + annotations: ++{{- if .Values.defaultRules.additionalRuleAnnotations }} ++{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} ++{{- end }} + description: The minimum notification failure rate to {{`{{`}} $labels.integration {{`}}`}} sent from any instance in the {{`{{`}}$labels.job{{`}}`}} cluster is {{`{{`}} $value | humanizePercentage {{`}}`}}. +- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-alertmanagerclusterfailedtosendalerts ++ runbook_url: {{ .Values.defaultRules.runbookUrl }}/alertmanager/alertmanagerclusterfailedtosendalerts + summary: All Alertmanager instances in a cluster failed to send notifications to a critical integration. + expr: |- + min by (namespace,service, integration) ( +@@ -95,10 +114,15 @@ + {{- if .Values.defaultRules.additionalRuleLabels }} + {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} + {{- end }} ++{{- end }} ++{{- if not (.Values.defaultRules.disabled.AlertmanagerClusterFailedToSendAlerts | default false) }} + - alert: AlertmanagerClusterFailedToSendAlerts + annotations: ++{{- if .Values.defaultRules.additionalRuleAnnotations }} ++{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} ++{{- end }} + description: The minimum notification failure rate to {{`{{`}} $labels.integration {{`}}`}} sent from any instance in the {{`{{`}}$labels.job{{`}}`}} cluster is {{`{{`}} $value | humanizePercentage {{`}}`}}. +- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-alertmanagerclusterfailedtosendalerts ++ runbook_url: {{ .Values.defaultRules.runbookUrl }}/alertmanager/alertmanagerclusterfailedtosendalerts + summary: All Alertmanager instances in a cluster failed to send notifications to a non-critical integration. + expr: |- + min by (namespace,service, integration) ( +@@ -113,10 +137,15 @@ + {{- if .Values.defaultRules.additionalRuleLabels }} + {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} + {{- end }} ++{{- end }} ++{{- if not (.Values.defaultRules.disabled.AlertmanagerConfigInconsistent | default false) }} + - alert: AlertmanagerConfigInconsistent + annotations: ++{{- if .Values.defaultRules.additionalRuleAnnotations }} ++{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} ++{{- end }} + description: Alertmanager instances within the {{`{{`}}$labels.job{{`}}`}} cluster have different configurations. +- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-alertmanagerconfiginconsistent ++ runbook_url: {{ .Values.defaultRules.runbookUrl }}/alertmanager/alertmanagerconfiginconsistent + summary: Alertmanager instances within the same cluster have different configurations. + expr: |- + count by (namespace,service) ( +@@ -129,10 +158,15 @@ + {{- if .Values.defaultRules.additionalRuleLabels }} + {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} + {{- end }} ++{{- end }} ++{{- if not (.Values.defaultRules.disabled.AlertmanagerClusterDown | default false) }} + - alert: AlertmanagerClusterDown + annotations: ++{{- if .Values.defaultRules.additionalRuleAnnotations }} ++{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} ++{{- end }} + description: '{{`{{`}} $value | humanizePercentage {{`}}`}} of Alertmanager instances within the {{`{{`}}$labels.job{{`}}`}} cluster have been up for less than half of the last 5m.' +- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-alertmanagerclusterdown ++ runbook_url: {{ .Values.defaultRules.runbookUrl }}/alertmanager/alertmanagerclusterdown + summary: Half or more of the Alertmanager instances within the same cluster are down. + expr: |- + ( +@@ -151,10 +185,15 @@ + {{- if .Values.defaultRules.additionalRuleLabels }} + {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} + {{- end }} ++{{- end }} ++{{- if not (.Values.defaultRules.disabled.AlertmanagerClusterCrashlooping | default false) }} + - alert: AlertmanagerClusterCrashlooping + annotations: ++{{- if .Values.defaultRules.additionalRuleAnnotations }} ++{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} ++{{- end }} + description: '{{`{{`}} $value | humanizePercentage {{`}}`}} of Alertmanager instances within the {{`{{`}}$labels.job{{`}}`}} cluster have restarted at least 5 times in the last 10m.' +- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-alertmanagerclustercrashlooping ++ runbook_url: {{ .Values.defaultRules.runbookUrl }}/alertmanager/alertmanagerclustercrashlooping + summary: Half or more of the Alertmanager instances within the same cluster are crashlooping. + expr: |- + ( diff --git a/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/rules-1.14/general.rules.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/rules-1.14/general.rules.yaml.patch index d98a88d2..da80c12c 100644 --- a/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/rules-1.14/general.rules.yaml.patch +++ b/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/rules-1.14/general.rules.yaml.patch @@ -2,7 +2,8 @@ +++ charts/templates/prometheus/rules-1.14/general.rules.yaml @@ -1,18 +1,18 @@ {{- /* - Generated from 'general.rules' group from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/kube-prometheus-prometheusRule.yaml +-Generated from 'general.rules' group from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/kube-prometheus-prometheusRule.yaml ++Generated from 'general.rules' group from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/kubePrometheus-prometheusRule.yaml Do not change in-place! In order to change this file first read following link: -https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack +https://github.com/prometheus-community/helm-charts/tree/main/charts/project-prometheus-stack/hack @@ -24,3 +25,77 @@ {{- if .Values.defaultRules.labels }} {{ toYaml .Values.defaultRules.labels | indent 4 }} {{- end }} +@@ -24,10 +24,14 @@ + groups: + - name: general.rules + rules: ++{{- if not (.Values.defaultRules.disabled.TargetDown | default false) }} + - alert: TargetDown + annotations: ++{{- if .Values.defaultRules.additionalRuleAnnotations }} ++{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} ++{{- end }} + description: '{{`{{`}} printf "%.4g" $value {{`}}`}}% of the {{`{{`}} $labels.job {{`}}`}}/{{`{{`}} $labels.service {{`}}`}} targets in {{`{{`}} $labels.namespace {{`}}`}} namespace are down.' +- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-targetdown ++ runbook_url: {{ .Values.defaultRules.runbookUrl }}/general/targetdown + summary: One or more targets are unreachable. + expr: 100 * (count(up == 0) BY (job, namespace, service) / count(up) BY (job, namespace, service)) > 10 + for: 10m +@@ -36,8 +40,13 @@ + {{- if .Values.defaultRules.additionalRuleLabels }} + {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} + {{- end }} ++{{- end }} ++{{- if not (.Values.defaultRules.disabled.Watchdog | default false) }} + - alert: Watchdog + annotations: ++{{- if .Values.defaultRules.additionalRuleAnnotations }} ++{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} ++{{- end }} + description: 'This is an alert meant to ensure that the entire alerting pipeline is functional. + + This alert is always firing, therefore it should always be firing in Alertmanager +@@ -49,12 +58,41 @@ + "DeadMansSnitch" integration in PagerDuty. + + ' +- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-watchdog ++ runbook_url: {{ .Values.defaultRules.runbookUrl }}/general/watchdog + summary: An alert that should always be firing to certify that Alertmanager is working properly. + expr: vector(1) + labels: + severity: none + {{- if .Values.defaultRules.additionalRuleLabels }} + {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} ++{{- end }} ++{{- end }} ++{{- if not (.Values.defaultRules.disabled.InfoInhibitor | default false) }} ++ - alert: InfoInhibitor ++ annotations: ++{{- if .Values.defaultRules.additionalRuleAnnotations }} ++{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} ++{{- end }} ++ description: 'This is an alert that is used to inhibit info alerts. ++ ++ By themselves, the info-level alerts are sometimes very noisy, but they are relevant when combined with ++ ++ other alerts. ++ ++ This alert fires whenever there''s a severity="info" alert, and stops firing when another alert with a ++ ++ severity of ''warning'' or ''critical'' starts firing on the same namespace. ++ ++ This alert should be routed to a null receiver and configured to inhibit alerts with severity="info". ++ ++ ' ++ runbook_url: {{ .Values.defaultRules.runbookUrl }}/general/infoinhibitor ++ summary: Info-level alert inhibition. ++ expr: ALERTS{severity = "info"} == 1 unless on(namespace) ALERTS{alertname != "InfoInhibitor", severity =~ "warning|critical", alertstate="firing"} == 1 ++ labels: ++ severity: none ++{{- if .Values.defaultRules.additionalRuleLabels }} ++{{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} ++{{- end }} + {{- end }} + {{- end }} +\ No newline at end of file diff --git a/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/rules-1.14/kubernetes-apps.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/rules-1.14/kubernetes-apps.yaml.patch index 8ddebf60..788fd89d 100644 --- a/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/rules-1.14/kubernetes-apps.yaml.patch +++ b/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/rules-1.14/kubernetes-apps.yaml.patch @@ -2,7 +2,8 @@ +++ charts/templates/prometheus/rules-1.14/kubernetes-apps.yaml @@ -1,7 +1,7 @@ {{- /* - Generated from 'kubernetes-apps' group from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/kubernetes-prometheusRule.yaml +-Generated from 'kubernetes-apps' group from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/kubernetes-prometheusRule.yaml ++Generated from 'kubernetes-apps' group from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/kubernetesControlPlane-prometheusRule.yaml Do not change in-place! In order to change this file first read following link: -https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack +https://github.com/prometheus-community/helm-charts/tree/main/charts/project-prometheus-stack/hack @@ -25,3 +26,312 @@ {{- if .Values.defaultRules.labels }} {{ toYaml .Values.defaultRules.labels | indent 4 }} {{- end }} +@@ -25,32 +25,38 @@ + groups: + - name: kubernetes-apps + rules: ++{{- if not (.Values.defaultRules.disabled.KubePodCrashLooping | default false) }} + - alert: KubePodCrashLooping + annotations: +- description: Pod {{`{{`}} $labels.namespace {{`}}`}}/{{`{{`}} $labels.pod {{`}}`}} ({{`{{`}} $labels.container {{`}}`}}) is restarting {{`{{`}} printf "%.2f" $value {{`}}`}} times / 10 minutes. +- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubepodcrashlooping ++{{- if .Values.defaultRules.additionalRuleAnnotations }} ++{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} ++{{- end }} ++ description: 'Pod {{`{{`}} $labels.namespace {{`}}`}}/{{`{{`}} $labels.pod {{`}}`}} ({{`{{`}} $labels.container {{`}}`}}) is in waiting state (reason: "CrashLoopBackOff").' ++ runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubepodcrashlooping + summary: Pod is crash looping. +- expr: |- +- increase(kube_pod_container_status_restarts_total{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"}[10m]) > 0 +- and +- kube_pod_container_status_waiting{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"} == 1 ++ expr: max_over_time(kube_pod_container_status_waiting_reason{reason="CrashLoopBackOff", job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"}[5m]) >= 1 + for: 15m + labels: + severity: warning + {{- if .Values.defaultRules.additionalRuleLabels }} + {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} + {{- end }} ++{{- end }} ++{{- if not (.Values.defaultRules.disabled.KubePodNotReady | default false) }} + - alert: KubePodNotReady + annotations: ++{{- if .Values.defaultRules.additionalRuleAnnotations }} ++{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} ++{{- end }} + description: Pod {{`{{`}} $labels.namespace {{`}}`}}/{{`{{`}} $labels.pod {{`}}`}} has been in a non-ready state for longer than 15 minutes. +- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubepodnotready ++ runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubepodnotready + summary: Pod has been in a non-ready state for more than 15 minutes. + expr: |- +- sum by (namespace, pod) ( +- max by(namespace, pod) ( ++ sum by (namespace, pod, cluster) ( ++ max by(namespace, pod, cluster) ( + kube_pod_status_phase{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}", phase=~"Pending|Unknown"} +- ) * on(namespace, pod) group_left(owner_kind) topk by(namespace, pod) ( +- 1, max by(namespace, pod, owner_kind) (kube_pod_owner{owner_kind!="Job"}) ++ ) * on(namespace, pod, cluster) group_left(owner_kind) topk by(namespace, pod, cluster) ( ++ 1, max by(namespace, pod, owner_kind, cluster) (kube_pod_owner{owner_kind!="Job"}) + ) + ) > 0 + for: 15m +@@ -59,10 +65,15 @@ + {{- if .Values.defaultRules.additionalRuleLabels }} + {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} + {{- end }} ++{{- end }} ++{{- if not (.Values.defaultRules.disabled.KubeDeploymentGenerationMismatch | default false) }} + - alert: KubeDeploymentGenerationMismatch + annotations: ++{{- if .Values.defaultRules.additionalRuleAnnotations }} ++{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} ++{{- end }} + description: Deployment generation for {{`{{`}} $labels.namespace {{`}}`}}/{{`{{`}} $labels.deployment {{`}}`}} does not match, this indicates that the Deployment has failed but has not been rolled back. +- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubedeploymentgenerationmismatch ++ runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubedeploymentgenerationmismatch + summary: Deployment generation mismatch due to possible roll-back + expr: |- + kube_deployment_status_observed_generation{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"} +@@ -74,10 +85,15 @@ + {{- if .Values.defaultRules.additionalRuleLabels }} + {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} + {{- end }} ++{{- end }} ++{{- if not (.Values.defaultRules.disabled.KubeDeploymentReplicasMismatch | default false) }} + - alert: KubeDeploymentReplicasMismatch + annotations: ++{{- if .Values.defaultRules.additionalRuleAnnotations }} ++{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} ++{{- end }} + description: Deployment {{`{{`}} $labels.namespace {{`}}`}}/{{`{{`}} $labels.deployment {{`}}`}} has not matched the expected number of replicas for longer than 15 minutes. +- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubedeploymentreplicasmismatch ++ runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubedeploymentreplicasmismatch + summary: Deployment has not matched the expected number of replicas. + expr: |- + ( +@@ -95,10 +111,15 @@ + {{- if .Values.defaultRules.additionalRuleLabels }} + {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} + {{- end }} ++{{- end }} ++{{- if not (.Values.defaultRules.disabled.KubeStatefulSetReplicasMismatch | default false) }} + - alert: KubeStatefulSetReplicasMismatch + annotations: ++{{- if .Values.defaultRules.additionalRuleAnnotations }} ++{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} ++{{- end }} + description: StatefulSet {{`{{`}} $labels.namespace {{`}}`}}/{{`{{`}} $labels.statefulset {{`}}`}} has not matched the expected number of replicas for longer than 15 minutes. +- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubestatefulsetreplicasmismatch ++ runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubestatefulsetreplicasmismatch + summary: Deployment has not matched the expected number of replicas. + expr: |- + ( +@@ -116,10 +137,15 @@ + {{- if .Values.defaultRules.additionalRuleLabels }} + {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} + {{- end }} ++{{- end }} ++{{- if not (.Values.defaultRules.disabled.KubeStatefulSetGenerationMismatch | default false) }} + - alert: KubeStatefulSetGenerationMismatch + annotations: ++{{- if .Values.defaultRules.additionalRuleAnnotations }} ++{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} ++{{- end }} + description: StatefulSet generation for {{`{{`}} $labels.namespace {{`}}`}}/{{`{{`}} $labels.statefulset {{`}}`}} does not match, this indicates that the StatefulSet has failed but has not been rolled back. +- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubestatefulsetgenerationmismatch ++ runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubestatefulsetgenerationmismatch + summary: StatefulSet generation mismatch due to possible roll-back + expr: |- + kube_statefulset_status_observed_generation{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"} +@@ -131,10 +157,15 @@ + {{- if .Values.defaultRules.additionalRuleLabels }} + {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} + {{- end }} ++{{- end }} ++{{- if not (.Values.defaultRules.disabled.KubeStatefulSetUpdateNotRolledOut | default false) }} + - alert: KubeStatefulSetUpdateNotRolledOut + annotations: ++{{- if .Values.defaultRules.additionalRuleAnnotations }} ++{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} ++{{- end }} + description: StatefulSet {{`{{`}} $labels.namespace {{`}}`}}/{{`{{`}} $labels.statefulset {{`}}`}} update has not been rolled out. +- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubestatefulsetupdatenotrolledout ++ runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubestatefulsetupdatenotrolledout + summary: StatefulSet update has not been rolled out. + expr: |- + ( +@@ -160,10 +191,15 @@ + {{- if .Values.defaultRules.additionalRuleLabels }} + {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} + {{- end }} ++{{- end }} ++{{- if not (.Values.defaultRules.disabled.KubeDaemonSetRolloutStuck | default false) }} + - alert: KubeDaemonSetRolloutStuck + annotations: ++{{- if .Values.defaultRules.additionalRuleAnnotations }} ++{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} ++{{- end }} + description: DaemonSet {{`{{`}} $labels.namespace {{`}}`}}/{{`{{`}} $labels.daemonset {{`}}`}} has not finished or progressed for at least 15 minutes. +- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubedaemonsetrolloutstuck ++ runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubedaemonsetrolloutstuck + summary: DaemonSet rollout is stuck. + expr: |- + ( +@@ -176,7 +212,7 @@ + != + 0 + ) or ( +- kube_daemonset_updated_number_scheduled{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"} ++ kube_daemonset_status_updated_number_scheduled{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"} + != + kube_daemonset_status_desired_number_scheduled{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"} + ) or ( +@@ -185,7 +221,7 @@ + kube_daemonset_status_desired_number_scheduled{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"} + ) + ) and ( +- changes(kube_daemonset_updated_number_scheduled{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"}[5m]) ++ changes(kube_daemonset_status_updated_number_scheduled{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"}[5m]) + == + 0 + ) +@@ -195,22 +231,32 @@ + {{- if .Values.defaultRules.additionalRuleLabels }} + {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} + {{- end }} ++{{- end }} ++{{- if not (.Values.defaultRules.disabled.KubeContainerWaiting | default false) }} + - alert: KubeContainerWaiting + annotations: +- description: Pod {{`{{`}} $labels.namespace {{`}}`}}/{{`{{`}} $labels.pod {{`}}`}} container {{`{{`}} $labels.container{{`}}`}} has been in waiting state for longer than 1 hour. +- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubecontainerwaiting ++{{- if .Values.defaultRules.additionalRuleAnnotations }} ++{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} ++{{- end }} ++ description: pod/{{`{{`}} $labels.pod {{`}}`}} in namespace {{`{{`}} $labels.namespace {{`}}`}} on container {{`{{`}} $labels.container{{`}}`}} has been in waiting state for longer than 1 hour. ++ runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubecontainerwaiting + summary: Pod container waiting longer than 1 hour +- expr: sum by (namespace, pod, container) (kube_pod_container_status_waiting_reason{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"}) > 0 ++ expr: sum by (namespace, pod, container, cluster) (kube_pod_container_status_waiting_reason{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"}) > 0 + for: 1h + labels: + severity: warning + {{- if .Values.defaultRules.additionalRuleLabels }} + {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} + {{- end }} ++{{- end }} ++{{- if not (.Values.defaultRules.disabled.KubeDaemonSetNotScheduled | default false) }} + - alert: KubeDaemonSetNotScheduled + annotations: ++{{- if .Values.defaultRules.additionalRuleAnnotations }} ++{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} ++{{- end }} + description: '{{`{{`}} $value {{`}}`}} Pods of DaemonSet {{`{{`}} $labels.namespace {{`}}`}}/{{`{{`}} $labels.daemonset {{`}}`}} are not scheduled.' +- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubedaemonsetnotscheduled ++ runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubedaemonsetnotscheduled + summary: DaemonSet pods are not scheduled. + expr: |- + kube_daemonset_status_desired_number_scheduled{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"} +@@ -222,10 +268,15 @@ + {{- if .Values.defaultRules.additionalRuleLabels }} + {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} + {{- end }} ++{{- end }} ++{{- if not (.Values.defaultRules.disabled.KubeDaemonSetMisScheduled | default false) }} + - alert: KubeDaemonSetMisScheduled + annotations: ++{{- if .Values.defaultRules.additionalRuleAnnotations }} ++{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} ++{{- end }} + description: '{{`{{`}} $value {{`}}`}} Pods of DaemonSet {{`{{`}} $labels.namespace {{`}}`}}/{{`{{`}} $labels.daemonset {{`}}`}} are running where they are not supposed to run.' +- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubedaemonsetmisscheduled ++ runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubedaemonsetmisscheduled + summary: DaemonSet pods are misscheduled. + expr: kube_daemonset_status_number_misscheduled{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"} > 0 + for: 15m +@@ -234,22 +285,34 @@ + {{- if .Values.defaultRules.additionalRuleLabels }} + {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} + {{- end }} +- - alert: KubeJobCompletion ++{{- end }} ++{{- if not (.Values.defaultRules.disabled.KubeJobNotCompleted | default false) }} ++ - alert: KubeJobNotCompleted + annotations: +- description: Job {{`{{`}} $labels.namespace {{`}}`}}/{{`{{`}} $labels.job_name {{`}}`}} is taking more than 12 hours to complete. +- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubejobcompletion ++{{- if .Values.defaultRules.additionalRuleAnnotations }} ++{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} ++{{- end }} ++ description: Job {{`{{`}} $labels.namespace {{`}}`}}/{{`{{`}} $labels.job_name {{`}}`}} is taking more than {{`{{`}} "43200" | humanizeDuration {{`}}`}} to complete. ++ runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubejobnotcompleted + summary: Job did not complete in time +- expr: kube_job_spec_completions{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"} - kube_job_status_succeeded{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"} > 0 +- for: 12h ++ expr: |- ++ time() - max by(namespace, job_name, cluster) (kube_job_status_start_time{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"} ++ and ++ kube_job_status_active{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"} > 0) > 43200 + labels: + severity: warning + {{- if .Values.defaultRules.additionalRuleLabels }} + {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} + {{- end }} ++{{- end }} ++{{- if not (.Values.defaultRules.disabled.KubeJobFailed | default false) }} + - alert: KubeJobFailed + annotations: ++{{- if .Values.defaultRules.additionalRuleAnnotations }} ++{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} ++{{- end }} + description: Job {{`{{`}} $labels.namespace {{`}}`}}/{{`{{`}} $labels.job_name {{`}}`}} failed to complete. Removing failed job after investigation should clear this alert. +- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubejobfailed ++ runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubejobfailed + summary: Job failed to complete. + expr: kube_job_failed{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"} > 0 + for: 15m +@@ -258,11 +321,16 @@ + {{- if .Values.defaultRules.additionalRuleLabels }} + {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} + {{- end }} ++{{- end }} ++{{- if not (.Values.defaultRules.disabled.KubeHpaReplicasMismatch | default false) }} + - alert: KubeHpaReplicasMismatch + annotations: ++{{- if .Values.defaultRules.additionalRuleAnnotations }} ++{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} ++{{- end }} + description: HPA {{`{{`}} $labels.namespace {{`}}`}}/{{`{{`}} $labels.horizontalpodautoscaler {{`}}`}} has not matched the desired number of replicas for longer than 15 minutes. +- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubehpareplicasmismatch +- summary: HPA has not matched descired number of replicas. ++ runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubehpareplicasmismatch ++ summary: HPA has not matched desired number of replicas. + expr: |- + (kube_horizontalpodautoscaler_status_desired_replicas{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"} + != +@@ -283,10 +351,15 @@ + {{- if .Values.defaultRules.additionalRuleLabels }} + {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} + {{- end }} ++{{- end }} ++{{- if not (.Values.defaultRules.disabled.KubeHpaMaxedOut | default false) }} + - alert: KubeHpaMaxedOut + annotations: ++{{- if .Values.defaultRules.additionalRuleAnnotations }} ++{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} ++{{- end }} + description: HPA {{`{{`}} $labels.namespace {{`}}`}}/{{`{{`}} $labels.horizontalpodautoscaler {{`}}`}} has been running at max replicas for longer than 15 minutes. +- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubehpamaxedout ++ runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubehpamaxedout + summary: HPA is running at max replicas + expr: |- + kube_horizontalpodautoscaler_status_current_replicas{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"} +@@ -297,5 +370,6 @@ + severity: warning + {{- if .Values.defaultRules.additionalRuleLabels }} + {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} ++{{- end }} + {{- end }} + {{- end }} +\ No newline at end of file diff --git a/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/rules-1.14/kubernetes-storage.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/rules-1.14/kubernetes-storage.yaml.patch index 326a0e4a..743abfa9 100644 --- a/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/rules-1.14/kubernetes-storage.yaml.patch +++ b/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/rules-1.14/kubernetes-storage.yaml.patch @@ -2,7 +2,8 @@ +++ charts/templates/prometheus/rules-1.14/kubernetes-storage.yaml @@ -1,7 +1,7 @@ {{- /* - Generated from 'kubernetes-storage' group from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/kubernetes-prometheusRule.yaml +-Generated from 'kubernetes-storage' group from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/kubernetes-prometheusRule.yaml ++Generated from 'kubernetes-storage' group from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/kubernetesControlPlane-prometheusRule.yaml Do not change in-place! In order to change this file first read following link: -https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack +https://github.com/prometheus-community/helm-charts/tree/main/charts/project-prometheus-stack/hack @@ -25,8 +26,19 @@ {{- if .Values.defaultRules.labels }} {{ toYaml .Values.defaultRules.labels | indent 4 }} {{- end }} -@@ -31,12 +31,12 @@ - runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubepersistentvolumefillingup +@@ -25,49 +25,129 @@ + groups: + - name: kubernetes-storage + rules: ++{{- if not (.Values.defaultRules.disabled.KubePersistentVolumeFillingUp | default false) }} + - alert: KubePersistentVolumeFillingUp + annotations: ++{{- if .Values.defaultRules.additionalRuleAnnotations }} ++{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} ++{{- end }} + description: The PersistentVolume claimed by {{`{{`}} $labels.persistentvolumeclaim {{`}}`}} in Namespace {{`{{`}} $labels.namespace {{`}}`}} is only {{`{{`}} $value | humanizePercentage {{`}}`}} free. +- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubepersistentvolumefillingup ++ runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubepersistentvolumefillingup summary: PersistentVolume is filling up. expr: |- - kubelet_volume_stats_available_bytes{job="{{ include "exporter.kubelet.jobName" . }}", namespace=~"{{ $targetNamespace }}", metrics_path="/metrics"} @@ -38,10 +50,26 @@ and - kubelet_volume_stats_used_bytes{job="{{ include "exporter.kubelet.jobName" . }}", namespace=~"{{ $targetNamespace }}", metrics_path="/metrics"} > 0 + kubelet_volume_stats_used_bytes{namespace=~"{{ $targetNamespace }}", metrics_path="/metrics"} > 0 ++ unless on(namespace, persistentvolumeclaim) ++ kube_persistentvolumeclaim_access_mode{ access_mode="ReadOnlyMany"} == 1 ++ unless on(namespace, persistentvolumeclaim) ++ kube_persistentvolumeclaim_labels{label_excluded_from_alerts="true"} == 1 for: 1m labels: severity: critical -@@ -50,14 +50,14 @@ + {{- if .Values.defaultRules.additionalRuleLabels }} + {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} + {{- end }} ++{{- end }} ++{{- if not (.Values.defaultRules.disabled.KubePersistentVolumeFillingUp | default false) }} + - alert: KubePersistentVolumeFillingUp + annotations: ++{{- if .Values.defaultRules.additionalRuleAnnotations }} ++{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} ++{{- end }} + description: Based on recent sampling, the PersistentVolume claimed by {{`{{`}} $labels.persistentvolumeclaim {{`}}`}} in Namespace {{`{{`}} $labels.namespace {{`}}`}} is expected to fill up within four days. Currently {{`{{`}} $value | humanizePercentage {{`}}`}} is available. +- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubepersistentvolumefillingup ++ runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubepersistentvolumefillingup summary: PersistentVolume is filling up. expr: |- ( @@ -57,6 +85,92 @@ and - predict_linear(kubelet_volume_stats_available_bytes{job="{{ include "exporter.kubelet.jobName" . }}", namespace=~"{{ $targetNamespace }}", metrics_path="/metrics"}[6h], 4 * 24 * 3600) < 0 + predict_linear(kubelet_volume_stats_available_bytes{namespace=~"{{ $targetNamespace }}", metrics_path="/metrics"}[6h], 4 * 24 * 3600) < 0 ++ unless on(namespace, persistentvolumeclaim) ++ kube_persistentvolumeclaim_access_mode{ access_mode="ReadOnlyMany"} == 1 ++ unless on(namespace, persistentvolumeclaim) ++ kube_persistentvolumeclaim_labels{label_excluded_from_alerts="true"} == 1 for: 1h labels: severity: warning + {{- if .Values.defaultRules.additionalRuleLabels }} + {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} + {{- end }} ++{{- end }} ++{{- if not (.Values.defaultRules.disabled.KubePersistentVolumeInodesFillingUp | default false) }} ++ - alert: KubePersistentVolumeInodesFillingUp ++ annotations: ++{{- if .Values.defaultRules.additionalRuleAnnotations }} ++{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} ++{{- end }} ++ description: The PersistentVolume claimed by {{`{{`}} $labels.persistentvolumeclaim {{`}}`}} in Namespace {{`{{`}} $labels.namespace {{`}}`}} only has {{`{{`}} $value | humanizePercentage {{`}}`}} free inodes. ++ runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubepersistentvolumeinodesfillingup ++ summary: PersistentVolumeInodes are filling up. ++ expr: |- ++ ( ++ kubelet_volume_stats_inodes_free{job="{{ include "exporter.kubelet.jobName" . }}", namespace=~"{{ $targetNamespace }}", metrics_path="/metrics"} ++ / ++ kubelet_volume_stats_inodes{job="{{ include "exporter.kubelet.jobName" . }}", namespace=~"{{ $targetNamespace }}", metrics_path="/metrics"} ++ ) < 0.03 ++ and ++ kubelet_volume_stats_inodes_used{job="{{ include "exporter.kubelet.jobName" . }}", namespace=~"{{ $targetNamespace }}", metrics_path="/metrics"} > 0 ++ unless on(namespace, persistentvolumeclaim) ++ kube_persistentvolumeclaim_access_mode{ access_mode="ReadOnlyMany"} == 1 ++ unless on(namespace, persistentvolumeclaim) ++ kube_persistentvolumeclaim_labels{label_excluded_from_alerts="true"} == 1 ++ for: 1m ++ labels: ++ severity: critical ++{{- if .Values.defaultRules.additionalRuleLabels }} ++{{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} ++{{- end }} ++{{- end }} ++{{- if not (.Values.defaultRules.disabled.KubePersistentVolumeInodesFillingUp | default false) }} ++ - alert: KubePersistentVolumeInodesFillingUp ++ annotations: ++{{- if .Values.defaultRules.additionalRuleAnnotations }} ++{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} ++{{- end }} ++ description: Based on recent sampling, the PersistentVolume claimed by {{`{{`}} $labels.persistentvolumeclaim {{`}}`}} in Namespace {{`{{`}} $labels.namespace {{`}}`}} is expected to run out of inodes within four days. Currently {{`{{`}} $value | humanizePercentage {{`}}`}} of its inodes are free. ++ runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubepersistentvolumeinodesfillingup ++ summary: PersistentVolumeInodes are filling up. ++ expr: |- ++ ( ++ kubelet_volume_stats_inodes_free{job="{{ include "exporter.kubelet.jobName" . }}", namespace=~"{{ $targetNamespace }}", metrics_path="/metrics"} ++ / ++ kubelet_volume_stats_inodes{job="{{ include "exporter.kubelet.jobName" . }}", namespace=~"{{ $targetNamespace }}", metrics_path="/metrics"} ++ ) < 0.15 ++ and ++ kubelet_volume_stats_inodes_used{job="{{ include "exporter.kubelet.jobName" . }}", namespace=~"{{ $targetNamespace }}", metrics_path="/metrics"} > 0 ++ and ++ predict_linear(kubelet_volume_stats_inodes_free{job="{{ include "exporter.kubelet.jobName" . }}", namespace=~"{{ $targetNamespace }}", metrics_path="/metrics"}[6h], 4 * 24 * 3600) < 0 ++ unless on(namespace, persistentvolumeclaim) ++ kube_persistentvolumeclaim_access_mode{ access_mode="ReadOnlyMany"} == 1 ++ unless on(namespace, persistentvolumeclaim) ++ kube_persistentvolumeclaim_labels{label_excluded_from_alerts="true"} == 1 ++ for: 1h ++ labels: ++ severity: warning ++{{- if .Values.defaultRules.additionalRuleLabels }} ++{{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} ++{{- end }} ++{{- end }} ++{{- if not (.Values.defaultRules.disabled.KubePersistentVolumeErrors | default false) }} + - alert: KubePersistentVolumeErrors + annotations: ++{{- if .Values.defaultRules.additionalRuleAnnotations }} ++{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} ++{{- end }} + description: The persistent volume {{`{{`}} $labels.persistentvolume {{`}}`}} has status {{`{{`}} $labels.phase {{`}}`}}. +- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubepersistentvolumeerrors ++ runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubepersistentvolumeerrors + summary: PersistentVolume is having issues with provisioning. + expr: kube_persistentvolume_status_phase{phase=~"Failed|Pending",job="kube-state-metrics"} > 0 + for: 5m +@@ -75,5 +155,6 @@ + severity: critical + {{- if .Values.defaultRules.additionalRuleLabels }} + {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} ++{{- end }} + {{- end }} + {{- end }} +\ No newline at end of file diff --git a/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/rules-1.14/prometheus.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/rules-1.14/prometheus.yaml.patch index 1cf29947..dc7f28c8 100644 --- a/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/rules-1.14/prometheus.yaml.patch +++ b/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/rules-1.14/prometheus.yaml.patch @@ -28,3 +28,367 @@ {{- if .Values.defaultRules.labels }} {{ toYaml .Values.defaultRules.labels | indent 4 }} {{- end }} +@@ -26,10 +26,14 @@ + groups: + - name: prometheus + rules: ++{{- if not (.Values.defaultRules.disabled.PrometheusBadConfig | default false) }} + - alert: PrometheusBadConfig + annotations: ++{{- if .Values.defaultRules.additionalRuleAnnotations }} ++{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} ++{{- end }} + description: Prometheus {{`{{`}}$labels.namespace{{`}}`}}/{{`{{`}}$labels.pod{{`}}`}} has failed to reload its configuration. +- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-prometheusbadconfig ++ runbook_url: {{ .Values.defaultRules.runbookUrl }}/prometheus/prometheusbadconfig + summary: Failed Prometheus configuration reload. + expr: |- + # Without max_over_time, failed scrapes could create false negatives, see +@@ -41,10 +45,15 @@ + {{- if .Values.defaultRules.additionalRuleLabels }} + {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} + {{- end }} ++{{- end }} ++{{- if not (.Values.defaultRules.disabled.PrometheusNotificationQueueRunningFull | default false) }} + - alert: PrometheusNotificationQueueRunningFull + annotations: ++{{- if .Values.defaultRules.additionalRuleAnnotations }} ++{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} ++{{- end }} + description: Alert notification queue of Prometheus {{`{{`}}$labels.namespace{{`}}`}}/{{`{{`}}$labels.pod{{`}}`}} is running full. +- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-prometheusnotificationqueuerunningfull ++ runbook_url: {{ .Values.defaultRules.runbookUrl }}/prometheus/prometheusnotificationqueuerunningfull + summary: Prometheus alert notification queue predicted to run full in less than 30m. + expr: |- + # Without min_over_time, failed scrapes could create false negatives, see +@@ -60,10 +69,15 @@ + {{- if .Values.defaultRules.additionalRuleLabels }} + {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} + {{- end }} ++{{- end }} ++{{- if not (.Values.defaultRules.disabled.PrometheusErrorSendingAlertsToSomeAlertmanagers | default false) }} + - alert: PrometheusErrorSendingAlertsToSomeAlertmanagers + annotations: ++{{- if .Values.defaultRules.additionalRuleAnnotations }} ++{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} ++{{- end }} + description: '{{`{{`}} printf "%.1f" $value {{`}}`}}% errors while sending alerts from Prometheus {{`{{`}}$labels.namespace{{`}}`}}/{{`{{`}}$labels.pod{{`}}`}} to Alertmanager {{`{{`}}$labels.alertmanager{{`}}`}}.' +- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-prometheuserrorsendingalertstosomealertmanagers ++ runbook_url: {{ .Values.defaultRules.runbookUrl }}/prometheus/prometheuserrorsendingalertstosomealertmanagers + summary: Prometheus has encountered more than 1% errors sending alerts to a specific Alertmanager. + expr: |- + ( +@@ -79,10 +93,15 @@ + {{- if .Values.defaultRules.additionalRuleLabels }} + {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} + {{- end }} ++{{- end }} ++{{- if not (.Values.defaultRules.disabled.PrometheusNotConnectedToAlertmanagers | default false) }} + - alert: PrometheusNotConnectedToAlertmanagers + annotations: ++{{- if .Values.defaultRules.additionalRuleAnnotations }} ++{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} ++{{- end }} + description: Prometheus {{`{{`}}$labels.namespace{{`}}`}}/{{`{{`}}$labels.pod{{`}}`}} is not connected to any Alertmanagers. +- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-prometheusnotconnectedtoalertmanagers ++ runbook_url: {{ .Values.defaultRules.runbookUrl }}/prometheus/prometheusnotconnectedtoalertmanagers + summary: Prometheus is not connected to any Alertmanagers. + expr: |- + # Without max_over_time, failed scrapes could create false negatives, see +@@ -94,10 +113,15 @@ + {{- if .Values.defaultRules.additionalRuleLabels }} + {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} + {{- end }} ++{{- end }} ++{{- if not (.Values.defaultRules.disabled.PrometheusTSDBReloadsFailing | default false) }} + - alert: PrometheusTSDBReloadsFailing + annotations: ++{{- if .Values.defaultRules.additionalRuleAnnotations }} ++{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} ++{{- end }} + description: Prometheus {{`{{`}}$labels.namespace{{`}}`}}/{{`{{`}}$labels.pod{{`}}`}} has detected {{`{{`}}$value | humanize{{`}}`}} reload failures over the last 3h. +- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-prometheustsdbreloadsfailing ++ runbook_url: {{ .Values.defaultRules.runbookUrl }}/prometheus/prometheustsdbreloadsfailing + summary: Prometheus has issues reloading blocks from disk. + expr: increase(prometheus_tsdb_reloads_failures_total{job="{{ $prometheusJob }}",namespace="{{ $namespace }}"}[3h]) > 0 + for: 4h +@@ -106,10 +130,15 @@ + {{- if .Values.defaultRules.additionalRuleLabels }} + {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} + {{- end }} ++{{- end }} ++{{- if not (.Values.defaultRules.disabled.PrometheusTSDBCompactionsFailing | default false) }} + - alert: PrometheusTSDBCompactionsFailing + annotations: ++{{- if .Values.defaultRules.additionalRuleAnnotations }} ++{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} ++{{- end }} + description: Prometheus {{`{{`}}$labels.namespace{{`}}`}}/{{`{{`}}$labels.pod{{`}}`}} has detected {{`{{`}}$value | humanize{{`}}`}} compaction failures over the last 3h. +- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-prometheustsdbcompactionsfailing ++ runbook_url: {{ .Values.defaultRules.runbookUrl }}/prometheus/prometheustsdbcompactionsfailing + summary: Prometheus has issues compacting blocks. + expr: increase(prometheus_tsdb_compactions_failed_total{job="{{ $prometheusJob }}",namespace="{{ $namespace }}"}[3h]) > 0 + for: 4h +@@ -118,10 +147,15 @@ + {{- if .Values.defaultRules.additionalRuleLabels }} + {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} + {{- end }} ++{{- end }} ++{{- if not (.Values.defaultRules.disabled.PrometheusNotIngestingSamples | default false) }} + - alert: PrometheusNotIngestingSamples + annotations: ++{{- if .Values.defaultRules.additionalRuleAnnotations }} ++{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} ++{{- end }} + description: Prometheus {{`{{`}}$labels.namespace{{`}}`}}/{{`{{`}}$labels.pod{{`}}`}} is not ingesting samples. +- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-prometheusnotingestingsamples ++ runbook_url: {{ .Values.defaultRules.runbookUrl }}/prometheus/prometheusnotingestingsamples + summary: Prometheus is not ingesting samples. + expr: |- + ( +@@ -139,10 +173,15 @@ + {{- if .Values.defaultRules.additionalRuleLabels }} + {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} + {{- end }} ++{{- end }} ++{{- if not (.Values.defaultRules.disabled.PrometheusDuplicateTimestamps | default false) }} + - alert: PrometheusDuplicateTimestamps + annotations: ++{{- if .Values.defaultRules.additionalRuleAnnotations }} ++{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} ++{{- end }} + description: Prometheus {{`{{`}}$labels.namespace{{`}}`}}/{{`{{`}}$labels.pod{{`}}`}} is dropping {{`{{`}} printf "%.4g" $value {{`}}`}} samples/s with different values but duplicated timestamp. +- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-prometheusduplicatetimestamps ++ runbook_url: {{ .Values.defaultRules.runbookUrl }}/prometheus/prometheusduplicatetimestamps + summary: Prometheus is dropping samples with duplicate timestamps. + expr: rate(prometheus_target_scrapes_sample_duplicate_timestamp_total{job="{{ $prometheusJob }}",namespace="{{ $namespace }}"}[5m]) > 0 + for: 10m +@@ -151,10 +190,15 @@ + {{- if .Values.defaultRules.additionalRuleLabels }} + {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} + {{- end }} ++{{- end }} ++{{- if not (.Values.defaultRules.disabled.PrometheusOutOfOrderTimestamps | default false) }} + - alert: PrometheusOutOfOrderTimestamps + annotations: ++{{- if .Values.defaultRules.additionalRuleAnnotations }} ++{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} ++{{- end }} + description: Prometheus {{`{{`}}$labels.namespace{{`}}`}}/{{`{{`}}$labels.pod{{`}}`}} is dropping {{`{{`}} printf "%.4g" $value {{`}}`}} samples/s with timestamps arriving out of order. +- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-prometheusoutofordertimestamps ++ runbook_url: {{ .Values.defaultRules.runbookUrl }}/prometheus/prometheusoutofordertimestamps + summary: Prometheus drops samples with out-of-order timestamps. + expr: rate(prometheus_target_scrapes_sample_out_of_order_total{job="{{ $prometheusJob }}",namespace="{{ $namespace }}"}[5m]) > 0 + for: 10m +@@ -163,10 +207,15 @@ + {{- if .Values.defaultRules.additionalRuleLabels }} + {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} + {{- end }} ++{{- end }} ++{{- if not (.Values.defaultRules.disabled.PrometheusRemoteStorageFailures | default false) }} + - alert: PrometheusRemoteStorageFailures + annotations: ++{{- if .Values.defaultRules.additionalRuleAnnotations }} ++{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} ++{{- end }} + description: Prometheus {{`{{`}}$labels.namespace{{`}}`}}/{{`{{`}}$labels.pod{{`}}`}} failed to send {{`{{`}} printf "%.1f" $value {{`}}`}}% of the samples to {{`{{`}} $labels.remote_name{{`}}`}}:{{`{{`}} $labels.url {{`}}`}} +- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-prometheusremotestoragefailures ++ runbook_url: {{ .Values.defaultRules.runbookUrl }}/prometheus/prometheusremotestoragefailures + summary: Prometheus fails to send samples to remote storage. + expr: |- + ( +@@ -186,10 +235,15 @@ + {{- if .Values.defaultRules.additionalRuleLabels }} + {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} + {{- end }} ++{{- end }} ++{{- if not (.Values.defaultRules.disabled.PrometheusRemoteWriteBehind | default false) }} + - alert: PrometheusRemoteWriteBehind + annotations: ++{{- if .Values.defaultRules.additionalRuleAnnotations }} ++{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} ++{{- end }} + description: Prometheus {{`{{`}}$labels.namespace{{`}}`}}/{{`{{`}}$labels.pod{{`}}`}} remote write is {{`{{`}} printf "%.1f" $value {{`}}`}}s behind for {{`{{`}} $labels.remote_name{{`}}`}}:{{`{{`}} $labels.url {{`}}`}}. +- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-prometheusremotewritebehind ++ runbook_url: {{ .Values.defaultRules.runbookUrl }}/prometheus/prometheusremotewritebehind + summary: Prometheus remote write is behind. + expr: |- + # Without max_over_time, failed scrapes could create false negatives, see +@@ -206,10 +260,15 @@ + {{- if .Values.defaultRules.additionalRuleLabels }} + {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} + {{- end }} ++{{- end }} ++{{- if not (.Values.defaultRules.disabled.PrometheusRemoteWriteDesiredShards | default false) }} + - alert: PrometheusRemoteWriteDesiredShards + annotations: ++{{- if .Values.defaultRules.additionalRuleAnnotations }} ++{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} ++{{- end }} + description: Prometheus {{`{{`}}$labels.namespace{{`}}`}}/{{`{{`}}$labels.pod{{`}}`}} remote write desired shards calculation wants to run {{`{{`}} $value {{`}}`}} shards for queue {{`{{`}} $labels.remote_name{{`}}`}}:{{`{{`}} $labels.url {{`}}`}}, which is more than the max of {{`{{`}} printf `prometheus_remote_storage_shards_max{instance="%s",job="{{ $prometheusJob }}",namespace="{{ $namespace }}"}` $labels.instance | query | first | value {{`}}`}}. +- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-prometheusremotewritedesiredshards ++ runbook_url: {{ .Values.defaultRules.runbookUrl }}/prometheus/prometheusremotewritedesiredshards + summary: Prometheus remote write desired shards calculation wants to run more than configured max shards. + expr: |- + # Without max_over_time, failed scrapes could create false negatives, see +@@ -225,10 +284,15 @@ + {{- if .Values.defaultRules.additionalRuleLabels }} + {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} + {{- end }} ++{{- end }} ++{{- if not (.Values.defaultRules.disabled.PrometheusRuleFailures | default false) }} + - alert: PrometheusRuleFailures + annotations: ++{{- if .Values.defaultRules.additionalRuleAnnotations }} ++{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} ++{{- end }} + description: Prometheus {{`{{`}}$labels.namespace{{`}}`}}/{{`{{`}}$labels.pod{{`}}`}} has failed to evaluate {{`{{`}} printf "%.0f" $value {{`}}`}} rules in the last 5m. +- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-prometheusrulefailures ++ runbook_url: {{ .Values.defaultRules.runbookUrl }}/prometheus/prometheusrulefailures + summary: Prometheus is failing rule evaluations. + expr: increase(prometheus_rule_evaluation_failures_total{job="{{ $prometheusJob }}",namespace="{{ $namespace }}"}[5m]) > 0 + for: 15m +@@ -237,10 +301,15 @@ + {{- if .Values.defaultRules.additionalRuleLabels }} + {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} + {{- end }} ++{{- end }} ++{{- if not (.Values.defaultRules.disabled.PrometheusMissingRuleEvaluations | default false) }} + - alert: PrometheusMissingRuleEvaluations + annotations: ++{{- if .Values.defaultRules.additionalRuleAnnotations }} ++{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} ++{{- end }} + description: Prometheus {{`{{`}}$labels.namespace{{`}}`}}/{{`{{`}}$labels.pod{{`}}`}} has missed {{`{{`}} printf "%.0f" $value {{`}}`}} rule group evaluations in the last 5m. +- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-prometheusmissingruleevaluations ++ runbook_url: {{ .Values.defaultRules.runbookUrl }}/prometheus/prometheusmissingruleevaluations + summary: Prometheus is missing rule evaluations due to slow rule group evaluation. + expr: increase(prometheus_rule_group_iterations_missed_total{job="{{ $prometheusJob }}",namespace="{{ $namespace }}"}[5m]) > 0 + for: 15m +@@ -249,10 +318,15 @@ + {{- if .Values.defaultRules.additionalRuleLabels }} + {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} + {{- end }} ++{{- end }} ++{{- if not (.Values.defaultRules.disabled.PrometheusTargetLimitHit | default false) }} + - alert: PrometheusTargetLimitHit + annotations: ++{{- if .Values.defaultRules.additionalRuleAnnotations }} ++{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} ++{{- end }} + description: Prometheus {{`{{`}}$labels.namespace{{`}}`}}/{{`{{`}}$labels.pod{{`}}`}} has dropped {{`{{`}} printf "%.0f" $value {{`}}`}} targets because the number of targets exceeded the configured target_limit. +- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-prometheustargetlimithit ++ runbook_url: {{ .Values.defaultRules.runbookUrl }}/prometheus/prometheustargetlimithit + summary: Prometheus has dropped targets because some scrape configs have exceeded the targets limit. + expr: increase(prometheus_target_scrape_pool_exceeded_target_limit_total{job="{{ $prometheusJob }}",namespace="{{ $namespace }}"}[5m]) > 0 + for: 15m +@@ -261,10 +335,15 @@ + {{- if .Values.defaultRules.additionalRuleLabels }} + {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} + {{- end }} ++{{- end }} ++{{- if not (.Values.defaultRules.disabled.PrometheusLabelLimitHit | default false) }} + - alert: PrometheusLabelLimitHit + annotations: ++{{- if .Values.defaultRules.additionalRuleAnnotations }} ++{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} ++{{- end }} + description: Prometheus {{`{{`}}$labels.namespace{{`}}`}}/{{`{{`}}$labels.pod{{`}}`}} has dropped {{`{{`}} printf "%.0f" $value {{`}}`}} targets because some samples exceeded the configured label_limit, label_name_length_limit or label_value_length_limit. +- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-prometheuslabellimithit ++ runbook_url: {{ .Values.defaultRules.runbookUrl }}/prometheus/prometheuslabellimithit + summary: Prometheus has dropped targets because some scrape configs have exceeded the labels limit. + expr: increase(prometheus_target_scrape_pool_exceeded_label_limits_total{job="{{ $prometheusJob }}",namespace="{{ $namespace }}"}[5m]) > 0 + for: 15m +@@ -273,10 +352,49 @@ + {{- if .Values.defaultRules.additionalRuleLabels }} + {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} + {{- end }} ++{{- end }} ++{{- if not (.Values.defaultRules.disabled.PrometheusScrapeBodySizeLimitHit | default false) }} ++ - alert: PrometheusScrapeBodySizeLimitHit ++ annotations: ++{{- if .Values.defaultRules.additionalRuleAnnotations }} ++{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} ++{{- end }} ++ description: Prometheus {{`{{`}}$labels.namespace{{`}}`}}/{{`{{`}}$labels.pod{{`}}`}} has failed {{`{{`}} printf "%.0f" $value {{`}}`}} scrapes in the last 5m because some targets exceeded the configured body_size_limit. ++ runbook_url: {{ .Values.defaultRules.runbookUrl }}/prometheus/prometheusscrapebodysizelimithit ++ summary: Prometheus has dropped some targets that exceeded body size limit. ++ expr: increase(prometheus_target_scrapes_exceeded_body_size_limit_total{job="{{ $prometheusJob }}",namespace="{{ $namespace }}"}[5m]) > 0 ++ for: 15m ++ labels: ++ severity: warning ++{{- if .Values.defaultRules.additionalRuleLabels }} ++{{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} ++{{- end }} ++{{- end }} ++{{- if not (.Values.defaultRules.disabled.PrometheusScrapeSampleLimitHit | default false) }} ++ - alert: PrometheusScrapeSampleLimitHit ++ annotations: ++{{- if .Values.defaultRules.additionalRuleAnnotations }} ++{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} ++{{- end }} ++ description: Prometheus {{`{{`}}$labels.namespace{{`}}`}}/{{`{{`}}$labels.pod{{`}}`}} has failed {{`{{`}} printf "%.0f" $value {{`}}`}} scrapes in the last 5m because some targets exceeded the configured sample_limit. ++ runbook_url: {{ .Values.defaultRules.runbookUrl }}/prometheus/prometheusscrapesamplelimithit ++ summary: Prometheus has failed scrapes that have exceeded the configured sample limit. ++ expr: increase(prometheus_target_scrapes_exceeded_sample_limit_total{job="{{ $prometheusJob }}",namespace="{{ $namespace }}"}[5m]) > 0 ++ for: 15m ++ labels: ++ severity: warning ++{{- if .Values.defaultRules.additionalRuleLabels }} ++{{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} ++{{- end }} ++{{- end }} ++{{- if not (.Values.defaultRules.disabled.PrometheusTargetSyncFailure | default false) }} + - alert: PrometheusTargetSyncFailure + annotations: ++{{- if .Values.defaultRules.additionalRuleAnnotations }} ++{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} ++{{- end }} + description: '{{`{{`}} printf "%.0f" $value {{`}}`}} targets in Prometheus {{`{{`}}$labels.namespace{{`}}`}}/{{`{{`}}$labels.pod{{`}}`}} have failed to sync because invalid configuration was supplied.' +- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-prometheustargetsyncfailure ++ runbook_url: {{ .Values.defaultRules.runbookUrl }}/prometheus/prometheustargetsyncfailure + summary: Prometheus has failed to sync targets. + expr: increase(prometheus_target_sync_failed_total{job="{{ $prometheusJob }}",namespace="{{ $namespace }}"}[30m]) > 0 + for: 5m +@@ -285,10 +403,32 @@ + {{- if .Values.defaultRules.additionalRuleLabels }} + {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} + {{- end }} ++{{- end }} ++{{- if not (.Values.defaultRules.disabled.PrometheusHighQueryLoad | default false) }} ++ - alert: PrometheusHighQueryLoad ++ annotations: ++{{- if .Values.defaultRules.additionalRuleAnnotations }} ++{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} ++{{- end }} ++ description: Prometheus {{`{{`}}$labels.namespace{{`}}`}}/{{`{{`}}$labels.pod{{`}}`}} query API has less than 20% available capacity in its query engine for the last 15 minutes. ++ runbook_url: {{ .Values.defaultRules.runbookUrl }}/prometheus/prometheushighqueryload ++ summary: Prometheus is reaching its maximum capacity serving concurrent requests. ++ expr: avg_over_time(prometheus_engine_queries{job="{{ $prometheusJob }}",namespace="{{ $namespace }}"}[5m]) / max_over_time(prometheus_engine_queries_concurrent_max{job="{{ $prometheusJob }}",namespace="{{ $namespace }}"}[5m]) > 0.8 ++ for: 15m ++ labels: ++ severity: warning ++{{- if .Values.defaultRules.additionalRuleLabels }} ++{{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} ++{{- end }} ++{{- end }} ++{{- if not (.Values.defaultRules.disabled.PrometheusErrorSendingAlertsToAnyAlertmanager | default false) }} + - alert: PrometheusErrorSendingAlertsToAnyAlertmanager + annotations: ++{{- if .Values.defaultRules.additionalRuleAnnotations }} ++{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} ++{{- end }} + description: '{{`{{`}} printf "%.1f" $value {{`}}`}}% minimum errors while sending alerts from Prometheus {{`{{`}}$labels.namespace{{`}}`}}/{{`{{`}}$labels.pod{{`}}`}} to any Alertmanager.' +- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-prometheuserrorsendingalertstoanyalertmanager ++ runbook_url: {{ .Values.defaultRules.runbookUrl }}/prometheus/prometheuserrorsendingalertstoanyalertmanager + summary: Prometheus encounters more than 3% errors sending alerts to any Alertmanager. + expr: |- + min without (alertmanager) ( +@@ -303,5 +443,6 @@ + severity: critical + {{- if .Values.defaultRules.additionalRuleLabels }} + {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} ++{{- end }} + {{- end }} + {{- end }} +\ No newline at end of file diff --git a/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/service.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/service.yaml.patch index 902703b6..9bde82c9 100644 --- a/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/service.yaml.patch +++ b/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/service.yaml.patch @@ -17,7 +17,17 @@ {{- if .Values.prometheus.service.labels }} {{ toYaml .Values.prometheus.service.labels | indent 4 }} {{- end }} -@@ -39,20 +39,12 @@ +@@ -32,6 +32,9 @@ + - {{ $cidr }} + {{- end }} + {{- end }} ++{{- if ne .Values.prometheus.service.type "ClusterIP" }} ++ externalTrafficPolicy: {{ .Values.prometheus.service.externalTrafficPolicy }} ++{{- end }} + ports: + - name: {{ .Values.prometheus.prometheusSpec.portName }} + {{- if eq .Values.prometheus.service.type "NodePort" }} +@@ -39,20 +42,13 @@ {{- end }} port: {{ .Values.prometheus.service.port }} targetPort: {{ .Values.prometheus.service.targetPort }} @@ -32,10 +42,11 @@ {{- if .Values.prometheus.service.additionalPorts }} {{ toYaml .Values.prometheus.service.additionalPorts | indent 2 }} {{- end }} ++ publishNotReadyAddresses: {{ .Values.prometheus.service.publishNotReadyAddresses }} selector: app.kubernetes.io/name: prometheus - prometheus: {{ template "kube-prometheus-stack.fullname" . }}-prometheus -+ prometheus: {{ template "project-prometheus-stack.fullname" . }}-prometheus ++ prometheus: {{ template "project-prometheus-stack.prometheus.crname" . }} {{- if .Values.prometheus.service.sessionAffinity }} sessionAffinity: {{ .Values.prometheus.service.sessionAffinity }} {{- end }} diff --git a/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/serviceaccount.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/serviceaccount.yaml.patch index bdf37250..3781cfa6 100644 --- a/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/serviceaccount.yaml.patch +++ b/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/serviceaccount.yaml.patch @@ -1,6 +1,6 @@ --- charts-original/templates/prometheus/serviceaccount.yaml +++ charts/templates/prometheus/serviceaccount.yaml -@@ -2,13 +2,13 @@ +@@ -2,19 +2,19 @@ apiVersion: v1 kind: ServiceAccount metadata: @@ -19,3 +19,10 @@ {{- if .Values.prometheus.serviceAccount.annotations }} annotations: {{ toYaml .Values.prometheus.serviceAccount.annotations | indent 4 }} + {{- end }} + {{- if .Values.global.imagePullSecrets }} + imagePullSecrets: +-{{ toYaml .Values.global.imagePullSecrets | indent 2 }} ++{{ include "kube-prometheus-stack.imagePullSecrets" . | trim | indent 2 }} + {{- end }} + {{- end }} diff --git a/packages/rancher-project-monitoring/generated-changes/patch/values.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/values.yaml.patch index c9019b91..c4a608ef 100644 --- a/packages/rancher-project-monitoring/generated-changes/patch/values.yaml.patch +++ b/packages/rancher-project-monitoring/generated-changes/patch/values.yaml.patch @@ -514,7 +514,7 @@ ## Provide a k8s version to auto dashboard import script example: kubeTargetVersionOverride: 1.16.6 ## -@@ -527,30 +37,11 @@ +@@ -527,33 +37,12 @@ defaultRules: create: true rules: @@ -545,14 +545,17 @@ - prometheusOperator: true - time: true - ## Runbook url prefix for default rules - runbookUrl: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md# -@@ -565,41 +56,12 @@ +- ## Runbook url prefix for default rules +- runbookUrl: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md# + ## Reduce app namespace alert scope + appNamespacesTarget: ".*" + +@@ -565,41 +54,21 @@ ## Additional labels for PrometheusRule alerts additionalRuleLabels: {} -## Deprecated way to provide custom recording or alerting rules to be deployed into the cluster. - ## +-## -# additionalPrometheusRules: [] -# - name: my-rule-file -# groups: @@ -560,7 +563,9 @@ -# rules: -# - record: my_record -# expr: 100 * my_record -- ++ ## Additional annotations for PrometheusRule alerts ++ additionalRuleAnnotations: {} + -## Provide custom recording or alerting rules to be deployed into the cluster. -## -additionalPrometheusRulesMap: {} @@ -570,8 +575,13 @@ -# rules: -# - record: my_record -# expr: 100 * my_record -- --## ++ ## Prefix for runbook URLs. Use this to override the first part of the runbookURLs that is common to all rules. ++ runbookUrl: "https://runbooks.prometheus-operator.dev/runbooks" + ++ ## Disabled PrometheusRule alerts ++ disabled: {} ++ + ## global: cattle: systemDefaultRegistry: "" @@ -591,7 +601,7 @@ kubectl: repository: rancher/kubectl tag: v1.20.2 -@@ -610,9 +72,21 @@ +@@ -610,9 +79,21 @@ create: true userRoles: @@ -615,9 +625,12 @@ aggregateToDefaultRoles: true pspEnabled: true -@@ -632,6 +106,19 @@ +@@ -631,7 +112,22 @@ + ## imagePullSecrets: [] # - name: "image-pull-secret" ++ # or ++ # - "image-pull-secret" +federate: + ## enabled indicates whether to add federation to any Project Prometheus Stacks by default @@ -635,7 +648,59 @@ ## Configuration for alertmanager ## ref: https://prometheus.io/docs/alerting/alertmanager/ ## -@@ -817,50 +304,6 @@ +@@ -674,16 +170,37 @@ + config: + global: + resolve_timeout: 5m ++ inhibit_rules: ++ - source_matchers: ++ - 'severity = critical' ++ target_matchers: ++ - 'severity =~ warning|info' ++ equal: ++ - 'namespace' ++ - 'alertname' ++ - source_matchers: ++ - 'severity = warning' ++ target_matchers: ++ - 'severity = info' ++ equal: ++ - 'namespace' ++ - 'alertname' ++ - source_matchers: ++ - 'alertname = InfoInhibitor' ++ target_matchers: ++ - 'severity = info' ++ equal: ++ - 'namespace' + route: +- group_by: ['job'] ++ group_by: ['namespace'] + group_wait: 30s + group_interval: 5m + repeat_interval: 12h + receiver: 'null' + routes: +- - match: +- alertname: Watchdog +- receiver: 'null' ++ - receiver: 'null' ++ matchers: ++ - alertname =~ "InfoInhibitor|Watchdog" + receivers: + - name: 'null' + templates: +@@ -790,6 +307,9 @@ + + labels: {} + ++ ## Redirect ingress to an additional defined port on the service ++ # servicePort: 8081 ++ + ## Hosts must be provided if Ingress is enabled. + ## + hosts: [] +@@ -817,50 +337,6 @@ secret: annotations: {} @@ -686,9 +751,21 @@ ## Configuration for Alertmanager service ## service: -@@ -892,31 +335,6 @@ - ## - type: ClusterIP +@@ -884,35 +360,19 @@ + + ## Additional ports to open for Alertmanager service + additionalPorts: [] ++ # additionalPorts: ++ # - name: authenticated ++ # port: 8081 ++ # targetPort: 8081 + + externalIPs: [] + loadBalancerIP: "" + loadBalancerSourceRanges: [] +- ## Service type +- ## +- type: ClusterIP - ## Configuration for creating a separate Service for each statefulset Alertmanager replica - ## @@ -697,9 +774,11 @@ - annotations: {} - - ## Port for Alertmanager Service per replica to listen on -- ## ++ ## Denotes if this Service desires to route external traffic to node-local or cluster-wide endpoints + ## - port: 9093 -- ++ externalTrafficPolicy: Cluster + - ## To be used with a proxy extraContainer port - targetPort: 9093 - @@ -711,15 +790,49 @@ - ## Loadbalancer source IP ranges - ## Only used if servicePerReplica.type is "LoadBalancer" - loadBalancerSourceRanges: [] -- ## Service type -- ## -- type: ClusterIP -- - ## If true, create a serviceMonitor for alertmanager + ## Service type + ## + type: ClusterIP +@@ -933,13 +393,13 @@ + scheme: "" + + ## tlsConfig: TLS configuration to use when scraping the endpoint. For example if using istio mTLS. +- ## Of type: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#tlsconfig ++ ## Of type: https://github.com/coreos/prometheus-operator/blob/main/Documentation/api.md#tlsconfig + tlsConfig: {} + + bearerTokenFile: + + ## MetricRelabelConfigs to apply to samples after scraping, but before ingestion. +- ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#relabelconfig ++ ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#relabelconfig + ## + metricRelabelings: [] + # - action: keep +@@ -947,7 +407,7 @@ + # sourceLabels: [__name__] + + ## RelabelConfigs to apply to samples before scraping +- ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#relabelconfig ++ ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#relabelconfig + ## + relabelings: [] + # - sourceLabels: [__meta_kubernetes_pod_node_name] +@@ -958,7 +418,7 @@ + # action: replace + + ## Settings affecting alertmanagerSpec +- ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#alertmanagerspec ++ ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#alertmanagerspec ## - serviceMonitor: -@@ -973,11 +391,6 @@ - tag: v0.22.2 + alertmanagerSpec: + ## Standard object's metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata +@@ -970,14 +430,9 @@ + ## + image: + repository: rancher/mirrored-prometheus-alertmanager +- tag: v0.22.2 ++ tag: v0.24.0 sha: "" - ## If true then the user will be responsible to provide a secret with alertmanager configuration @@ -730,8 +843,14 @@ ## Secrets is a list of Secrets in the same namespace as the Alertmanager object, which shall be mounted into the ## Alertmanager Pods. The Secrets are mounted into /etc/alertmanager/secrets/. ## -@@ -995,40 +408,14 @@ +@@ -993,42 +448,27 @@ + ## + # configSecret: ++ ## WebTLSConfig defines the TLS parameters for HTTPS ++ ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#alertmanagerwebspec ++ web: {} ++ ## AlertmanagerConfigs to be selected to merge and configure Alertmanager with. ## - alertmanagerConfigSelector: {} @@ -758,7 +877,8 @@ + - rancher-monitoring - ## Namespaces to be selected for AlertmanagerConfig discovery. If nil, only check own namespace. -- ## ++ ## AlermanagerConfig to be used as top level configuration + ## - alertmanagerConfigNamespaceSelector: {} - ## Example which selects all namespaces - ## with label "alertmanagerconfig" with values any of "example-namespace" or "example-namespace-2" @@ -769,7 +889,11 @@ - # values: - # - example-namespace - # - example-namespace-2 -- ++ alertmanagerConfiguration: {} ++ ## Example with select a global alertmanagerconfig ++ # alertmanagerConfiguration: ++ # name: global-alertmanager-Configuration + - ## Example which selects all namespaces with label "alertmanagerconfig" set to "enabled" - # alertmanagerConfigNamespaceSelector: - # matchLabels: @@ -778,7 +902,64 @@ ## Define Log Format # Use logfmt (default) or json logging logFormat: logfmt -@@ -1215,9 +602,6 @@ +@@ -1047,7 +487,7 @@ + retention: 120h + + ## Storage is the definition of how storage will be used by the Alertmanager instances. +- ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/user-guides/storage.md ++ ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/user-guides/storage.md + ## + storage: {} + # volumeClaimTemplate: +@@ -1057,7 +497,7 @@ + # resources: + # requests: + # storage: 50Gi +- # selector: {} ++ # selector: {} + + + ## The external URL the Alertmanager instances will be available under. This is necessary to generate correct URLs. This is necessary if Alertmanager is not served from root of a DNS name. string false +@@ -1153,6 +593,18 @@ + ## Containers allows injecting additional containers. This is meant to allow adding an authentication proxy to an Alertmanager pod. + ## + containers: [] ++ # containers: ++ # - name: oauth-proxy ++ # image: quay.io/oauth2-proxy/oauth2-proxy:v7.3.0 ++ # args: ++ # - --upstream=http://127.0.0.1:9093 ++ # - --http-address=0.0.0.0:8081 ++ # - ... ++ # ports: ++ # - containerPort: 8081 ++ # name: oauth-proxy ++ # protocol: TCP ++ # resources: {} + + # Additional volumes on the output StatefulSet definition. + volumes: [] +@@ -1174,7 +626,7 @@ + + ## PortName to use for Alert Manager. + ## +- portName: "web" ++ portName: "http-web" + + ## ClusterAdvertiseAddress is the explicit address to advertise in cluster. Needs to be provided for non RFC1918 [1] (public) addresses. [1] RFC1918: https://tools.ietf.org/html/rfc1918 + ## +@@ -1184,6 +636,10 @@ + ## Use case is e.g. spanning an Alertmanager cluster across Kubernetes clusters with a single replica in each. + forceEnableClusterMode: false + ++ ## Minimum number of seconds for which a newly created pod should be ready without any of its container crashing for it to ++ ## be considered available. Defaults to 0 (pod will be considered available as soon as it is ready). ++ minReadySeconds: 0 ++ + ## ExtraSecret can be used to store various data in an extra secret + ## (use it for example to store hashed basic auth credentials) + extraSecret: +@@ -1215,9 +671,6 @@ org_role: Viewer auth.basic: enabled: false @@ -788,7 +969,7 @@ security: # Required to embed dashboards in Rancher Cluster Overview Dashboard on Cluster Explorer allow_embedding: true -@@ -1237,18 +621,6 @@ +@@ -1237,18 +690,6 @@ ## defaultDashboardsEnabled: true @@ -807,11 +988,24 @@ ## Timezone for the default dashboards ## Other options are: browser or a specific timezone, i.e. Europe/Luxembourg ## -@@ -1293,16 +665,10 @@ +@@ -1261,6 +702,11 @@ + ## + enabled: false + ++ ## IngressClassName for Grafana Ingress. ++ ## Should be provided if Ingress is enable. ++ ## ++ # ingressClassName: nginx ++ + ## Annotations for Grafana Ingress + ## + annotations: {} +@@ -1293,22 +739,19 @@ dashboards: enabled: true label: grafana_dashboard - searchNamespace: cattle-dashboards ++ labelValue: "1" ## Annotations for Grafana dashboard configmaps ## @@ -824,7 +1018,15 @@ provider: allowUiUpdates: false datasources: -@@ -1320,11 +686,6 @@ + enabled: true + defaultDatasourceEnabled: true + ++ uid: prometheus ++ + ## URL of prometheus datasource + ## + # url: http://prometheus-stack-prometheus:9090/ +@@ -1320,19 +763,25 @@ ## annotations: {} @@ -834,12 +1036,78 @@ - ## ref: https://git.io/fjaBS - createPrometheusReplicasDatasources: false label: grafana_datasource ++ labelValue: "1" ++ ## Field with internal link pointing to existing data source in Grafana. ++ ## Can be provisioned via additionalDataSources ++ exemplarTraceIdDestinations: {} ++ # datasourceUid: Jaeger ++ # traceIdLabelName: trace_id ++ extraConfigmapMounts: [] -@@ -1450,919 +811,6 @@ - testFramework: - enabled: false + # - name: certs-configmap + # mountPath: /etc/grafana/ssl/ + # configMap: certs-configmap + # readOnly: true ++ deleteDatasources: [] ++ # - name: example-datasource ++ # orgId: 1 ++ + ## Configure additional grafana datasources (passed through tpl) + ## ref: http://docs.grafana.org/administration/provisioning/#datasources + additionalDataSources: [] +@@ -1410,426 +859,26 @@ + ## If true, create a serviceMonitor for grafana + ## + serviceMonitor: +- ## Scrape interval. If not set, the Prometheus default scrape interval is used. +- ## +- interval: "" +- selfMonitor: true ++ # If true, a ServiceMonitor CRD is created for a prometheus operator ++ # https://github.com/coreos/prometheus-operator ++ # ++ enabled: true + + # Path to use for scraping metrics. Might be different if server.root_url is set + # in grafana.ini + path: "/metrics" + ++ # namespace: monitoring (defaults to use the namespace this chart is deployed to) + +- ## MetricRelabelConfigs to apply to samples after scraping, but before ingestion. +- ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#relabelconfig +- ## +- metricRelabelings: [] +- # - action: keep +- # regex: 'kube_(daemonset|deployment|pod|namespace|node|statefulset).+' +- # sourceLabels: [__name__] ++ # labels for the ServiceMonitor ++ labels: {} + +- ## RelabelConfigs to apply to samples before scraping +- ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#relabelconfig +- ## +- relabelings: [] +- # - sourceLabels: [__meta_kubernetes_pod_node_name] +- # separator: ; +- # regex: ^(.*)$ +- # targetLabel: nodename +- # replacement: $1 +- # action: replace +- +- resources: +- limits: +- memory: 200Mi +- cpu: 200m +- requests: +- memory: 100Mi +- cpu: 100m +- +- testFramework: +- enabled: false +- -## Component scraping the kube api server -## -kubeApiServer: @@ -850,7 +1118,9 @@ - serviceMonitor: - ## Scrape interval. If not set, the Prometheus default scrape interval is used. - ## -- interval: "" ++ # Scrape interval. If not set, the Prometheus default scrape interval is used. ++ # + interval: "" - ## proxyUrl: URL of a proxy that should be used for scraping. - ## - proxyUrl: "" @@ -1214,32 +1484,30 @@ - ## proxyUrl: URL of a proxy that should be used for scraping. - ## - proxyUrl: "" -- scheme: http + scheme: http - insecureSkipVerify: false - serverName: "" - caFile: "" - certFile: "" - keyFile: "" -- -- ## MetricRelabelConfigs to apply to samples after scraping, but before ingestion. -- ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#relabelconfig -- ## -- metricRelabelings: [] -- # - action: keep -- # regex: 'kube_(daemonset|deployment|pod|namespace|node|statefulset).+' -- # sourceLabels: [__name__] -- -- ## RelabelConfigs to apply to samples before scraping ++ tlsConfig: {} ++ scrapeTimeout: 30s + + ## MetricRelabelConfigs to apply to samples after scraping, but before ingestion. + ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#relabelconfig +@@ -1840,7 +889,7 @@ + # sourceLabels: [__name__] + + ## RelabelConfigs to apply to samples before scraping - ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#relabelconfig -- ## -- relabelings: [] -- # - sourceLabels: [__meta_kubernetes_pod_node_name] -- # separator: ; -- # regex: ^(.*)$ -- # targetLabel: nodename -- # replacement: $1 -- # action: replace -- ++ ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#relabelconfig + ## + relabelings: [] + # - sourceLabels: [__meta_kubernetes_pod_node_name] +@@ -1850,519 +899,17 @@ + # replacement: $1 + # action: replace + - -## Component scraping kube scheduler -## @@ -1404,10 +1672,10 @@ - create: true - podSecurityPolicy: - enabled: true -- resources: -- limits: + resources: + limits: - cpu: 100m -- memory: 200Mi + memory: 200Mi - requests: - cpu: 100m - memory: 130Mi @@ -1471,17 +1739,20 @@ - targetPort: 9796 - resources: - limits: -- cpu: 200m + cpu: 200m - memory: 50Mi -- requests: -- cpu: 100m + requests: ++ memory: 100Mi + cpu: 100m - memory: 30Mi -- + -## Manages Prometheus and Alertmanager components -## -prometheusOperator: - enabled: true -- ++ testFramework: ++ enabled: false + - ## Prometheus-Operator v0.39.0 and later support TLS natively. - ## - tls: @@ -1756,7 +2027,7 @@ ## Deploy a Prometheus instance ## prometheus: -@@ -2381,88 +829,6 @@ +@@ -2381,88 +928,6 @@ name: "" annotations: {} @@ -1845,10 +2116,16 @@ ## Configuration for Prometheus service ## service: -@@ -2497,31 +863,6 @@ - - sessionAffinity: "" +@@ -2491,37 +956,28 @@ + ## Only use if service.type is "LoadBalancer" + loadBalancerIP: "" + loadBalancerSourceRanges: [] +- ## Service type +- ## +- type: ClusterIP +- sessionAffinity: "" +- - ## Configuration for creating a separate Service for each statefulset Prometheus replica - ## - servicePerReplica: @@ -1856,9 +2133,11 @@ - annotations: {} - - ## Port for Prometheus Service per replica to listen on -- ## ++ ## Denotes if this Service desires to route external traffic to node-local or cluster-wide endpoints + ## - port: 9090 -- ++ externalTrafficPolicy: Cluster + - ## To be used with a proxy extraContainer port - targetPort: 9090 - @@ -1870,14 +2149,27 @@ - ## Loadbalancer source IP ranges - ## Only used if servicePerReplica.type is "LoadBalancer" - loadBalancerSourceRanges: [] -- ## Service type -- ## -- type: ClusterIP -- + ## Service type + ## + type: ClusterIP + ++ ## Additional port to define in the Service ++ additionalPorts: [] ++ # additionalPorts: ++ # - name: authenticated ++ # port: 8081 ++ # targetPort: 8081 ++ ++ ## Consider that all endpoints are considered "ready" even if the Pods themselves are not ++ ## Ref: https://kubernetes.io/docs/reference/kubernetes-api/service-resources/service-v1/#ServiceSpec ++ publishNotReadyAddresses: false ++ ++ sessionAffinity: "" ++ ## Configure pod disruption budgets for Prometheus ## ref: https://kubernetes.io/docs/tasks/run-application/configure-pdb/#specifying-a-poddisruptionbudget ## This configuration is immutable once created and will require the PDB to be deleted to be changed -@@ -2532,46 +873,6 @@ +@@ -2532,46 +988,6 @@ minAvailable: 1 maxUnavailable: "" @@ -1924,7 +2216,17 @@ ## ExtraSecret can be used to store various data in an extra secret ## (use it for example to store hashed basic auth credentials) extraSecret: -@@ -2617,55 +918,10 @@ +@@ -2593,6 +1009,9 @@ + annotations: {} + labels: {} + ++ ## Redirect ingress to an additional defined port on the service ++ # servicePort: 8081 ++ + ## Hostnames. + ## Must be provided if Ingress is enabled. + ## +@@ -2617,55 +1036,10 @@ # hosts: # - prometheus.example.com @@ -1980,14 +2282,79 @@ volumes: [] serviceMonitor: -@@ -2791,14 +1047,6 @@ +@@ -2678,7 +1052,7 @@ + scheme: "" + + ## tlsConfig: TLS configuration to use when scraping the endpoint. For example if using istio mTLS. +- ## Of type: https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#tlsconfig ++ ## Of type: https://github.com/coreos/prometheus-operator/blob/main/Documentation/api.md#tlsconfig + tlsConfig: {} + + bearerTokenFile: +@@ -2701,14 +1075,14 @@ + # action: replace + + ## Settings affecting prometheusSpec +- ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#prometheusspec ++ ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#prometheusspec + ## + prometheusSpec: + ## If true, pass --storage.tsdb.max-block-duration=2h to prometheus. This is already done if using Thanos + ## + disableCompaction: false + ## APIServerConfig +- ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#apiserverconfig ++ ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#apiserverconfig + ## + apiserverConfig: {} + +@@ -2737,9 +1111,17 @@ + enableAdminAPI: false + + ## WebTLSConfig defines the TLS parameters for HTTPS +- ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#webtlsconfig ++ ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#webtlsconfig + web: {} + ++ ## Exemplars related settings that are runtime reloadable. ++ ## It requires to enable the exemplar storage feature to be effective. ++ exemplars: "" ++ ## Maximum number of exemplars stored in memory for all series. ++ ## If not set, Prometheus uses its default value. ++ ## A value of zero or less than zero disables the storage. ++ # maxSize: 100000 ++ + # EnableFeatures API enables access to Prometheus disabled features. + # ref: https://prometheus.io/docs/prometheus/latest/disabled_features/ + enableFeatures: [] +@@ -2749,7 +1131,7 @@ + ## + image: + repository: rancher/mirrored-prometheus-prometheus +- tag: v2.28.1 ++ tag: v2.38.0 + sha: "" + + ## Tolerations for use with node taints +@@ -2773,7 +1155,7 @@ + # app: prometheus + + ## Alertmanagers to which alerts will be sent +- ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#alertmanagerendpoints ++ ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#alertmanagerendpoints + ## + ## Default configuration will connect to the alertmanager deployed as part of this release + ## +@@ -2791,14 +1173,10 @@ ## externalLabels: {} - ## Name of the external label used to denote replica name -- ## ++ ## enable --web.enable-remote-write-receiver flag on prometheus-server + ## - replicaExternalLabelName: "" -- ++ enableRemoteWriteReceiver: false + - ## If true, the Operator won't add the external label used to denote replica name - ## - replicaExternalLabelNameClear: false @@ -1995,7 +2362,12 @@ ## Name of the external label used to denote Prometheus instance name ## prometheusExternalLabelName: "" -@@ -2833,12 +1081,6 @@ +@@ -2829,16 +1207,10 @@ + configMaps: [] + + ## QuerySpec defines the query command line flags when starting Prometheus. +- ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#queryspec ++ ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#queryspec ## query: {} @@ -2008,7 +2380,7 @@ ## If true, a nil or {} value for prometheus.prometheusSpec.ruleSelector will cause the ## prometheus resource to be created with selectors based on values in the helm deployment, ## which will also match the PrometheusRule resources created -@@ -2848,21 +1090,13 @@ +@@ -2848,21 +1220,13 @@ ## PrometheusRules to be selected for target discovery. ## If {}, select all PrometheusRules ## @@ -2037,7 +2409,7 @@ ## If true, a nil or {} value for prometheus.prometheusSpec.serviceMonitorSelector will cause the ## prometheus resource to be created with selectors based on values in the helm deployment, -@@ -2873,20 +1107,14 @@ +@@ -2873,20 +1237,14 @@ ## ServiceMonitors to be selected for target discovery. ## If {}, select all ServiceMonitors ## @@ -2065,7 +2437,7 @@ ## If true, a nil or {} value for prometheus.prometheusSpec.podMonitorSelector will cause the ## prometheus resource to be created with selectors based on values in the helm deployment, ## which will also match the podmonitors created -@@ -2896,17 +1124,14 @@ +@@ -2896,17 +1254,14 @@ ## PodMonitors to be selected for target discovery. ## If {}, select all PodMonitors ## @@ -2090,7 +2462,7 @@ ## If true, a nil or {} value for prometheus.prometheusSpec.probeSelector will cause the ## prometheus resource to be created with selectors based on values in the helm deployment, ## which will also match the probes created -@@ -2916,17 +1141,14 @@ +@@ -2916,17 +1271,14 @@ ## Probes to be selected for target discovery. ## If {}, select all Probes ## @@ -2115,7 +2487,16 @@ ## How long to retain metrics ## retention: 10d -@@ -3003,23 +1225,6 @@ +@@ -2937,7 +1289,7 @@ + + ## Enable compression of the write-ahead log using Snappy. + ## +- walCompression: false ++ walCompression: true + + ## If true, the Operator won't process any Prometheus configuration changes + ## +@@ -3003,23 +1355,6 @@ # - e2e-az1 # - e2e-az2 @@ -2139,7 +2520,16 @@ ## Resource limits & requests ## resources: -@@ -3062,95 +1267,6 @@ +@@ -3031,7 +1366,7 @@ + cpu: 750m + + ## Prometheus StorageSpec for persistent data +- ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/user-guides/storage.md ++ ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/user-guides/storage.md + ## + storageSpec: {} + ## Using PersistentVolumeClaim +@@ -3062,95 +1397,6 @@ # Additional VolumeMounts on the output StatefulSet definition. volumeMounts: [] @@ -2235,7 +2625,7 @@ ## SecurityContext holds pod-level security attributes and common container settings. ## This defaults to non root user with uid 1000 and gid 2000. ## https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md -@@ -3165,20 +1281,6 @@ +@@ -3165,20 +1411,6 @@ ## priorityClassName: "" @@ -2256,7 +2646,16 @@ proxy: image: repository: rancher/mirrored-library-nginx -@@ -3227,10 +1329,6 @@ +@@ -3214,7 +1446,7 @@ + + ## PortName to use for Prometheus. + ## +- portName: "nginx-http" ++ portName: "http-web" + + ## ArbitraryFSAccessThroughSMs configures whether configuration based on a service monitor can access arbitrary files + ## on the file system of the Prometheus container e.g. bearer token files. +@@ -3227,10 +1459,6 @@ ## OverrideHonorTimestamps allows to globally enforce honoring timestamps in all scrape configs. overrideHonorTimestamps: false @@ -2267,17 +2666,35 @@ ## EnforcedNamespaceLabel enforces adding a namespace label of origin for each alert and metric that is user created. ## The label value will always be the namespace of the object that is being created. ## Disabled by default -@@ -3276,141 +1374,3 @@ - ## AllowOverlappingBlocks enables vertical compaction and vertical query merge in Prometheus. This is still experimental +@@ -3238,8 +1466,15 @@ + + ## PrometheusRulesExcludedFromEnforce - list of prometheus rules to be excluded from enforcing of adding namespace labels. + ## Works only if enforcedNamespaceLabel set to true. Make sure both ruleNamespace and ruleName are set for each pair ++ ## Deprecated, use `excludedFromEnforcement` instead + prometheusRulesExcludedFromEnforce: [] + ++ ## ExcludedFromEnforcement - list of object references to PodMonitor, ServiceMonitor, Probe and PrometheusRule objects ++ ## to be excluded from enforcing a namespace label of origin. ++ ## Works only if enforcedNamespaceLabel set to true. ++ ## See https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#objectreference ++ excludedFromEnforcement: [] ++ + ## QueryLogFile specifies the file to which PromQL queries are logged. Note that this location must be writable, + ## and can be persisted using an attached volume. Alternatively, the location can be set to a stdout location such + ## as /dev/stdout to log querie information to the default Prometheus log stream. This is only available in versions +@@ -3277,140 +1512,10 @@ ## in Prometheus so it may change in any upcoming release. allowOverlappingBlocks: false -- + - additionalRulesForClusterRole: [] - # - apiGroups: [ "" ] - # resources: - # - nodes/proxy - # verbs: [ "get", "list", "watch" ] -- ++ ## Minimum number of seconds for which a newly created pod should be ready without any of its container crashing for it to ++ ## be considered available. Defaults to 0 (pod will be considered available as soon as it is ready). ++ minReadySeconds: 0 + - additionalServiceMonitors: [] - ## Name of the ServiceMonitor to create - ## @@ -2409,3 +2826,7 @@ - ## https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#podmetricsendpoint - ## - # podMetricsEndpoints: [] ++## Setting to true produces cleaner resource names, but requires a data migration because the name of the persistent volume changes. Therefore this should only be set once on initial installation. ++## ++cleanPrometheusOperatorObjectNames: false +\ No newline at end of file From d5a32b8a3bb2bc59a02cd0ba272c5736eb488737 Mon Sep 17 00:00:00 2001 From: Arvind Iyengar Date: Thu, 10 Nov 2022 08:11:24 -0800 Subject: [PATCH 03/20] Update rancher-project-monitoring to new base 252143f2d739cd04fd86bd0838910b15e6479b56 --- .../generated-changes/exclude/README.md | 257 ++- .../exclude/files/ingress-nginx/nginx.json | 74 +- .../request-handling-performance.json | 60 +- .../cluster/rancher-cluster-nodes.json | 33 +- .../rancher/cluster/rancher-cluster.json | 33 +- .../rancher/home/rancher-default-home.json | 25 +- .../files/rancher/k8s/rancher-etcd-nodes.json | 31 +- .../files/rancher/k8s/rancher-etcd.json | 31 +- .../k8s/rancher-k8s-components-nodes.json | 27 +- .../rancher/k8s/rancher-k8s-components.json | 27 +- .../rancher/nodes/rancher-node-detail.json | 30 +- .../files/rancher/nodes/rancher-node.json | 30 +- .../performance/norman-controllers.json | 634 ------ .../performance/performance-debugging.json | 251 ++- .../delete-workloads-with-old-labels.sh | 14 + .../alertmanager/serviceperreplica.yaml | 9 +- .../exporters/core-dns/servicemonitor.yaml | 3 + .../kube-api-server/servicemonitor.yaml | 3 + .../kube-controller-manager/endpoints.yaml | 6 +- .../kube-controller-manager/service.yaml | 6 +- .../servicemonitor.yaml | 9 +- .../exporters/kube-dns/servicemonitor.yaml | 3 + .../exporters/kube-etcd/servicemonitor.yaml | 3 + .../exporters/kube-proxy/servicemonitor.yaml | 3 + .../exporters/kube-scheduler/endpoints.yaml | 4 +- .../exporters/kube-scheduler/service.yaml | 6 +- .../kube-scheduler/servicemonitor.yaml | 11 +- .../kube-state-metrics/serviceMonitor.yaml | 64 - .../kube-state-metrics/validate.yaml | 7 + .../exporters/kubelet/servicemonitor.yaml | 43 + .../node-exporter/servicemonitor.yaml | 41 - .../exporters/node-exporter/validate.yaml | 3 + .../grafana/dashboards-1.14/apiserver.yaml | 103 +- .../dashboards-1.14/controller-manager.yaml | 63 +- .../grafana/dashboards-1.14/etcd.yaml | 145 +- .../grafana/dashboards-1.14/k8s-coredns.yaml | 57 +- .../k8s-resources-cluster.yaml | 200 +- .../grafana/dashboards-1.14/kubelet.yaml | 58 +- .../node-cluster-rsrc-use.yaml | 4 +- .../dashboards-1.14/node-rsrc-use.yaml | 4 +- .../grafana/dashboards-1.14/nodes-darwin.yaml | 1073 +++++++++++ .../grafana/dashboards-1.14/nodes.yaml | 433 +++-- .../prometheus-remote-write.yaml | 20 +- .../grafana/dashboards-1.14/proxy.yaml | 78 +- .../grafana/dashboards-1.14/scheduler.yaml | 74 +- .../grafana/dashboards-1.14/statefulset.yaml | 928 --------- .../templates/grafana/servicemonitor.yaml | 32 - .../job-patch/job-createSecret.yaml | 4 + .../job-patch/job-patchWebhook.yaml | 4 + .../admission-webhooks/job-patch/psp.yaml | 15 +- .../job-patch/serviceaccount.yaml | 2 +- .../mutatingWebhookConfiguration.yaml | 1 + .../prometheus-operator/certmanager.yaml | 6 +- .../prometheus-operator/clusterrole.yaml | 1 + .../prometheus-operator/deployment.yaml | 40 +- .../templates/prometheus-operator/psp.yaml | 10 +- .../prometheus-operator/service.yaml | 3 + .../prometheus-operator/serviceaccount.yaml | 2 +- .../additionalAlertmanagerConfigs.yaml | 2 +- .../prometheus/additionalScrapeConfigs.yaml | 4 + .../rules-1.14/config-reloaders.yaml | 46 + .../templates/prometheus/rules-1.14/etcd.yaml | 187 +- .../prometheus/rules-1.14/k8s.rules.yaml | 28 +- .../kube-apiserver-availability.rules.yaml | 34 +- .../kube-apiserver-burnrate.rules.yaml | 88 +- .../kube-apiserver-histogram.rules.yaml | 24 +- .../rules-1.14/kube-apiserver-slos.yaml | 30 +- .../rules-1.14/kube-apiserver.rules.yaml | 358 ---- .../kube-prometheus-general.rules.yaml | 2 +- .../kube-prometheus-node-recording.rules.yaml | 4 +- .../rules-1.14/kube-scheduler.rules.yaml | 2 +- .../rules-1.14/kube-state-metrics.yaml | 30 +- .../prometheus/rules-1.14/kubelet.rules.yaml | 10 +- .../rules-1.14/kubernetes-resources.yaml | 92 +- .../kubernetes-system-apiserver.yaml | 68 +- .../kubernetes-system-controller-manager.yaml | 14 +- .../kubernetes-system-kube-proxy.yaml | 46 + .../rules-1.14/kubernetes-system-kubelet.yaml | 105 +- .../kubernetes-system-scheduler.yaml | 9 +- .../rules-1.14/kubernetes-system.yaml | 22 +- .../rules-1.14/node-exporter.rules.yaml | 32 +- .../prometheus/rules-1.14/node-exporter.yaml | 154 +- .../prometheus/rules-1.14/node-network.yaml | 13 +- .../prometheus/rules-1.14/node.rules.yaml | 10 +- .../rules-1.14/prometheus-operator.yaml | 55 +- .../prometheus/serviceThanosSidecar.yaml | 5 +- .../serviceThanosSidecarExternal.yaml | 5 +- .../servicemonitorThanosSidecar.yaml | 4 +- .../prometheus/serviceperreplica.yaml | 9 +- .../rancher-monitoring/clusterrole.yaml | 4 + .../dashboards/rancher/k8s-dashboards.yaml | 16 +- .../rancher-monitoring/upgrade/configmap.yaml | 13 + .../rancher-monitoring/upgrade/job.yaml | 46 + .../rancher-monitoring/upgrade/rbac.yaml | 127 ++ .../templates/thanos-ruler/extrasecret.yaml | 20 + .../templates/thanos-ruler/ingress.yaml | 77 + .../thanos-ruler/podDisruptionBudget.yaml | 21 + .../exclude/templates/thanos-ruler/ruler.yaml | 168 ++ .../templates/thanos-ruler/service.yaml | 53 + .../thanos-ruler/serviceaccount.yaml | 20 + .../thanos-ruler/servicemonitor.yaml | 45 + .../dashboards-1.14/grafana-overview.yaml | 635 ------ .../generated-changes/patch/Chart.yaml.patch | 31 +- .../pods/rancher-pod-containers.json.patch | 130 -- .../files/rancher/pods/rancher-pod.json.patch | 130 -- .../rancher-workload-pods.json.patch | 130 -- .../workloads/rancher-workload.json.patch | 130 -- .../patch/templates/_helpers.tpl.patch | 151 +- .../alertmanager/alertmanager.yaml.patch | 89 +- .../templates/alertmanager/ingress.yaml.patch | 3 +- .../podDisruptionBudget.yaml.patch | 8 +- .../templates/alertmanager/psp.yaml.patch | 26 +- .../templates/alertmanager/secret.yaml.patch | 2 +- .../templates/alertmanager/service.yaml.patch | 18 +- .../alertmanager/serviceaccount.yaml.patch | 9 +- .../grafana/configmap-dashboards.yaml.patch | 3 +- .../grafana/configmaps-datasources.yaml.patch | 35 +- .../alertmanager-overview.yaml.patch | 130 +- .../dashboards-1.14/cluster-total.yaml.patch | 18 +- .../k8s-resources-namespace.yaml.patch | 640 +------ .../k8s-resources-node.yaml.patch | 214 +-- .../k8s-resources-pod.yaml.patch | 538 +----- .../k8s-resources-workload.yaml.patch | 477 +---- ...s-resources-workloads-namespace.yaml.patch | 561 ++---- .../namespace-by-pod.yaml.patch | 18 +- .../namespace-by-workload.yaml.patch | 58 +- .../persistentvolumesusage.yaml.patch | 92 +- .../dashboards-1.14/pod-total.yaml.patch | 18 +- .../dashboards-1.14/prometheus.yaml.patch | 128 +- .../dashboards-1.14/workload-total.yaml.patch | 44 +- .../templates/prometheus/_rules.tpl.patch | 17 +- .../templates/prometheus/ingress.yaml.patch | 3 +- .../prometheus/nginx-config.yaml.patch | 8 - .../prometheus/podDisruptionBudget.yaml.patch | 2 +- .../prometheus/prometheus.yaml.patch | 118 +- .../patch/templates/prometheus/psp.yaml.patch | 27 +- .../rules-1.14/alertmanager.rules.yaml.patch | 138 +- .../rules-1.14/general.rules.yaml.patch | 77 +- .../rules-1.14/kubernetes-apps.yaml.patch | 312 +-- .../rules-1.14/kubernetes-storage.yaml.patch | 134 +- .../rules-1.14/prometheus.yaml.patch | 364 ---- .../templates/prometheus/service.yaml.patch | 16 +- .../prometheus/serviceaccount.yaml.patch | 9 +- .../generated-changes/patch/values.yaml.patch | 1704 ++++++++++------- .../rancher-project-monitoring/package.yaml | 50 +- 145 files changed, 5884 insertions(+), 8804 deletions(-) delete mode 100644 packages/rancher-project-monitoring/generated-changes/exclude/files/rancher/performance/norman-controllers.json create mode 100644 packages/rancher-project-monitoring/generated-changes/exclude/files/upgrade/scripts/delete-workloads-with-old-labels.sh delete mode 100644 packages/rancher-project-monitoring/generated-changes/exclude/templates/exporters/kube-state-metrics/serviceMonitor.yaml create mode 100644 packages/rancher-project-monitoring/generated-changes/exclude/templates/exporters/kube-state-metrics/validate.yaml delete mode 100644 packages/rancher-project-monitoring/generated-changes/exclude/templates/exporters/node-exporter/servicemonitor.yaml create mode 100644 packages/rancher-project-monitoring/generated-changes/exclude/templates/exporters/node-exporter/validate.yaml create mode 100644 packages/rancher-project-monitoring/generated-changes/exclude/templates/grafana/dashboards-1.14/nodes-darwin.yaml delete mode 100644 packages/rancher-project-monitoring/generated-changes/exclude/templates/grafana/dashboards-1.14/statefulset.yaml delete mode 100644 packages/rancher-project-monitoring/generated-changes/exclude/templates/grafana/servicemonitor.yaml create mode 100644 packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/rules-1.14/config-reloaders.yaml delete mode 100644 packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/rules-1.14/kube-apiserver.rules.yaml create mode 100644 packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/rules-1.14/kubernetes-system-kube-proxy.yaml create mode 100644 packages/rancher-project-monitoring/generated-changes/exclude/templates/rancher-monitoring/upgrade/configmap.yaml create mode 100644 packages/rancher-project-monitoring/generated-changes/exclude/templates/rancher-monitoring/upgrade/job.yaml create mode 100644 packages/rancher-project-monitoring/generated-changes/exclude/templates/rancher-monitoring/upgrade/rbac.yaml create mode 100644 packages/rancher-project-monitoring/generated-changes/exclude/templates/thanos-ruler/extrasecret.yaml create mode 100644 packages/rancher-project-monitoring/generated-changes/exclude/templates/thanos-ruler/ingress.yaml create mode 100644 packages/rancher-project-monitoring/generated-changes/exclude/templates/thanos-ruler/podDisruptionBudget.yaml create mode 100644 packages/rancher-project-monitoring/generated-changes/exclude/templates/thanos-ruler/ruler.yaml create mode 100644 packages/rancher-project-monitoring/generated-changes/exclude/templates/thanos-ruler/service.yaml create mode 100644 packages/rancher-project-monitoring/generated-changes/exclude/templates/thanos-ruler/serviceaccount.yaml create mode 100644 packages/rancher-project-monitoring/generated-changes/exclude/templates/thanos-ruler/servicemonitor.yaml delete mode 100644 packages/rancher-project-monitoring/generated-changes/overlay/templates/grafana/dashboards-1.14/grafana-overview.yaml delete mode 100644 packages/rancher-project-monitoring/generated-changes/patch/files/rancher/pods/rancher-pod-containers.json.patch delete mode 100644 packages/rancher-project-monitoring/generated-changes/patch/files/rancher/pods/rancher-pod.json.patch delete mode 100644 packages/rancher-project-monitoring/generated-changes/patch/files/rancher/workloads/rancher-workload-pods.json.patch delete mode 100644 packages/rancher-project-monitoring/generated-changes/patch/files/rancher/workloads/rancher-workload.json.patch diff --git a/packages/rancher-project-monitoring/generated-changes/exclude/README.md b/packages/rancher-project-monitoring/generated-changes/exclude/README.md index a9429b0c..6ef18acb 100644 --- a/packages/rancher-project-monitoring/generated-changes/exclude/README.md +++ b/packages/rancher-project-monitoring/generated-changes/exclude/README.md @@ -11,20 +11,19 @@ _Note: This chart was formerly named `prometheus-operator` chart, now renamed to - Kubernetes 1.16+ - Helm 3+ -## Get Repo Info +## Get Helm Repository Info ```console helm repo add prometheus-community https://prometheus-community.github.io/helm-charts helm repo update ``` -_See [helm repo](https://helm.sh/docs/helm/helm_repo/) for command documentation._ +_See [`helm repo`](https://helm.sh/docs/helm/helm_repo/) for command documentation._ -## Install Chart +## Install Helm Chart ```console -# Helm -$ helm install [RELEASE_NAME] prometheus-community/kube-prometheus-stack +helm install [RELEASE_NAME] prometheus-community/kube-prometheus-stack ``` _See [configuration](#configuration) below._ @@ -43,11 +42,10 @@ To disable dependencies during installation, see [multiple releases](#multiple-r _See [helm dependency](https://helm.sh/docs/helm/helm_dependency/) for command documentation._ -## Uninstall Chart +## Uninstall Helm Chart ```console -# Helm -$ helm uninstall [RELEASE_NAME] +helm uninstall [RELEASE_NAME] ``` This removes all the Kubernetes components associated with the chart and deletes the release. @@ -70,8 +68,7 @@ kubectl delete crd thanosrulers.monitoring.coreos.com ## Upgrading Chart ```console -# Helm -$ helm upgrade [RELEASE_NAME] prometheus-community/kube-prometheus-stack +helm upgrade [RELEASE_NAME] prometheus-community/kube-prometheus-stack ``` With Helm v3, CRDs created by this chart are not updated by default and should be manually updated. @@ -83,6 +80,236 @@ _See [helm upgrade](https://helm.sh/docs/helm/helm_upgrade/) for command documen A major chart version change (like v1.2.3 -> v2.0.0) indicates that there is an incompatible breaking change needing manual actions. +### From 39.x to 40.x + +This version upgrades Prometheus-Operator to v0.59.1, Prometheus to v2.38.0, kube-state-metrics to v2.6.0 and Thanos to v0.28.0. +This version also upgrades the Helm charts of kube-state-metrics to 4.18.0 and prometheus-node-exporter to 4.2.0. + +Run these commands to update the CRDs before applying the upgrade. + +```console +kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.59.1/example/prometheus-operator-crd/monitoring.coreos.com_alertmanagerconfigs.yaml +kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.59.1/example/prometheus-operator-crd/monitoring.coreos.com_alertmanagers.yaml +kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.59.1/example/prometheus-operator-crd/monitoring.coreos.com_podmonitors.yaml +kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.59.1/example/prometheus-operator-crd/monitoring.coreos.com_probes.yaml +kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.59.1/example/prometheus-operator-crd/monitoring.coreos.com_prometheuses.yaml +kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.59.1/example/prometheus-operator-crd/monitoring.coreos.com_prometheusrules.yaml +kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.59.1/example/prometheus-operator-crd/monitoring.coreos.com_servicemonitors.yaml +kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.59.1/example/prometheus-operator-crd/monitoring.coreos.com_thanosrulers.yaml +``` + +Starting from prometheus-node-exporter version 4.0.0, the `node exporter` chart is using the [Kubernetes recommended labels](https://kubernetes.io/docs/concepts/overview/working-with-objects/common-labels/). Therefore you have to delete the daemonset before you upgrade. + +```console +kubectl delete daemonset -l app=prometheus-node-exporter +helm upgrade -i kube-prometheus-stack prometheus-community/kube-prometheus-stack +``` + +If you use your own custom [ServiceMonitor](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#servicemonitor) or [PodMonitor](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#podmonitor), please ensure to upgrade their `selector` fields accordingly to the new labels. + +### From 38.x to 39.x + +This upgraded prometheus-operator to v0.58.0 and prometheus to v2.37.0 + +Run these commands to update the CRDs before applying the upgrade. + +```console +kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.58.0/example/prometheus-operator-crd/monitoring.coreos.com_alertmanagerconfigs.yaml +kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.58.0/example/prometheus-operator-crd/monitoring.coreos.com_alertmanagers.yaml +kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.58.0/example/prometheus-operator-crd/monitoring.coreos.com_podmonitors.yaml +kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.58.0/example/prometheus-operator-crd/monitoring.coreos.com_probes.yaml +kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.58.0/example/prometheus-operator-crd/monitoring.coreos.com_prometheuses.yaml +kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.58.0/example/prometheus-operator-crd/monitoring.coreos.com_prometheusrules.yaml +kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.58.0/example/prometheus-operator-crd/monitoring.coreos.com_servicemonitors.yaml +kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.58.0/example/prometheus-operator-crd/monitoring.coreos.com_thanosrulers.yaml +``` + +### From 37.x to 38.x + +Reverted one of the default metrics relabelings for cAdvisor added in 36.x, due to it breaking container_network_* and various other statistics. If you do not want this change, you will need to override the `kubelet.cAdvisorMetricRelabelings`. + +### From 36.x to 37.x + +This includes some default metric relabelings for cAdvisor and apiserver metrics to reduce cardinality. If you do not want these defaults, you will need to override the `kubeApiServer.metricRelabelings` and or `kubelet.cAdvisorMetricRelabelings`. + +### From 35.x to 36.x + +This upgraded prometheus-operator to v0.57.0 and prometheus to v2.36.1 + +Run these commands to update the CRDs before applying the upgrade. + +```console +kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.57.0/example/prometheus-operator-crd/monitoring.coreos.com_alertmanagerconfigs.yaml +kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.57.0/example/prometheus-operator-crd/monitoring.coreos.com_alertmanagers.yaml +kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.57.0/example/prometheus-operator-crd/monitoring.coreos.com_podmonitors.yaml +kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.57.0/example/prometheus-operator-crd/monitoring.coreos.com_probes.yaml +kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.57.0/example/prometheus-operator-crd/monitoring.coreos.com_prometheuses.yaml +kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.57.0/example/prometheus-operator-crd/monitoring.coreos.com_prometheusrules.yaml +kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.57.0/example/prometheus-operator-crd/monitoring.coreos.com_servicemonitors.yaml +kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.57.0/example/prometheus-operator-crd/monitoring.coreos.com_thanosrulers.yaml +``` + +### From 34.x to 35.x + +This upgraded prometheus-operator to v0.56.0 and prometheus to v2.35.0 + +Run these commands to update the CRDs before applying the upgrade. + +```console +kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.56.0/example/prometheus-operator-crd/monitoring.coreos.com_alertmanagerconfigs.yaml +kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.56.0/example/prometheus-operator-crd/monitoring.coreos.com_alertmanagers.yaml +kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.56.0/example/prometheus-operator-crd/monitoring.coreos.com_podmonitors.yaml +kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.56.0/example/prometheus-operator-crd/monitoring.coreos.com_probes.yaml +kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.56.0/example/prometheus-operator-crd/monitoring.coreos.com_prometheuses.yaml +kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.56.0/example/prometheus-operator-crd/monitoring.coreos.com_prometheusrules.yaml +kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.56.0/example/prometheus-operator-crd/monitoring.coreos.com_servicemonitors.yaml +kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.56.0/example/prometheus-operator-crd/monitoring.coreos.com_thanosrulers.yaml +``` + +### From 33.x to 34.x + +This upgrades to prometheus-operator to v0.55.0 and prometheus to v2.33.5. + +Run these commands to update the CRDs before applying the upgrade. + +```console +kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.55.0/example/prometheus-operator-crd/monitoring.coreos.com_alertmanagerconfigs.yaml +kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.55.0/example/prometheus-operator-crd/monitoring.coreos.com_alertmanagers.yaml +kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.55.0/example/prometheus-operator-crd/monitoring.coreos.com_podmonitors.yaml +kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.55.0/example/prometheus-operator-crd/monitoring.coreos.com_probes.yaml +kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.55.0/example/prometheus-operator-crd/monitoring.coreos.com_prometheuses.yaml +kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.55.0/example/prometheus-operator-crd/monitoring.coreos.com_prometheusrules.yaml +kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.55.0/example/prometheus-operator-crd/monitoring.coreos.com_servicemonitors.yaml +kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.55.0/example/prometheus-operator-crd/monitoring.coreos.com_thanosrulers.yaml +``` + +### From 32.x to 33.x + +This upgrades the prometheus-node-exporter Chart to v3.0.0. Please review the changes to this subchart if you make customizations to hostMountPropagation. + +### From 31.x to 32.x + +This upgrades to prometheus-operator to v0.54.0 and prometheus to v2.33.1. It also changes the default for `grafana.serviceMonitor.enabled` to `true. + +Run these commands to update the CRDs before applying the upgrade. + +```console +kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.54.0/example/prometheus-operator-crd/monitoring.coreos.com_alertmanagerconfigs.yaml +kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.54.0/example/prometheus-operator-crd/monitoring.coreos.com_alertmanagers.yaml +kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.54.0/example/prometheus-operator-crd/monitoring.coreos.com_podmonitors.yaml +kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.54.0/example/prometheus-operator-crd/monitoring.coreos.com_probes.yaml +kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.54.0/example/prometheus-operator-crd/monitoring.coreos.com_prometheuses.yaml +kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.54.0/example/prometheus-operator-crd/monitoring.coreos.com_prometheusrules.yaml +kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.54.0/example/prometheus-operator-crd/monitoring.coreos.com_servicemonitors.yaml +kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.54.0/example/prometheus-operator-crd/monitoring.coreos.com_thanosrulers.yaml +``` + +### From 30.x to 31.x + +This version removes the built-in grafana ServiceMonitor and instead relies on the ServiceMonitor of the sub-chart. +`grafana.serviceMonitor.enabled` must be set instead of `grafana.serviceMonitor.selfMonitor` and the old ServiceMonitor may +need to be manually cleaned up after deploying the new release. + +### From 29.x to 30.x + +This version updates kube-state-metrics to 4.3.0 and uses the new option `kube-state-metrics.releaseLabel=true` which adds the "release" label to kube-state-metrics labels, making scraping of the metrics by kube-prometheus-stack work out of the box again, independent of the used kube-prometheus-stack release name. If you already set the "release" label via `kube-state-metrics.customLabels` you might have to remove that and use it via the new option. + +### From 28.x to 29.x + +This version makes scraping port for kube-controller-manager and kube-scheduler dynamic to reflect changes to default serving ports +for those components in Kubernetes versions v1.22 and v1.23 respectively. + +If you deploy on clusters using version v1.22+, kube-controller-manager will be scraped over HTTPS on port 10257. + +If you deploy on clusters running version v1.23+, kube-scheduler will be scraped over HTTPS on port 10259. + +### From 27.x to 28.x + +This version disables PodSecurityPolicies by default because they are deprecated in Kubernetes 1.21 and will be removed in Kubernetes 1.25. + +If you are using PodSecurityPolicies you can enable the previous behaviour by setting `kube-state-metrics.podSecurityPolicy.enabled`, `prometheus-node-exporter.rbac.pspEnabled`, `grafana.rbac.pspEnabled` and `global.rbac.pspEnabled` to `true`. + +### From 26.x to 27.x + +This version splits prometheus-node-exporter chart recording and altering rules in separate config values. +Instead of `defaultRules.rules.node` the 2 new variables `defaultRules.rules.nodeExporterAlerting` and `defaultRules.rules.nodeExporterRecording` are used. + +Also the following defaultRules.rules has been removed as they had no effect: `kubeApiserverError`, `kubePrometheusNodeAlerting`, `kubernetesAbsent`, `time`. + +The ability to set a rubookUrl via `defaultRules.rules.rubookUrl` was reintroduced. + +### From 25.x to 26.x + +This version enables the prometheus-node-exporter subchart servicemonitor by default again, by setting `prometheus-node-exporter.prometheus.monitor.enabled` to `true`. + +### From 24.x to 25.x + +This version upgrade to prometheus-operator v0.53.1. It removes support for setting a runbookUrl, since the upstream format for runbooks changed. + +```console +kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.53.1/example/prometheus-operator-crd/monitoring.coreos.com_alertmanagerconfigs.yaml +kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.53.1/example/prometheus-operator-crd/monitoring.coreos.com_alertmanagers.yaml +kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.53.1/example/prometheus-operator-crd/monitoring.coreos.com_podmonitors.yaml +kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.53.1/example/prometheus-operator-crd/monitoring.coreos.com_probes.yaml +kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.53.1/example/prometheus-operator-crd/monitoring.coreos.com_prometheuses.yaml +kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.53.1/example/prometheus-operator-crd/monitoring.coreos.com_prometheusrules.yaml +kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.53.1/example/prometheus-operator-crd/monitoring.coreos.com_servicemonitors.yaml +kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.53.1/example/prometheus-operator-crd/monitoring.coreos.com_thanosrulers.yaml +``` + +### From 23.x to 24.x + +The custom `ServiceMonitor` for the _kube-state-metrics_ & _prometheus-node-exporter_ charts have been removed in favour of the built-in sub-chart `ServiceMonitor`; for both sub-charts this means that `ServiceMonitor` customisations happen via the values passed to the chart. If you haven't directly customised this behaviour then there are no changes required to upgrade, but if you have please read the following. + +For _kube-state-metrics_ the `ServiceMonitor` customisation is now set via `kube-state-metrics.prometheus.monitor` and the `kubeStateMetrics.serviceMonitor.selfMonitor.enabled` value has moved to `kube-state-metrics.selfMonitor.enabled`. + +For _prometheus-node-exporter_ the `ServiceMonitor` customisation is now set via `prometheus-node-exporter.prometheus.monitor` and the `nodeExporter.jobLabel` values has moved to `prometheus-node-exporter.prometheus.monitor.jobLabel`. + +### From 22.x to 23.x + +Port names have been renamed for Istio's +[explicit protocol selection](https://istio.io/latest/docs/ops/configuration/traffic-management/protocol-selection/#explicit-protocol-selection). + +| | old value | new value | +|-|-----------|-----------| +| `alertmanager.alertmanagerSpec.portName` | `web` | `http-web` | +| `grafana.service.portName` | `service` | `http-web` | +| `prometheus-node-exporter.service.portName` | `metrics` (hardcoded) | `http-metrics` | +| `prometheus.prometheusSpec.portName` | `web` | `http-web` | + +### From 21.x to 22.x + +Due to the upgrade of the `kube-state-metrics` chart, removal of its deployment/stateful needs to done manually prior to upgrading: + +```console +kubectl delete deployments.apps -l app.kubernetes.io/instance=prometheus-operator,app.kubernetes.io/name=kube-state-metrics --cascade=orphan +``` + +or if you use autosharding: + +```console +kubectl delete statefulsets.apps -l app.kubernetes.io/instance=prometheus-operator,app.kubernetes.io/name=kube-state-metrics --cascade=orphan +``` + +### From 20.x to 21.x + +The config reloader values have been refactored. All the values have been moved to the key `prometheusConfigReloader` and the limits and requests can now be set separately. + +### From 19.x to 20.x + +Version 20 upgrades prometheus-operator from 0.50.x to 0.52.x. Helm does not automatically upgrade or install new CRDs on a chart upgrade, so you have to install the CRDs manually before updating: + +```console +kubectl apply -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.52.0/example/prometheus-operator-crd/monitoring.coreos.com_alertmanagerconfigs.yaml +kubectl apply -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.52.0/example/prometheus-operator-crd/monitoring.coreos.com_alertmanagers.yaml +kubectl apply -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.52.0/example/prometheus-operator-crd/monitoring.coreos.com_podmonitors.yaml +kubectl apply -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.52.0/example/prometheus-operator-crd/monitoring.coreos.com_probes.yaml +kubectl apply -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.52.0/example/prometheus-operator-crd/monitoring.coreos.com_prometheuses.yaml +kubectl apply -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.52.0/example/prometheus-operator-crd/monitoring.coreos.com_prometheusrules.yaml +kubectl apply -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.52.0/example/prometheus-operator-crd/monitoring.coreos.com_servicemonitors.yaml +kubectl apply -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.52.0/example/prometheus-operator-crd/monitoring.coreos.com_thanosrulers.yaml +``` + ### From 18.x to 19.x `kubeStateMetrics.serviceMonitor.namespaceOverride` was removed. @@ -286,7 +513,7 @@ With Prometheus Operator version 0.30+, the core Prometheus Operator pod exposes A validating and mutating webhook configuration requires the endpoint to which the request is sent to use TLS. It is possible to set up custom certificates to do this, but in most cases, a self-signed certificate is enough. The setup of this component requires some more complex orchestration when using helm. The steps are created to be idempotent and to allow turning the feature on and off without running into helm quirks. -1. A pre-install hook provisions a certificate into the same namespace using a format compatible with provisioning using end-user certificates. If the certificate already exists, the hook exits. +1. A pre-install hook provisions a certificate into the same namespace using a format compatible with provisioning using end user certificates. If the certificate already exists, the hook exits. 2. The prometheus operator pod is configured to use a TLS proxy container, which will load that certificate. 3. Validating and Mutating webhook configurations are created in the cluster, with their failure mode set to Ignore. This allows rules to be created by the same chart at the same time, even though the webhook has not yet been fully set up - it does not have the correct CA field set. 4. A post-install hook reads the CA from the secret created by step 1 and patches the Validating and Mutating webhook configurations. This process will allow a custom CA provisioned by some other process to also be patched into the webhook configurations. The chosen failure policy is also patched into the webhook configurations @@ -303,7 +530,7 @@ Because the operator can only run as a single pod, there is potential for this c ## Developing Prometheus Rules and Grafana Dashboards -This chart Grafana Dashboards and Prometheus Rules are just a copy from [prometheus-operator/prometheus-operator](https://github.com/prometheus-operator/prometheus-operator) and other sources, synced (with alterations) by scripts in [hack](hack) folder. In order to introduce any changes you need to first [add them to the original repo](https://github.com/prometheus-operator/kube-prometheus/blob/master/docs/developing-prometheus-rules-and-grafana-dashboards.md) and then sync there by scripts. +This chart Grafana Dashboards and Prometheus Rules are just a copy from [prometheus-operator/prometheus-operator](https://github.com/prometheus-operator/prometheus-operator) and other sources, synced (with alterations) by scripts in [hack](hack) folder. In order to introduce any changes you need to first [add them to the original repository](https://github.com/prometheus-operator/kube-prometheus/blob/main/docs/customizations/developing-prometheus-rules-and-grafana-dashboards.md) and then sync there by scripts. ## Further Information @@ -318,9 +545,9 @@ For more in-depth documentation of configuration options meanings, please see The prometheus operator does not support annotation-based discovery of services, using the `PodMonitor` or `ServiceMonitor` CRD in its place as they provide far more configuration options. For information on how to use PodMonitors/ServiceMonitors, please see the documentation on the `prometheus-operator/prometheus-operator` documentation here: -- [ServiceMonitors](https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/user-guides/getting-started.md#include-servicemonitors) -- [PodMonitors](https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/user-guides/getting-started.md#include-podmonitors) -- [Running Exporters](https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/user-guides/running-exporters.md) +- [ServiceMonitors](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/user-guides/getting-started.md#include-servicemonitors) +- [PodMonitors](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/user-guides/getting-started.md#include-podmonitors) +- [Running Exporters](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/user-guides/running-exporters.md) By default, Prometheus discovers PodMonitors and ServiceMonitors within its namespace, that are labeled with the same release tag as the prometheus-operator release. Sometimes, you may need to discover custom PodMonitors/ServiceMonitors, for example used to scrape data from third-party applications. diff --git a/packages/rancher-project-monitoring/generated-changes/exclude/files/ingress-nginx/nginx.json b/packages/rancher-project-monitoring/generated-changes/exclude/files/ingress-nginx/nginx.json index d4793ac6..56535223 100644 --- a/packages/rancher-project-monitoring/generated-changes/exclude/files/ingress-nginx/nginx.json +++ b/packages/rancher-project-monitoring/generated-changes/exclude/files/ingress-nginx/nginx.json @@ -1,33 +1,9 @@ { "__inputs": [ - { - "name": "DS_PROMETHEUS", - "label": "Prometheus", - "description": "", - "type": "datasource", - "pluginId": "prometheus", - "pluginName": "Prometheus" - } + ], "__requires": [ - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "5.2.1" - }, - { - "type": "datasource", - "id": "prometheus", - "name": "Prometheus", - "version": "5.0.0" - }, - { - "type": "panel", - "id": "singlestat", - "name": "Singlestat", - "version": "5.0.0" - } + ], "annotations": { "list": [ @@ -41,7 +17,7 @@ "type": "dashboard" }, { - "datasource": "${DS_PROMETHEUS}", + "datasource": "$datasource", "enable": true, "expr": "sum(changes(nginx_ingress_controller_config_last_reload_successful_timestamp_seconds{instance!=\"unknown\",controller_class=~\"$controller_class\",namespace=~\"$namespace\"}[30s])) by (controller_class)", "hide": false, @@ -72,7 +48,7 @@ "rgba(237, 129, 40, 0.89)", "rgba(50, 172, 45, 0.97)" ], - "datasource": "${DS_PROMETHEUS}", + "datasource": "$datasource", "format": "ops", "gauge": { "maxValue": 100, @@ -154,7 +130,7 @@ "rgba(237, 129, 40, 0.89)", "rgba(50, 172, 45, 0.97)" ], - "datasource": "${DS_PROMETHEUS}", + "datasource": "$datasource", "format": "none", "gauge": { "maxValue": 100, @@ -237,7 +213,7 @@ "rgba(237, 129, 40, 0.89)", "rgba(50, 172, 45, 0.97)" ], - "datasource": "${DS_PROMETHEUS}", + "datasource": "$datasource", "format": "percentunit", "gauge": { "maxValue": 100, @@ -319,7 +295,7 @@ "rgba(237, 129, 40, 0.89)", "rgba(50, 172, 45, 0.97)" ], - "datasource": "${DS_PROMETHEUS}", + "datasource": "$datasource", "decimals": 0, "format": "none", "gauge": { @@ -403,7 +379,7 @@ "rgba(237, 129, 40, 0.89)", "rgba(50, 172, 45, 0.97)" ], - "datasource": "${DS_PROMETHEUS}", + "datasource": "$datasource", "decimals": 0, "format": "none", "gauge": { @@ -483,7 +459,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "${DS_PROMETHEUS}", + "datasource": "$datasource", "decimals": 2, "editable": true, "error": false, @@ -593,7 +569,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "${DS_PROMETHEUS}", + "datasource": "$datasource", "decimals": 2, "editable": false, "error": false, @@ -694,7 +670,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "${DS_PROMETHEUS}", + "datasource": "$datasource", "decimals": 2, "editable": true, "error": false, @@ -810,7 +786,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "${DS_PROMETHEUS}", + "datasource": "$datasource", "decimals": 2, "editable": false, "error": false, @@ -912,7 +888,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "${DS_PROMETHEUS}", + "datasource": "$datasource", "decimals": 3, "editable": false, "error": false, @@ -1015,7 +991,7 @@ }, { "columns": [], - "datasource": "${DS_PROMETHEUS}", + "datasource": "$datasource", "fontSize": "100%", "gridPos": { "h": 8, @@ -1240,7 +1216,7 @@ "value": "current" } ], - "datasource": "${DS_PROMETHEUS}", + "datasource": "$datasource", "fontSize": "100%", "gridPos": { "h": 8, @@ -1323,10 +1299,16 @@ "templating": { "list": [ { + "current": { + "text": "Prometheus", + "value": "Prometheus" + }, "hide": 0, - "label": "datasource", - "name": "DS_PROMETHEUS", - "options": [], + "label": "Data Source", + "name": "datasource", + "options": [ + + ], "query": "prometheus", "refresh": 1, "regex": "", @@ -1338,7 +1320,7 @@ "text": "All", "value": "$__all" }, - "datasource": "${DS_PROMETHEUS}", + "datasource": "$datasource", "hide": 0, "includeAll": true, "label": "Namespace", @@ -1361,7 +1343,7 @@ "text": "All", "value": "$__all" }, - "datasource": "${DS_PROMETHEUS}", + "datasource": "$datasource", "hide": 0, "includeAll": true, "label": "Controller Class", @@ -1384,7 +1366,7 @@ "text": "All", "value": "$__all" }, - "datasource": "${DS_PROMETHEUS}", + "datasource": "$datasource", "hide": 0, "includeAll": true, "label": "Controller", @@ -1408,7 +1390,7 @@ "text": "All", "value": "$__all" }, - "datasource": "${DS_PROMETHEUS}", + "datasource": "$datasource", "hide": 0, "includeAll": true, "label": "Ingress", diff --git a/packages/rancher-project-monitoring/generated-changes/exclude/files/ingress-nginx/request-handling-performance.json b/packages/rancher-project-monitoring/generated-changes/exclude/files/ingress-nginx/request-handling-performance.json index d0125f0a..156e3312 100644 --- a/packages/rancher-project-monitoring/generated-changes/exclude/files/ingress-nginx/request-handling-performance.json +++ b/packages/rancher-project-monitoring/generated-changes/exclude/files/ingress-nginx/request-handling-performance.json @@ -1,33 +1,9 @@ { "__inputs": [ - { - "name": "DS_PROMETHEUS", - "label": "Prometheus", - "description": "", - "type": "datasource", - "pluginId": "prometheus", - "pluginName": "Prometheus" - } + ], "__requires": [ - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "6.6.0" - }, - { - "type": "panel", - "id": "graph", - "name": "Graph", - "version": "" - }, - { - "type": "datasource", - "id": "prometheus", - "name": "Prometheus", - "version": "1.0.0" - } + ], "annotations": { "list": [ @@ -55,7 +31,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "${DS_PROMETHEUS}", + "datasource": "$datasource", "description": "Total time taken for nginx and upstream servers to process a request and send a response", "fill": 1, "fillGradient": 0, @@ -156,7 +132,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "${DS_PROMETHEUS}", + "datasource": "$datasource", "description": "The time spent on receiving the response from the upstream server", "fill": 1, "fillGradient": 0, @@ -259,7 +235,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "${DS_PROMETHEUS}", + "datasource": "$datasource", "fill": 1, "fillGradient": 0, "gridPos": { @@ -350,7 +326,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "${DS_PROMETHEUS}", + "datasource": "$datasource", "description": "For each path observed, its median upstream response time", "fill": 1, "fillGradient": 0, @@ -442,7 +418,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "${DS_PROMETHEUS}", + "datasource": "$datasource", "description": "Percentage of 4xx and 5xx responses among all responses.", "fill": 1, "fillGradient": 0, @@ -534,7 +510,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "${DS_PROMETHEUS}", + "datasource": "$datasource", "description": "For each path observed, the sum of upstream request time", "fill": 1, "fillGradient": 0, @@ -626,7 +602,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "${DS_PROMETHEUS}", + "datasource": "$datasource", "fill": 1, "fillGradient": 0, "gridPos": { @@ -717,7 +693,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "${DS_PROMETHEUS}", + "datasource": "$datasource", "fill": 1, "fillGradient": 0, "gridPos": { @@ -816,7 +792,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "${DS_PROMETHEUS}", + "datasource": "$datasource", "fill": 1, "fillGradient": 0, "gridPos": { @@ -912,10 +888,16 @@ "templating": { "list": [ { + "current": { + "text": "Prometheus", + "value": "Prometheus" + }, "hide": 0, - "label": "datasource", - "name": "DS_PROMETHEUS", - "options": [], + "label": "Data Source", + "name": "datasource", + "options": [ + + ], "query": "prometheus", "refresh": 1, "regex": "", @@ -924,7 +906,7 @@ { "allValue": ".*", "current": {}, - "datasource": "${DS_PROMETHEUS}", + "datasource": "$datasource", "definition": "label_values(nginx_ingress_controller_requests, ingress) ", "hide": 0, "includeAll": true, diff --git a/packages/rancher-project-monitoring/generated-changes/exclude/files/rancher/cluster/rancher-cluster-nodes.json b/packages/rancher-project-monitoring/generated-changes/exclude/files/rancher/cluster/rancher-cluster-nodes.json index b33895a0..1d494350 100644 --- a/packages/rancher-project-monitoring/generated-changes/exclude/files/rancher/cluster/rancher-cluster-nodes.json +++ b/packages/rancher-project-monitoring/generated-changes/exclude/files/rancher/cluster/rancher-cluster-nodes.json @@ -25,7 +25,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": null, + "datasource": "$datasource", "fieldConfig": { "defaults": { "custom": {} @@ -120,7 +120,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": null, + "datasource": "$datasource", "fieldConfig": { "defaults": { "custom": {} @@ -234,7 +234,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": null, + "datasource": "$datasource", "fieldConfig": { "defaults": { "custom": {} @@ -329,7 +329,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": null, + "datasource": "$datasource", "fieldConfig": { "defaults": { "custom": {} @@ -424,7 +424,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": null, + "datasource": "$datasource", "fieldConfig": { "defaults": { "custom": {} @@ -525,7 +525,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": null, + "datasource": "$datasource", "fieldConfig": { "defaults": { "custom": {} @@ -650,7 +650,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": null, + "datasource": "$datasource", "fieldConfig": { "defaults": { "custom": {} @@ -749,7 +749,24 @@ "style": "dark", "tags": [], "templating": { - "list": [] + "list": [ + { + "current": { + "text": "Prometheus", + "value": "Prometheus" + }, + "hide": 0, + "label": "Data Source", + "name": "datasource", + "options": [ + + ], + "query": "prometheus", + "refresh": 1, + "regex": "", + "type": "datasource" + } + ] }, "time": { "from": "now-1h", diff --git a/packages/rancher-project-monitoring/generated-changes/exclude/files/rancher/cluster/rancher-cluster.json b/packages/rancher-project-monitoring/generated-changes/exclude/files/rancher/cluster/rancher-cluster.json index 8fccbc24..24385a23 100644 --- a/packages/rancher-project-monitoring/generated-changes/exclude/files/rancher/cluster/rancher-cluster.json +++ b/packages/rancher-project-monitoring/generated-changes/exclude/files/rancher/cluster/rancher-cluster.json @@ -23,7 +23,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": null, + "datasource": "$datasource", "fieldConfig": { "defaults": { "custom": {} @@ -116,7 +116,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": null, + "datasource": "$datasource", "fieldConfig": { "defaults": { "custom": {} @@ -228,7 +228,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": null, + "datasource": "$datasource", "fieldConfig": { "defaults": { "custom": {} @@ -321,7 +321,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": null, + "datasource": "$datasource", "fieldConfig": { "defaults": { "custom": {} @@ -413,7 +413,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": null, + "datasource": "$datasource", "fieldConfig": { "defaults": { "custom": {} @@ -511,7 +511,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": null, + "datasource": "$datasource", "fieldConfig": { "defaults": { "custom": {} @@ -633,7 +633,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": null, + "datasource": "$datasource", "fieldConfig": { "defaults": { "custom": {} @@ -732,7 +732,24 @@ "style": "dark", "tags": [], "templating": { - "list": [] + "list": [ + { + "current": { + "text": "Prometheus", + "value": "Prometheus" + }, + "hide": 0, + "label": "Data Source", + "name": "datasource", + "options": [ + + ], + "query": "prometheus", + "refresh": 1, + "regex": "", + "type": "datasource" + } + ] }, "time": { "from": "now-1h", diff --git a/packages/rancher-project-monitoring/generated-changes/exclude/files/rancher/home/rancher-default-home.json b/packages/rancher-project-monitoring/generated-changes/exclude/files/rancher/home/rancher-default-home.json index 13b153cf..3fce2075 100644 --- a/packages/rancher-project-monitoring/generated-changes/exclude/files/rancher/home/rancher-default-home.json +++ b/packages/rancher-project-monitoring/generated-changes/exclude/files/rancher/home/rancher-default-home.json @@ -9,7 +9,7 @@ "links": [], "panels": [ { - "datasource": null, + "datasource": "$datasource", "fieldConfig": { "defaults": { "custom": {} @@ -1177,7 +1177,7 @@ } }, { - "datasource": null, + "datasource": "$datasource", "fieldConfig": { "defaults": { "custom": {} @@ -1204,7 +1204,7 @@ "type": "dashlist" }, { - "datasource": null, + "datasource": "$datasource", "fieldConfig": { "defaults": { "custom": {} @@ -1233,7 +1233,24 @@ "style": "dark", "tags": [], "templating": { - "list": [] + "list": [ + { + "current": { + "text": "Prometheus", + "value": "Prometheus" + }, + "hide": 0, + "label": "Data Source", + "name": "datasource", + "options": [ + + ], + "query": "prometheus", + "refresh": 1, + "regex": "", + "type": "datasource" + } + ] }, "time": { "from": "now-1h", diff --git a/packages/rancher-project-monitoring/generated-changes/exclude/files/rancher/k8s/rancher-etcd-nodes.json b/packages/rancher-project-monitoring/generated-changes/exclude/files/rancher/k8s/rancher-etcd-nodes.json index 300b6127..8c4bdcef 100644 --- a/packages/rancher-project-monitoring/generated-changes/exclude/files/rancher/k8s/rancher-etcd-nodes.json +++ b/packages/rancher-project-monitoring/generated-changes/exclude/files/rancher/k8s/rancher-etcd-nodes.json @@ -126,7 +126,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": null, + "datasource": "$datasource", "fieldConfig": { "defaults": { "custom": {} @@ -174,7 +174,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum(etcd_debugging_mvcc_db_total_size_in_bytes) by (instance)", + "expr": "sum(etcd_mvcc_db_total_size_in_bytes) by (instance)", "interval": "", "legendFormat": "DB Size ({{instance}})", "refId": "A" @@ -228,7 +228,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": null, + "datasource": "$datasource", "fieldConfig": { "defaults": { "custom": {} @@ -329,7 +329,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": null, + "datasource": "$datasource", "fieldConfig": { "defaults": { "custom": {} @@ -442,7 +442,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": null, + "datasource": "$datasource", "fieldConfig": { "defaults": { "custom": {} @@ -544,7 +544,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": null, + "datasource": "$datasource", "fieldConfig": { "defaults": { "custom": {} @@ -643,7 +643,24 @@ "style": "dark", "tags": [], "templating": { - "list": [] + "list": [ + { + "current": { + "text": "Prometheus", + "value": "Prometheus" + }, + "hide": 0, + "label": "Data Source", + "name": "datasource", + "options": [ + + ], + "query": "prometheus", + "refresh": 1, + "regex": "", + "type": "datasource" + } + ] }, "time": { "from": "now-1h", diff --git a/packages/rancher-project-monitoring/generated-changes/exclude/files/rancher/k8s/rancher-etcd.json b/packages/rancher-project-monitoring/generated-changes/exclude/files/rancher/k8s/rancher-etcd.json index d58e23bc..a305fe8a 100644 --- a/packages/rancher-project-monitoring/generated-changes/exclude/files/rancher/k8s/rancher-etcd.json +++ b/packages/rancher-project-monitoring/generated-changes/exclude/files/rancher/k8s/rancher-etcd.json @@ -122,7 +122,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": null, + "datasource": "$datasource", "fieldConfig": { "defaults": { "custom": {} @@ -166,7 +166,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum(etcd_debugging_mvcc_db_total_size_in_bytes)", + "expr": "sum(etcd_mvcc_db_total_size_in_bytes)", "interval": "", "legendFormat": "DB Size", "refId": "A" @@ -218,7 +218,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": null, + "datasource": "$datasource", "fieldConfig": { "defaults": { "custom": {} @@ -317,7 +317,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": null, + "datasource": "$datasource", "fieldConfig": { "defaults": { "custom": {} @@ -427,7 +427,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": null, + "datasource": "$datasource", "fieldConfig": { "defaults": { "custom": {} @@ -526,7 +526,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": null, + "datasource": "$datasource", "fieldConfig": { "defaults": { "custom": {} @@ -625,7 +625,24 @@ "style": "dark", "tags": [], "templating": { - "list": [] + "list": [ + { + "current": { + "text": "Prometheus", + "value": "Prometheus" + }, + "hide": 0, + "label": "Data Source", + "name": "datasource", + "options": [ + + ], + "query": "prometheus", + "refresh": 1, + "regex": "", + "type": "datasource" + } + ] }, "time": { "from": "now-1h", diff --git a/packages/rancher-project-monitoring/generated-changes/exclude/files/rancher/k8s/rancher-k8s-components-nodes.json b/packages/rancher-project-monitoring/generated-changes/exclude/files/rancher/k8s/rancher-k8s-components-nodes.json index 9de59be4..b31358ea 100644 --- a/packages/rancher-project-monitoring/generated-changes/exclude/files/rancher/k8s/rancher-k8s-components-nodes.json +++ b/packages/rancher-project-monitoring/generated-changes/exclude/files/rancher/k8s/rancher-k8s-components-nodes.json @@ -25,7 +25,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": null, + "datasource": "$datasource", "fieldConfig": { "defaults": { "custom": {} @@ -120,7 +120,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": null, + "datasource": "$datasource", "fieldConfig": { "defaults": { "custom": {} @@ -271,7 +271,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": null, + "datasource": "$datasource", "fieldConfig": { "defaults": { "custom": {} @@ -366,7 +366,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": null, + "datasource": "$datasource", "fieldConfig": { "defaults": { "custom": {} @@ -483,7 +483,24 @@ "style": "dark", "tags": [], "templating": { - "list": [] + "list": [ + { + "current": { + "text": "Prometheus", + "value": "Prometheus" + }, + "hide": 0, + "label": "Data Source", + "name": "datasource", + "options": [ + + ], + "query": "prometheus", + "refresh": 1, + "regex": "", + "type": "datasource" + } + ] }, "time": { "from": "now-1h", diff --git a/packages/rancher-project-monitoring/generated-changes/exclude/files/rancher/k8s/rancher-k8s-components.json b/packages/rancher-project-monitoring/generated-changes/exclude/files/rancher/k8s/rancher-k8s-components.json index ddb0caca..44cf97f9 100644 --- a/packages/rancher-project-monitoring/generated-changes/exclude/files/rancher/k8s/rancher-k8s-components.json +++ b/packages/rancher-project-monitoring/generated-changes/exclude/files/rancher/k8s/rancher-k8s-components.json @@ -23,7 +23,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": null, + "datasource": "$datasource", "fieldConfig": { "defaults": { "custom": {} @@ -116,7 +116,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": null, + "datasource": "$datasource", "fieldConfig": { "defaults": { "custom": {} @@ -265,7 +265,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": null, + "datasource": "$datasource", "fieldConfig": { "defaults": { "custom": {} @@ -358,7 +358,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": null, + "datasource": "$datasource", "fieldConfig": { "defaults": { "custom": {} @@ -475,7 +475,24 @@ "style": "dark", "tags": [], "templating": { - "list": [] + "list": [ + { + "current": { + "text": "Prometheus", + "value": "Prometheus" + }, + "hide": 0, + "label": "Data Source", + "name": "datasource", + "options": [ + + ], + "query": "prometheus", + "refresh": 1, + "regex": "", + "type": "datasource" + } + ] }, "time": { "from": "now-1h", diff --git a/packages/rancher-project-monitoring/generated-changes/exclude/files/rancher/nodes/rancher-node-detail.json b/packages/rancher-project-monitoring/generated-changes/exclude/files/rancher/nodes/rancher-node-detail.json index d71bc02b..920fb94c 100644 --- a/packages/rancher-project-monitoring/generated-changes/exclude/files/rancher/nodes/rancher-node-detail.json +++ b/packages/rancher-project-monitoring/generated-changes/exclude/files/rancher/nodes/rancher-node-detail.json @@ -25,7 +25,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": null, + "datasource": "$datasource", "fieldConfig": { "defaults": { "custom": {} @@ -118,7 +118,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": null, + "datasource": "$datasource", "fieldConfig": { "defaults": { "custom": {} @@ -230,7 +230,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": null, + "datasource": "$datasource", "fieldConfig": { "defaults": { "custom": {} @@ -325,7 +325,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": null, + "datasource": "$datasource", "fieldConfig": { "defaults": { "custom": {} @@ -420,7 +420,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": null, + "datasource": "$datasource", "fieldConfig": { "defaults": { "custom": {} @@ -521,7 +521,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": null, + "datasource": "$datasource", "fieldConfig": { "defaults": { "custom": {} @@ -646,7 +646,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": null, + "datasource": "$datasource", "fieldConfig": { "defaults": { "custom": {} @@ -746,6 +746,22 @@ "tags": [], "templating": { "list": [ + { + "current": { + "text": "Prometheus", + "value": "Prometheus" + }, + "hide": 0, + "label": "Data Source", + "name": "datasource", + "options": [ + + ], + "query": "prometheus", + "refresh": 1, + "regex": "", + "type": "datasource" + }, { "allValue": null, "hide": 0, diff --git a/packages/rancher-project-monitoring/generated-changes/exclude/files/rancher/nodes/rancher-node.json b/packages/rancher-project-monitoring/generated-changes/exclude/files/rancher/nodes/rancher-node.json index c4b77db6..367df3cc 100644 --- a/packages/rancher-project-monitoring/generated-changes/exclude/files/rancher/nodes/rancher-node.json +++ b/packages/rancher-project-monitoring/generated-changes/exclude/files/rancher/nodes/rancher-node.json @@ -23,7 +23,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": null, + "datasource": "$datasource", "fieldConfig": { "defaults": { "custom": {} @@ -116,7 +116,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": null, + "datasource": "$datasource", "fieldConfig": { "defaults": { "custom": {} @@ -228,7 +228,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": null, + "datasource": "$datasource", "fieldConfig": { "defaults": { "custom": {} @@ -321,7 +321,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": null, + "datasource": "$datasource", "fieldConfig": { "defaults": { "custom": {} @@ -413,7 +413,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": null, + "datasource": "$datasource", "fieldConfig": { "defaults": { "custom": {} @@ -511,7 +511,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": null, + "datasource": "$datasource", "fieldConfig": { "defaults": { "custom": {} @@ -633,7 +633,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": null, + "datasource": "$datasource", "fieldConfig": { "defaults": { "custom": {} @@ -733,6 +733,22 @@ "tags": [], "templating": { "list": [ + { + "current": { + "text": "Prometheus", + "value": "Prometheus" + }, + "hide": 0, + "label": "Data Source", + "name": "datasource", + "options": [ + + ], + "query": "prometheus", + "refresh": 1, + "regex": "", + "type": "datasource" + }, { "allValue": null, "hide": 0, diff --git a/packages/rancher-project-monitoring/generated-changes/exclude/files/rancher/performance/norman-controllers.json b/packages/rancher-project-monitoring/generated-changes/exclude/files/rancher/performance/norman-controllers.json deleted file mode 100644 index 25e7bf37..00000000 --- a/packages/rancher-project-monitoring/generated-changes/exclude/files/rancher/performance/norman-controllers.json +++ /dev/null @@ -1,634 +0,0 @@ -{ - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "type": "dashboard" - } - ] - }, - "editable": true, - "gnetId": null, - "graphTooltip": 0, - "id": 41, - "iteration": 1646185125632, - "links": [], - "panels": [ - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "${DS_PROMETHEUS}", - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 9, - "w": 12, - "x": 0, - "y": 0 - }, - "hiddenSeries": false, - "id": 246, - "legend": { - "alignAsTable": true, - "avg": false, - "current": true, - "max": false, - "min": false, - "rightSide": true, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "7.5.11", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "topk(20,norman_generic_controller_total_handler_failure)", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "{{ name }}.{{handlerName}}({{ key }})", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Total Failures by Handlers/Keys (Top 20)", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:4428", - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "$$hashKey": "object:4429", - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "${DS_PROMETHEUS}", - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 9, - "w": 12, - "x": 12, - "y": 0 - }, - "hiddenSeries": false, - "id": 245, - "legend": { - "alignAsTable": true, - "avg": false, - "current": true, - "max": false, - "min": false, - "rightSide": true, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "7.5.11", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "increase(norman_generic_controller_total_handler_failure[2m])", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "{{ name }}.{{handlerName}}({{ key }})", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Handler Failure Rate Over Last 2 Minutes", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:4595", - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "$$hashKey": "object:4596", - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "${DS_PROMETHEUS}", - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 9, - "w": 12, - "x": 0, - "y": 9 - }, - "hiddenSeries": false, - "id": 243, - "legend": { - "alignAsTable": true, - "avg": false, - "current": true, - "max": false, - "min": false, - "rightSide": true, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "7.5.11", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "topk(20,norman_generic_controller_total_handler_execution)", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "{{ name }}.{{handlerName}}", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Handler Execution Total (Top 20)", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:4485", - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "$$hashKey": "object:4486", - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "${DS_PROMETHEUS}", - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 9, - "w": 12, - "x": 12, - "y": 9 - }, - "hiddenSeries": false, - "id": 244, - "legend": { - "alignAsTable": true, - "avg": false, - "current": true, - "max": false, - "min": false, - "rightSide": true, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "7.5.11", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "increase(norman_generic_controller_total_handler_execution[2m])", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "{{ name }}.{{handlerName}}", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Handler Execution Rate Over Last 2 Minutes", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:4540", - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "$$hashKey": "object:4541", - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "${DS_PROMETHEUS}", - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 9, - "w": 12, - "x": 0, - "y": 18 - }, - "hiddenSeries": false, - "id": 242, - "legend": { - "alignAsTable": true, - "avg": false, - "current": true, - "max": false, - "min": false, - "rightSide": true, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "7.5.11", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "exemplar": true, - "expr": "sum(norman_generic_controller_total_handler_execution) by (name)", - "format": "time_series", - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{ name }}", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Controller Execution Total", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:4809", - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "$$hashKey": "object:4810", - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - } - ], - "refresh": "30s", - "schemaVersion": 27, - "style": "dark", - "tags": [ - "main" - ], - "templating": { - "list": [ - { - "allValue": ".*", - "current": { - "selected": false, - "text": "All", - "value": "$__all" - }, - "datasource": "${DS_PROMETHEUS}", - "definition": "", - "description": null, - "error": null, - "hide": 0, - "includeAll": true, - "label": null, - "multi": false, - "name": "Node", - "options": [], - "query": { - "query": "label_values(kubernetes_io_hostname)", - "refId": "Prometheus-Node-Variable-Query" - }, - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "Prometheus", - "value": "Prometheus" - }, - "description": null, - "error": null, - "hide": 0, - "includeAll": false, - "label": "prometheus", - "multi": false, - "name": "DS_PROMETHEUS", - "options": [], - "query": "prometheus", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "type": "datasource" - } - ] - }, - "time": { - "from": "now-1h", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Rancher Internal State (Controllers)", - "uid": "ranchctrl", - "version": 1 -} diff --git a/packages/rancher-project-monitoring/generated-changes/exclude/files/rancher/performance/performance-debugging.json b/packages/rancher-project-monitoring/generated-changes/exclude/files/rancher/performance/performance-debugging.json index 36dede66..b4ac76df 100644 --- a/packages/rancher-project-monitoring/generated-changes/exclude/files/rancher/performance/performance-debugging.json +++ b/packages/rancher-project-monitoring/generated-changes/exclude/files/rancher/performance/performance-debugging.json @@ -15,7 +15,7 @@ "editable": true, "gnetId": null, "graphTooltip": 0, - "id": 33, + "id": 3, "links": [], "panels": [ { @@ -23,7 +23,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": null, + "datasource": "$datasource", "fieldConfig": { "defaults": {}, "overrides": [] @@ -120,7 +120,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": null, + "datasource": "$datasource", "description": "", "fieldConfig": { "defaults": {}, @@ -218,7 +218,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": null, + "datasource": "$datasource", "fieldConfig": { "defaults": {}, "overrides": [] @@ -315,7 +315,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": null, + "datasource": "$datasource", "fieldConfig": { "defaults": {}, "overrides": [] @@ -412,7 +412,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": null, + "datasource": "$datasource", "fieldConfig": { "defaults": {}, "overrides": [] @@ -513,7 +513,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": null, + "datasource": "$datasource", "fieldConfig": { "defaults": {}, "overrides": [] @@ -610,7 +610,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": null, + "datasource": "$datasource", "fieldConfig": { "defaults": {}, "overrides": [] @@ -708,7 +708,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": null, + "datasource": "$datasource", "fieldConfig": { "defaults": {}, "overrides": [] @@ -805,7 +805,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": null, + "datasource": "$datasource", "fieldConfig": { "defaults": {}, "overrides": [] @@ -902,7 +902,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": null, + "datasource": "$datasource", "description": "", "fieldConfig": { "defaults": {}, @@ -1000,7 +1000,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": null, + "datasource": "$datasource", "fieldConfig": { "defaults": {}, "overrides": [] @@ -1014,6 +1014,101 @@ "y": 86 }, "hiddenSeries": false, + "id": 32, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.5.11", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "exemplar": true, + "expr": "topk(20, sum by (handler_name,controller_name) (\nincrease(lasso_controller_total_handler_execution[2m])\n))", + "interval": "", + "legendFormat": "{{controller_name}}.{{handler_name}}", + "refId": "A" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Handler Executions Over Last 2 Minutes (Top 20)", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 8, + "w": 16, + "x": 0, + "y": 94 + }, + "hiddenSeries": false, "id": 20, "legend": { "avg": false, @@ -1097,7 +1192,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": null, + "datasource": "$datasource", "fieldConfig": { "defaults": {}, "overrides": [] @@ -1108,7 +1203,102 @@ "h": 8, "w": 16, "x": 0, - "y": 94 + "y": 102 + }, + "hiddenSeries": false, + "id": 34, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.5.11", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "exemplar": true, + "expr": "topk(20,sum by (handler_name,controller_name) (\nincrease(lasso_controller_total_handler_execution{has_error=\"true\"}[2m])\n))", + "interval": "", + "legendFormat": "{{controller_name}}.{{handler_name}}", + "refId": "A" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Handler Executions Over Last 2 Minutes (Top 20)", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 8, + "w": 16, + "x": 0, + "y": 110 }, "hiddenSeries": false, "id": 16, @@ -1194,7 +1384,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": null, + "datasource": "$datasource", "description": "", "fieldConfig": { "defaults": {}, @@ -1206,7 +1396,7 @@ "h": 8, "w": 16, "x": 0, - "y": 102 + "y": 118 }, "hiddenSeries": false, "id": 18, @@ -1292,7 +1482,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": null, + "datasource": "$datasource", "fieldConfig": { "defaults": {}, "overrides": [] @@ -1303,7 +1493,7 @@ "h": 8, "w": 16, "x": 0, - "y": 110 + "y": 126 }, "hiddenSeries": false, "id": 26, @@ -1389,7 +1579,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": null, + "datasource": "$datasource", "fieldConfig": { "defaults": {}, "overrides": [] @@ -1400,7 +1590,7 @@ "h": 8, "w": 16, "x": 0, - "y": 118 + "y": 134 }, "hiddenSeries": false, "id": 24, @@ -1486,10 +1676,27 @@ "style": "dark", "tags": [], "templating": { - "list": [] + "list": [ + { + "current": { + "text": "Prometheus", + "value": "Prometheus" + }, + "hide": 0, + "label": "Data Source", + "name": "datasource", + "options": [ + + ], + "query": "prometheus", + "refresh": 1, + "regex": "", + "type": "datasource" + } + ] }, "time": { - "from": "now-6h", + "from": "now-15m", "to": "now" }, "timepicker": {}, diff --git a/packages/rancher-project-monitoring/generated-changes/exclude/files/upgrade/scripts/delete-workloads-with-old-labels.sh b/packages/rancher-project-monitoring/generated-changes/exclude/files/upgrade/scripts/delete-workloads-with-old-labels.sh new file mode 100644 index 00000000..89431e71 --- /dev/null +++ b/packages/rancher-project-monitoring/generated-changes/exclude/files/upgrade/scripts/delete-workloads-with-old-labels.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +set -e +set -x + +# node-exporter +kubectl delete daemonset -l app=prometheus-node-exporter,release=rancher-monitoring --ignore-not-found=true + +# prometheus-adapter +kubectl delete deployments -l app=prometheus-adapter,release=rancher-monitoring --ignore-not-found=true + +# kube-state-metrics +kubectl delete deployments -l app.kubernetes.io/instance=rancher-monitoring,app.kubernetes.io/name=kube-state-metrics --cascade=orphan --ignore-not-found=true +kubectl delete statefulsets -l app.kubernetes.io/instance=rancher-monitoring,app.kubernetes.io/name=kube-state-metrics --cascade=orphan --ignore-not-found=true diff --git a/packages/rancher-project-monitoring/generated-changes/exclude/templates/alertmanager/serviceperreplica.yaml b/packages/rancher-project-monitoring/generated-changes/exclude/templates/alertmanager/serviceperreplica.yaml index 0f12ae87..75a13bdf 100644 --- a/packages/rancher-project-monitoring/generated-changes/exclude/templates/alertmanager/serviceperreplica.yaml +++ b/packages/rancher-project-monitoring/generated-changes/exclude/templates/alertmanager/serviceperreplica.yaml @@ -30,6 +30,9 @@ items: - {{ $cidr }} {{- end }} {{- end }} + {{- if ne $serviceValues.type "ClusterIP" }} + externalTrafficPolicy: {{ $serviceValues.externalTrafficPolicy }} + {{- end }} ports: - name: {{ $.Values.alertmanager.alertmanagerSpec.portName }} {{- if eq $serviceValues.type "NodePort" }} @@ -38,9 +41,9 @@ items: port: {{ $serviceValues.port }} targetPort: {{ $serviceValues.targetPort }} selector: - app: alertmanager - alertmanager: {{ template "kube-prometheus-stack.fullname" $ }}-alertmanager - statefulset.kubernetes.io/pod-name: alertmanager-{{ include "kube-prometheus-stack.fullname" $ }}-alertmanager-{{ $i }} + app.kubernetes.io/name: alertmanager + alertmanager: {{ template "kube-prometheus-stack.alertmanager.crname" $ }} + statefulset.kubernetes.io/pod-name: alertmanager-{{ include "kube-prometheus-stack.alertmanager.crname" $ }}-{{ $i }} type: "{{ $serviceValues.type }}" {{- end }} {{- end }} diff --git a/packages/rancher-project-monitoring/generated-changes/exclude/templates/exporters/core-dns/servicemonitor.yaml b/packages/rancher-project-monitoring/generated-changes/exclude/templates/exporters/core-dns/servicemonitor.yaml index 1f4d0b83..9adeaf56 100644 --- a/packages/rancher-project-monitoring/generated-changes/exclude/templates/exporters/core-dns/servicemonitor.yaml +++ b/packages/rancher-project-monitoring/generated-changes/exclude/templates/exporters/core-dns/servicemonitor.yaml @@ -6,6 +6,9 @@ metadata: namespace: "kube-system" labels: app: {{ template "kube-prometheus-stack.name" . }}-coredns + {{- with .Values.coreDns.serviceMonitor.additionalLabels }} + {{- toYaml . | nindent 4 }} + {{- end }} {{ include "kube-prometheus-stack.labels" . | indent 4 }} spec: jobLabel: jobLabel diff --git a/packages/rancher-project-monitoring/generated-changes/exclude/templates/exporters/kube-api-server/servicemonitor.yaml b/packages/rancher-project-monitoring/generated-changes/exclude/templates/exporters/kube-api-server/servicemonitor.yaml index 21a29cb4..4552e10b 100644 --- a/packages/rancher-project-monitoring/generated-changes/exclude/templates/exporters/kube-api-server/servicemonitor.yaml +++ b/packages/rancher-project-monitoring/generated-changes/exclude/templates/exporters/kube-api-server/servicemonitor.yaml @@ -6,6 +6,9 @@ metadata: namespace: default labels: app: {{ template "kube-prometheus-stack.name" . }}-apiserver + {{- with .Values.kubeApiServer.serviceMonitor.additionalLabels }} + {{- toYaml . | nindent 4 }} + {{- end }} {{ include "kube-prometheus-stack.labels" . | indent 4 }} spec: endpoints: diff --git a/packages/rancher-project-monitoring/generated-changes/exclude/templates/exporters/kube-controller-manager/endpoints.yaml b/packages/rancher-project-monitoring/generated-changes/exclude/templates/exporters/kube-controller-manager/endpoints.yaml index 41319302..eca337da 100644 --- a/packages/rancher-project-monitoring/generated-changes/exclude/templates/exporters/kube-controller-manager/endpoints.yaml +++ b/packages/rancher-project-monitoring/generated-changes/exclude/templates/exporters/kube-controller-manager/endpoints.yaml @@ -7,7 +7,7 @@ metadata: app: {{ template "kube-prometheus-stack.name" . }}-kube-controller-manager k8s-app: kube-controller-manager {{ include "kube-prometheus-stack.labels" . | indent 4 }} - namespace: kube-system + namespace: kube-system subsets: - addresses: {{- range .Values.kubeControllerManager.endpoints }} @@ -15,6 +15,8 @@ subsets: {{- end }} ports: - name: http-metrics - port: {{ .Values.kubeControllerManager.service.port }} + {{- $kubeControllerManagerDefaultInsecurePort := 10252 }} + {{- $kubeControllerManagerDefaultSecurePort := 10257 }} + port: {{ include "kube-prometheus-stack.kubeControllerManager.insecureScrape" (list . $kubeControllerManagerDefaultInsecurePort $kubeControllerManagerDefaultSecurePort .Values.kubeControllerManager.service.port) }} protocol: TCP {{- end }} diff --git a/packages/rancher-project-monitoring/generated-changes/exclude/templates/exporters/kube-controller-manager/service.yaml b/packages/rancher-project-monitoring/generated-changes/exclude/templates/exporters/kube-controller-manager/service.yaml index d55ca2a1..197f0f4f 100644 --- a/packages/rancher-project-monitoring/generated-changes/exclude/templates/exporters/kube-controller-manager/service.yaml +++ b/packages/rancher-project-monitoring/generated-changes/exclude/templates/exporters/kube-controller-manager/service.yaml @@ -12,9 +12,11 @@ spec: clusterIP: None ports: - name: http-metrics - port: {{ .Values.kubeControllerManager.service.port }} + {{- $kubeControllerManagerDefaultInsecurePort := 10252 }} + {{- $kubeControllerManagerDefaultSecurePort := 10257 }} + port: {{ include "kube-prometheus-stack.kubeControllerManager.insecureScrape" (list . $kubeControllerManagerDefaultInsecurePort $kubeControllerManagerDefaultSecurePort .Values.kubeControllerManager.service.port) }} protocol: TCP - targetPort: {{ .Values.kubeControllerManager.service.targetPort }} + targetPort: {{ include "kube-prometheus-stack.kubeControllerManager.insecureScrape" (list . $kubeControllerManagerDefaultInsecurePort $kubeControllerManagerDefaultSecurePort .Values.kubeControllerManager.service.targetPort) }} {{- if .Values.kubeControllerManager.endpoints }}{{- else }} selector: {{- if .Values.kubeControllerManager.service.selector }} diff --git a/packages/rancher-project-monitoring/generated-changes/exclude/templates/exporters/kube-controller-manager/servicemonitor.yaml b/packages/rancher-project-monitoring/generated-changes/exclude/templates/exporters/kube-controller-manager/servicemonitor.yaml index 046fd9f6..12f0d2a7 100644 --- a/packages/rancher-project-monitoring/generated-changes/exclude/templates/exporters/kube-controller-manager/servicemonitor.yaml +++ b/packages/rancher-project-monitoring/generated-changes/exclude/templates/exporters/kube-controller-manager/servicemonitor.yaml @@ -6,6 +6,9 @@ metadata: namespace: "kube-system" labels: app: {{ template "kube-prometheus-stack.name" . }}-kube-controller-manager + {{- with .Values.kubeControllerManager.serviceMonitor.additionalLabels }} + {{- toYaml . | nindent 4 }} + {{- end }} {{ include "kube-prometheus-stack.labels" . | indent 4 }} spec: jobLabel: jobLabel @@ -25,12 +28,12 @@ spec: {{- if .Values.kubeControllerManager.serviceMonitor.proxyUrl }} proxyUrl: {{ .Values.kubeControllerManager.serviceMonitor.proxyUrl}} {{- end }} - {{- if .Values.kubeControllerManager.serviceMonitor.https }} + {{- if eq (include "kube-prometheus-stack.kubeControllerManager.insecureScrape" (list . false true .Values.kubeControllerManager.serviceMonitor.https )) "true" }} scheme: https tlsConfig: caFile: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt - {{- if .Values.kubeControllerManager.serviceMonitor.insecureSkipVerify }} - insecureSkipVerify: {{ .Values.kubeControllerManager.serviceMonitor.insecureSkipVerify }} + {{- if eq (include "kube-prometheus-stack.kubeControllerManager.insecureScrape" (list . nil true .Values.kubeControllerManager.serviceMonitor.insecureSkipVerify)) "true" }} + insecureSkipVerify: true {{- end }} {{- if .Values.kubeControllerManager.serviceMonitor.serverName }} serverName: {{ .Values.kubeControllerManager.serviceMonitor.serverName }} diff --git a/packages/rancher-project-monitoring/generated-changes/exclude/templates/exporters/kube-dns/servicemonitor.yaml b/packages/rancher-project-monitoring/generated-changes/exclude/templates/exporters/kube-dns/servicemonitor.yaml index ee5e562b..b07edb78 100644 --- a/packages/rancher-project-monitoring/generated-changes/exclude/templates/exporters/kube-dns/servicemonitor.yaml +++ b/packages/rancher-project-monitoring/generated-changes/exclude/templates/exporters/kube-dns/servicemonitor.yaml @@ -6,6 +6,9 @@ metadata: namespace: "kube-system" labels: app: {{ template "kube-prometheus-stack.name" . }}-kube-dns + {{- with .Values.kubeDns.serviceMonitor.additionalLabels }} + {{- toYaml . | nindent 4 }} + {{- end }} {{ include "kube-prometheus-stack.labels" . | indent 4 }} spec: jobLabel: jobLabel diff --git a/packages/rancher-project-monitoring/generated-changes/exclude/templates/exporters/kube-etcd/servicemonitor.yaml b/packages/rancher-project-monitoring/generated-changes/exclude/templates/exporters/kube-etcd/servicemonitor.yaml index 2ddac928..8418c007 100644 --- a/packages/rancher-project-monitoring/generated-changes/exclude/templates/exporters/kube-etcd/servicemonitor.yaml +++ b/packages/rancher-project-monitoring/generated-changes/exclude/templates/exporters/kube-etcd/servicemonitor.yaml @@ -6,6 +6,9 @@ metadata: namespace: {{ template "kube-prometheus-stack.namespace" . }} labels: app: {{ template "kube-prometheus-stack.name" . }}-kube-etcd + {{- with .Values.kubeEtcd.serviceMonitor.additionalLabels }} + {{- toYaml . | nindent 4 }} + {{- end }} {{ include "kube-prometheus-stack.labels" . | indent 4 }} spec: jobLabel: jobLabel diff --git a/packages/rancher-project-monitoring/generated-changes/exclude/templates/exporters/kube-proxy/servicemonitor.yaml b/packages/rancher-project-monitoring/generated-changes/exclude/templates/exporters/kube-proxy/servicemonitor.yaml index 28f2a26a..329b37b9 100644 --- a/packages/rancher-project-monitoring/generated-changes/exclude/templates/exporters/kube-proxy/servicemonitor.yaml +++ b/packages/rancher-project-monitoring/generated-changes/exclude/templates/exporters/kube-proxy/servicemonitor.yaml @@ -6,6 +6,9 @@ metadata: namespace: {{ template "kube-prometheus-stack.namespace" . }} labels: app: {{ template "kube-prometheus-stack.name" . }}-kube-proxy + {{- with .Values.kubeProxy.serviceMonitor.additionalLabels }} + {{- toYaml . | nindent 4 }} + {{- end }} {{ include "kube-prometheus-stack.labels" . | indent 4 }} spec: jobLabel: jobLabel diff --git a/packages/rancher-project-monitoring/generated-changes/exclude/templates/exporters/kube-scheduler/endpoints.yaml b/packages/rancher-project-monitoring/generated-changes/exclude/templates/exporters/kube-scheduler/endpoints.yaml index f4ad60fd..84a14ae6 100644 --- a/packages/rancher-project-monitoring/generated-changes/exclude/templates/exporters/kube-scheduler/endpoints.yaml +++ b/packages/rancher-project-monitoring/generated-changes/exclude/templates/exporters/kube-scheduler/endpoints.yaml @@ -15,6 +15,8 @@ subsets: {{- end }} ports: - name: http-metrics - port: {{ .Values.kubeScheduler.service.port }} + {{- $kubeSchedulerDefaultInsecurePort := 10251 }} + {{- $kubeSchedulerDefaultSecurePort := 10259 }} + port: {{ include "kube-prometheus-stack.kubeScheduler.insecureScrape" (list . $kubeSchedulerDefaultInsecurePort $kubeSchedulerDefaultSecurePort .Values.kubeScheduler.service.port) }} protocol: TCP {{- end }} diff --git a/packages/rancher-project-monitoring/generated-changes/exclude/templates/exporters/kube-scheduler/service.yaml b/packages/rancher-project-monitoring/generated-changes/exclude/templates/exporters/kube-scheduler/service.yaml index 7a9c53da..eef9df01 100644 --- a/packages/rancher-project-monitoring/generated-changes/exclude/templates/exporters/kube-scheduler/service.yaml +++ b/packages/rancher-project-monitoring/generated-changes/exclude/templates/exporters/kube-scheduler/service.yaml @@ -12,9 +12,11 @@ spec: clusterIP: None ports: - name: http-metrics - port: {{ .Values.kubeScheduler.service.port}} + {{- $kubeSchedulerDefaultInsecurePort := 10251 }} + {{- $kubeSchedulerDefaultSecurePort := 10259 }} + port: {{ include "kube-prometheus-stack.kubeScheduler.insecureScrape" (list . $kubeSchedulerDefaultInsecurePort $kubeSchedulerDefaultSecurePort .Values.kubeScheduler.service.port) }} protocol: TCP - targetPort: {{ .Values.kubeScheduler.service.targetPort}} + targetPort: {{ include "kube-prometheus-stack.kubeScheduler.insecureScrape" (list . $kubeSchedulerDefaultInsecurePort $kubeSchedulerDefaultSecurePort .Values.kubeScheduler.service.targetPort) }} {{- if .Values.kubeScheduler.endpoints }}{{- else }} selector: {{- if .Values.kubeScheduler.service.selector }} diff --git a/packages/rancher-project-monitoring/generated-changes/exclude/templates/exporters/kube-scheduler/servicemonitor.yaml b/packages/rancher-project-monitoring/generated-changes/exclude/templates/exporters/kube-scheduler/servicemonitor.yaml index e6b54409..6d43bf6f 100644 --- a/packages/rancher-project-monitoring/generated-changes/exclude/templates/exporters/kube-scheduler/servicemonitor.yaml +++ b/packages/rancher-project-monitoring/generated-changes/exclude/templates/exporters/kube-scheduler/servicemonitor.yaml @@ -6,6 +6,9 @@ metadata: namespace: {{ template "kube-prometheus-stack.namespace" . }} labels: app: {{ template "kube-prometheus-stack.name" . }}-kube-scheduler + {{- with .Values.kubeScheduler.serviceMonitor.additionalLabels }} + {{- toYaml . | nindent 4 }} + {{- end }} {{ include "kube-prometheus-stack.labels" . | indent 4 }} spec: jobLabel: jobLabel @@ -25,13 +28,13 @@ spec: {{- if .Values.kubeScheduler.serviceMonitor.proxyUrl }} proxyUrl: {{ .Values.kubeScheduler.serviceMonitor.proxyUrl}} {{- end }} - {{- if .Values.kubeScheduler.serviceMonitor.https }} + {{- if eq (include "kube-prometheus-stack.kubeScheduler.insecureScrape" (list . false true .Values.kubeScheduler.serviceMonitor.https )) "true" }} scheme: https tlsConfig: caFile: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt - {{- if .Values.kubeScheduler.serviceMonitor.insecureSkipVerify }} - insecureSkipVerify: {{ .Values.kubeScheduler.serviceMonitor.insecureSkipVerify }} - {{- end}} + {{- if eq (include "kube-prometheus-stack.kubeScheduler.insecureScrape" (list . nil true .Values.kubeScheduler.serviceMonitor.insecureSkipVerify)) "true" }} + insecureSkipVerify: true + {{- end }} {{- if .Values.kubeScheduler.serviceMonitor.serverName }} serverName: {{ .Values.kubeScheduler.serviceMonitor.serverName }} {{- end}} diff --git a/packages/rancher-project-monitoring/generated-changes/exclude/templates/exporters/kube-state-metrics/serviceMonitor.yaml b/packages/rancher-project-monitoring/generated-changes/exclude/templates/exporters/kube-state-metrics/serviceMonitor.yaml deleted file mode 100644 index dcc64355..00000000 --- a/packages/rancher-project-monitoring/generated-changes/exclude/templates/exporters/kube-state-metrics/serviceMonitor.yaml +++ /dev/null @@ -1,64 +0,0 @@ -{{- if .Values.kubeStateMetrics.enabled }} -{{- if .Values.kubeStateMetrics.serviceMonitor.namespaceOverride }} -{{- fail "kubeStateMetrics.serviceMonitor.namespaceOverride was removed. Please use kube-state-metrics.namespaceOverride instead." }} -{{- end }} -apiVersion: monitoring.coreos.com/v1 -kind: ServiceMonitor -metadata: - name: {{ template "kube-prometheus-stack.fullname" . }}-kube-state-metrics - namespace: {{ template "kube-prometheus-stack-kube-state-metrics.namespace" . }} - labels: - app: {{ template "kube-prometheus-stack.name" . }}-kube-state-metrics -{{ include "kube-prometheus-stack.labels" . | indent 4 }} -spec: - jobLabel: app.kubernetes.io/name - endpoints: - - port: http - {{- if .Values.kubeStateMetrics.serviceMonitor.interval }} - interval: {{ .Values.kubeStateMetrics.serviceMonitor.interval }} - {{- end }} - {{- if .Values.kubeStateMetrics.serviceMonitor.scrapeTimeout }} - scrapeTimeout: {{ .Values.kubeStateMetrics.serviceMonitor.scrapeTimeout }} - {{- end }} - {{- if .Values.kubeStateMetrics.serviceMonitor.proxyUrl }} - proxyUrl: {{ .Values.kubeStateMetrics.serviceMonitor.proxyUrl}} - {{- end }} - honorLabels: {{ .Values.kubeStateMetrics.serviceMonitor.honorLabels }} -{{- if .Values.kubeStateMetrics.serviceMonitor.metricRelabelings }} - metricRelabelings: -{{ tpl (toYaml .Values.kubeStateMetrics.serviceMonitor.metricRelabelings | indent 4) . }} -{{- end }} -{{- if .Values.kubeStateMetrics.serviceMonitor.relabelings }} - relabelings: -{{ tpl (toYaml .Values.kubeStateMetrics.serviceMonitor.relabelings | indent 4) . }} -{{- end }} -{{- if .Values.kubeStateMetrics.serviceMonitor.selfMonitor.enabled }} - - port: metrics - {{- if .Values.kubeStateMetrics.serviceMonitor.interval }} - interval: {{ .Values.kubeStateMetrics.serviceMonitor.interval }} - {{- end }} - {{- if .Values.kubeStateMetrics.serviceMonitor.proxyUrl }} - proxyUrl: {{ .Values.kubeStateMetrics.serviceMonitor.proxyUrl}} - {{- end }} - honorLabels: {{ .Values.kubeStateMetrics.serviceMonitor.honorLabels }} -{{- if .Values.kubeStateMetrics.serviceMonitor.metricRelabelings }} - metricRelabelings: -{{ tpl (toYaml .Values.kubeStateMetrics.serviceMonitor.metricRelabelings | indent 4) . }} -{{- end }} -{{- if .Values.kubeStateMetrics.serviceMonitor.relabelings }} - relabelings: -{{ tpl (toYaml .Values.kubeStateMetrics.serviceMonitor.relabelings | indent 4) . }} -{{- end }} -{{- end }} - namespaceSelector: - matchNames: - - {{ printf "%s" (include "kube-prometheus-stack-kube-state-metrics.namespace" .) | quote }} - selector: - matchLabels: -{{- if .Values.kubeStateMetrics.serviceMonitor.selectorOverride }} -{{ toYaml .Values.kubeStateMetrics.serviceMonitor.selectorOverride | indent 6 }} -{{ else }} - app.kubernetes.io/name: kube-state-metrics - app.kubernetes.io/instance: "{{ $.Release.Name }}" -{{- end }} -{{- end }} diff --git a/packages/rancher-project-monitoring/generated-changes/exclude/templates/exporters/kube-state-metrics/validate.yaml b/packages/rancher-project-monitoring/generated-changes/exclude/templates/exporters/kube-state-metrics/validate.yaml new file mode 100644 index 00000000..9211b3d7 --- /dev/null +++ b/packages/rancher-project-monitoring/generated-changes/exclude/templates/exporters/kube-state-metrics/validate.yaml @@ -0,0 +1,7 @@ +{{- if .Values.kubeStateMetrics.enabled }} +{{- if not (kindIs "invalid" .Values.kubeStateMetrics.serviceMonitor) }} +{{- if .Values.kubeStateMetrics.serviceMonitor.namespaceOverride }} +{{- fail "kubeStateMetrics.serviceMonitor.namespaceOverride was removed. Please use kube-state-metrics.namespaceOverride instead." }} +{{- end }} +{{- end }} +{{- end }} diff --git a/packages/rancher-project-monitoring/generated-changes/exclude/templates/exporters/kubelet/servicemonitor.yaml b/packages/rancher-project-monitoring/generated-changes/exclude/templates/exporters/kubelet/servicemonitor.yaml index 1f15a8e3..7011a76d 100644 --- a/packages/rancher-project-monitoring/generated-changes/exclude/templates/exporters/kubelet/servicemonitor.yaml +++ b/packages/rancher-project-monitoring/generated-changes/exclude/templates/exporters/kubelet/servicemonitor.yaml @@ -9,6 +9,9 @@ metadata: namespace: {{ .Values.kubelet.namespace }} labels: app: {{ template "kube-prometheus-stack.name" . }}-kubelet + {{- with .Values.kubelet.serviceMonitor.additionalLabels }} + {{- toYaml . | nindent 4 }} + {{- end }} {{- include "kube-prometheus-stack.labels" . | indent 4 }} spec: endpoints: @@ -21,6 +24,9 @@ spec: {{- if .Values.kubelet.serviceMonitor.proxyUrl }} proxyUrl: {{ .Values.kubelet.serviceMonitor.proxyUrl }} {{- end }} + {{- if .Values.kubelet.serviceMonitor.scrapeTimeout }} + scrapeTimeout: {{ .Values.kubelet.serviceMonitor.scrapeTimeout }} + {{- end }} tlsConfig: caFile: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt insecureSkipVerify: true @@ -71,6 +77,9 @@ spec: {{- if .Values.kubelet.serviceMonitor.proxyUrl }} proxyUrl: {{ .Values.kubelet.serviceMonitor.proxyUrl }} {{- end }} + {{- if .Values.kubelet.serviceMonitor.scrapeTimeout }} + scrapeTimeout: {{ .Values.kubelet.serviceMonitor.scrapeTimeout }} + {{- end }} honorLabels: true tlsConfig: caFile: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt @@ -95,6 +104,9 @@ spec: {{- if .Values.kubelet.serviceMonitor.proxyUrl }} proxyUrl: {{ .Values.kubelet.serviceMonitor.proxyUrl }} {{- end }} + {{- if .Values.kubelet.serviceMonitor.scrapeTimeout }} + scrapeTimeout: {{ .Values.kubelet.serviceMonitor.scrapeTimeout }} + {{- end }} honorLabels: true tlsConfig: caFile: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt @@ -117,6 +129,9 @@ spec: {{- if .Values.kubelet.serviceMonitor.proxyUrl }} proxyUrl: {{ .Values.kubelet.serviceMonitor.proxyUrl }} {{- end }} + {{- if .Values.kubelet.serviceMonitor.scrapeTimeout }} + scrapeTimeout: {{ .Values.kubelet.serviceMonitor.scrapeTimeout }} + {{- end }} honorLabels: true {{- if .Values.kubelet.serviceMonitor.metricRelabelings }} metricRelabelings: @@ -135,6 +150,9 @@ spec: {{- if .Values.kubelet.serviceMonitor.proxyUrl }} proxyUrl: {{ .Values.kubelet.serviceMonitor.proxyUrl }} {{- end }} + {{- if .Values.kubelet.serviceMonitor.scrapeTimeout }} + scrapeTimeout: {{ .Values.kubelet.serviceMonitor.scrapeTimeout }} + {{- end }} honorLabels: true {{- if .Values.kubelet.serviceMonitor.cAdvisorMetricRelabelings }} metricRelabelings: @@ -144,6 +162,28 @@ spec: relabelings: {{ tpl (toYaml .Values.kubelet.serviceMonitor.cAdvisorRelabelings | indent 4) . }} {{- end }} +{{- if .Values.kubelet.serviceMonitor.probes }} + - port: http-metrics + path: /metrics/probes + {{- if .Values.kubelet.serviceMonitor.interval }} + interval: {{ .Values.kubelet.serviceMonitor.interval }} + {{- end }} + {{- if .Values.kubelet.serviceMonitor.proxyUrl }} + proxyUrl: {{ .Values.kubelet.serviceMonitor.proxyUrl }} + {{- end }} + {{- if .Values.kubelet.serviceMonitor.scrapeTimeout }} + scrapeTimeout: {{ .Values.kubelet.serviceMonitor.scrapeTimeout }} + {{- end }} + honorLabels: true +{{- if .Values.kubelet.serviceMonitor.probesMetricRelabelings }} + metricRelabelings: +{{ tpl (toYaml .Values.kubelet.serviceMonitor.probesMetricRelabelings | indent 4) . }} +{{- end }} +{{- if .Values.kubelet.serviceMonitor.probesRelabelings }} + relabelings: +{{ tpl (toYaml .Values.kubelet.serviceMonitor.probesRelabelings | indent 4) . }} +{{- end }} +{{- end }} {{- if .Values.kubelet.serviceMonitor.resource }} - port: http-metrics path: {{ include "kubelet.serviceMonitor.resourcePath" . }} @@ -153,6 +193,9 @@ spec: {{- if .Values.kubelet.serviceMonitor.proxyUrl }} proxyUrl: {{ .Values.kubelet.serviceMonitor.proxyUrl }} {{- end }} + {{- if .Values.kubelet.serviceMonitor.scrapeTimeout }} + scrapeTimeout: {{ .Values.kubelet.serviceMonitor.scrapeTimeout }} + {{- end }} honorLabels: true {{- if .Values.kubelet.serviceMonitor.resourceMetricRelabelings }} metricRelabelings: diff --git a/packages/rancher-project-monitoring/generated-changes/exclude/templates/exporters/node-exporter/servicemonitor.yaml b/packages/rancher-project-monitoring/generated-changes/exclude/templates/exporters/node-exporter/servicemonitor.yaml deleted file mode 100644 index 6041a110..00000000 --- a/packages/rancher-project-monitoring/generated-changes/exclude/templates/exporters/node-exporter/servicemonitor.yaml +++ /dev/null @@ -1,41 +0,0 @@ -{{- if (and (not .Values.nodeExporter.enabled) .Values.hardenedNodeExporter.enabled) }} -{{ required "Cannot set .Values.hardenedNodeExporter.enabled=true when .Values.nodeExporter.enabled=false" "" }} -{{- end }} -{{- if (and .Values.nodeExporter.enabled (not .Values.hardenedNodeExporter.enabled)) }} -apiVersion: monitoring.coreos.com/v1 -kind: ServiceMonitor -metadata: - name: {{ template "kube-prometheus-stack.fullname" . }}-node-exporter - namespace: {{ template "kube-prometheus-stack-prometheus-node-exporter.namespace" . }} - labels: - app: {{ template "kube-prometheus-stack.name" . }}-node-exporter -{{ include "kube-prometheus-stack.labels" . | indent 4 }} -spec: - jobLabel: {{ .Values.nodeExporter.jobLabel }} - selector: - matchLabels: - app: prometheus-node-exporter - release: {{ $.Release.Name }} - namespaceSelector: - matchNames: - - {{ printf "%s" (include "kube-prometheus-stack-prometheus-node-exporter.namespace" .) | quote }} - endpoints: - - port: metrics - {{- if .Values.nodeExporter.serviceMonitor.interval }} - interval: {{ .Values.nodeExporter.serviceMonitor.interval }} - {{- end }} - {{- if .Values.nodeExporter.serviceMonitor.proxyUrl }} - proxyUrl: {{ .Values.nodeExporter.serviceMonitor.proxyUrl}} - {{- end }} - {{- if .Values.nodeExporter.serviceMonitor.scrapeTimeout }} - scrapeTimeout: {{ .Values.nodeExporter.serviceMonitor.scrapeTimeout }} - {{- end }} -{{- if .Values.nodeExporter.serviceMonitor.metricRelabelings }} - metricRelabelings: -{{ tpl (toYaml .Values.nodeExporter.serviceMonitor.metricRelabelings | indent 4) . }} -{{- end }} -{{- if .Values.nodeExporter.serviceMonitor.relabelings }} - relabelings: -{{ tpl (toYaml .Values.nodeExporter.serviceMonitor.relabelings | indent 4) . }} -{{- end }} -{{- end }} diff --git a/packages/rancher-project-monitoring/generated-changes/exclude/templates/exporters/node-exporter/validate.yaml b/packages/rancher-project-monitoring/generated-changes/exclude/templates/exporters/node-exporter/validate.yaml new file mode 100644 index 00000000..bdc73d61 --- /dev/null +++ b/packages/rancher-project-monitoring/generated-changes/exclude/templates/exporters/node-exporter/validate.yaml @@ -0,0 +1,3 @@ +{{- if (and (not .Values.nodeExporter.enabled) .Values.hardenedNodeExporter.enabled) }} +{{ required "Cannot set .Values.hardenedNodeExporter.enabled=true when .Values.nodeExporter.enabled=false" "" }} +{{- end }} diff --git a/packages/rancher-project-monitoring/generated-changes/exclude/templates/grafana/dashboards-1.14/apiserver.yaml b/packages/rancher-project-monitoring/generated-changes/exclude/templates/grafana/dashboards-1.14/apiserver.yaml index f7d9871d..d4cf09f1 100644 --- a/packages/rancher-project-monitoring/generated-changes/exclude/templates/grafana/dashboards-1.14/apiserver.yaml +++ b/packages/rancher-project-monitoring/generated-changes/exclude/templates/grafana/dashboards-1.14/apiserver.yaml @@ -14,7 +14,7 @@ metadata: {{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} labels: {{- if $.Values.grafana.sidecar.dashboards.label }} - {{ $.Values.grafana.sidecar.dashboards.label }}: "1" + {{ $.Values.grafana.sidecar.dashboards.label }}: {{ ternary $.Values.grafana.sidecar.dashboards.labelValue "1" (not (empty $.Values.grafana.sidecar.dashboards.labelValue)) | quote }} {{- end }} app: {{ template "kube-prometheus-stack.name" $ }}-grafana {{ include "kube-prometheus-stack.labels" $ | indent 4 }} @@ -88,7 +88,11 @@ data: }, "id": 3, - "interval": null, + "interval": "1m", + "legend": { + "alignAsTable": true, + "rightSide": true + }, "links": [ ], @@ -166,13 +170,14 @@ data: }, "id": 4, + "interval": "1m", "legend": { - "alignAsTable": false, + "alignAsTable": true, "avg": false, "current": false, "max": false, "min": false, - "rightSide": false, + "rightSide": true, "show": true, "sideWidth": null, "total": false, @@ -284,7 +289,11 @@ data: }, "id": 5, - "interval": null, + "interval": "1m", + "legend": { + "alignAsTable": true, + "rightSide": true + }, "links": [ ], @@ -361,13 +370,14 @@ data: }, "id": 6, + "interval": "1m", "legend": { - "alignAsTable": false, + "alignAsTable": true, "avg": false, "current": false, "max": false, "min": false, - "rightSide": false, + "rightSide": true, "show": true, "sideWidth": null, "total": false, @@ -470,13 +480,14 @@ data: }, "id": 7, + "interval": "1m", "legend": { - "alignAsTable": false, + "alignAsTable": true, "avg": false, "current": false, "max": false, "min": false, - "rightSide": false, + "rightSide": true, "show": true, "sideWidth": null, "total": false, @@ -564,13 +575,14 @@ data: }, "id": 8, + "interval": "1m", "legend": { - "alignAsTable": false, + "alignAsTable": true, "avg": false, "current": false, "max": false, "min": false, - "rightSide": false, + "rightSide": true, "show": true, "sideWidth": null, "total": false, @@ -596,7 +608,7 @@ data: "steppedLine": false, "targets": [ { - "expr": "cluster_quantile:apiserver_request_duration_seconds:histogram_quantile{verb=\"read\", cluster=\"$cluster\"}", + "expr": "cluster_quantile:apiserver_request{{ if (semverCompare ">=1.23.0-0" $kubeTargetVersion) }}_slo{{ end }}_duration_seconds:histogram_quantile{verb=\"read\", cluster=\"$cluster\"}", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}} resource {{`}}`}}", @@ -680,7 +692,11 @@ data: }, "id": 9, - "interval": null, + "interval": "1m", + "legend": { + "alignAsTable": true, + "rightSide": true + }, "links": [ ], @@ -757,13 +773,14 @@ data: }, "id": 10, + "interval": "1m", "legend": { - "alignAsTable": false, + "alignAsTable": true, "avg": false, "current": false, "max": false, "min": false, - "rightSide": false, + "rightSide": true, "show": true, "sideWidth": null, "total": false, @@ -866,13 +883,14 @@ data: }, "id": 11, + "interval": "1m", "legend": { - "alignAsTable": false, + "alignAsTable": true, "avg": false, "current": false, "max": false, "min": false, - "rightSide": false, + "rightSide": true, "show": true, "sideWidth": null, "total": false, @@ -960,13 +978,14 @@ data: }, "id": 12, + "interval": "1m", "legend": { - "alignAsTable": false, + "alignAsTable": true, "avg": false, "current": false, "max": false, "min": false, - "rightSide": false, + "rightSide": true, "show": true, "sideWidth": null, "total": false, @@ -992,7 +1011,7 @@ data: "steppedLine": false, "targets": [ { - "expr": "cluster_quantile:apiserver_request_duration_seconds:histogram_quantile{verb=\"write\", cluster=\"$cluster\"}", + "expr": "cluster_quantile:apiserver_request{{ if (semverCompare ">=1.23.0-0" $kubeTargetVersion) }}_slo{{ end }}_duration_seconds:histogram_quantile{verb=\"write\", cluster=\"$cluster\"}", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}} resource {{`}}`}}", @@ -1066,13 +1085,14 @@ data: }, "id": 13, + "interval": "1m", "legend": { - "alignAsTable": false, + "alignAsTable": true, "avg": false, "current": false, "max": false, "min": false, - "rightSide": false, + "rightSide": true, "show": false, "sideWidth": null, "total": false, @@ -1098,7 +1118,7 @@ data: "steppedLine": false, "targets": [ { - "expr": "sum(rate(workqueue_adds_total{job=\"apiserver\", instance=~\"$instance\", cluster=\"$cluster\"}[5m])) by (instance, name)", + "expr": "sum(rate(workqueue_adds_total{job=\"apiserver\", instance=~\"$instance\", cluster=\"$cluster\"}[$__rate_interval])) by (instance, name)", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}instance{{`}}`}} {{`{{`}}name{{`}}`}}", @@ -1159,13 +1179,14 @@ data: }, "id": 14, + "interval": "1m", "legend": { - "alignAsTable": false, + "alignAsTable": true, "avg": false, "current": false, "max": false, "min": false, - "rightSide": false, + "rightSide": true, "show": false, "sideWidth": null, "total": false, @@ -1191,7 +1212,7 @@ data: "steppedLine": false, "targets": [ { - "expr": "sum(rate(workqueue_depth{job=\"apiserver\", instance=~\"$instance\", cluster=\"$cluster\"}[5m])) by (instance, name)", + "expr": "sum(rate(workqueue_depth{job=\"apiserver\", instance=~\"$instance\", cluster=\"$cluster\"}[$__rate_interval])) by (instance, name)", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}instance{{`}}`}} {{`{{`}}name{{`}}`}}", @@ -1252,6 +1273,7 @@ data: }, "id": 15, + "interval": "1m", "legend": { "alignAsTable": true, "avg": false, @@ -1284,7 +1306,7 @@ data: "steppedLine": false, "targets": [ { - "expr": "histogram_quantile(0.99, sum(rate(workqueue_queue_duration_seconds_bucket{job=\"apiserver\", instance=~\"$instance\", cluster=\"$cluster\"}[5m])) by (instance, name, le))", + "expr": "histogram_quantile(0.99, sum(rate(workqueue_queue_duration_seconds_bucket{job=\"apiserver\", instance=~\"$instance\", cluster=\"$cluster\"}[$__rate_interval])) by (instance, name, le))", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}instance{{`}}`}} {{`{{`}}name{{`}}`}}", @@ -1358,13 +1380,14 @@ data: }, "id": 16, + "interval": "1m", "legend": { - "alignAsTable": false, + "alignAsTable": true, "avg": false, "current": false, "max": false, "min": false, - "rightSide": false, + "rightSide": true, "show": true, "sideWidth": null, "total": false, @@ -1451,13 +1474,14 @@ data: }, "id": 17, + "interval": "1m", "legend": { - "alignAsTable": false, + "alignAsTable": true, "avg": false, "current": false, "max": false, "min": false, - "rightSide": false, + "rightSide": true, "show": true, "sideWidth": null, "total": false, @@ -1483,7 +1507,7 @@ data: "steppedLine": false, "targets": [ { - "expr": "rate(process_cpu_seconds_total{job=\"apiserver\",instance=~\"$instance\", cluster=\"$cluster\"}[5m])", + "expr": "rate(process_cpu_seconds_total{job=\"apiserver\",instance=~\"$instance\", cluster=\"$cluster\"}[$__rate_interval])", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}instance{{`}}`}}", @@ -1544,13 +1568,14 @@ data: }, "id": 18, + "interval": "1m", "legend": { - "alignAsTable": false, + "alignAsTable": true, "avg": false, "current": false, "max": false, "min": false, - "rightSide": false, + "rightSide": true, "show": true, "sideWidth": null, "total": false, @@ -1642,11 +1667,11 @@ data: "list": [ { "current": { - "text": "default", - "value": "default" + "text": "Prometheus", + "value": "Prometheus" }, "hide": 0, - "label": null, + "label": "Data Source", "name": "datasource", "options": [ @@ -1670,7 +1695,7 @@ data: "options": [ ], - "query": "label_values(apiserver_request_total, cluster)", + "query": "label_values(up{job=\"apiserver\"}, cluster)", "refresh": 2, "regex": "", "sort": 1, @@ -1696,7 +1721,7 @@ data: "options": [ ], - "query": "label_values(apiserver_request_total{job=\"apiserver\", cluster=\"$cluster\"}, instance)", + "query": "label_values(up{job=\"apiserver\", cluster=\"$cluster\"}, instance)", "refresh": 2, "regex": "", "sort": 1, diff --git a/packages/rancher-project-monitoring/generated-changes/exclude/templates/grafana/dashboards-1.14/controller-manager.yaml b/packages/rancher-project-monitoring/generated-changes/exclude/templates/grafana/dashboards-1.14/controller-manager.yaml index 2cf8e352..c1946dd8 100644 --- a/packages/rancher-project-monitoring/generated-changes/exclude/templates/grafana/dashboards-1.14/controller-manager.yaml +++ b/packages/rancher-project-monitoring/generated-changes/exclude/templates/grafana/dashboards-1.14/controller-manager.yaml @@ -15,7 +15,7 @@ metadata: {{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} labels: {{- if $.Values.grafana.sidecar.dashboards.label }} - {{ $.Values.grafana.sidecar.dashboards.label }}: "1" + {{ $.Values.grafana.sidecar.dashboards.label }}: {{ ternary $.Values.grafana.sidecar.dashboards.labelValue "1" (not (empty $.Values.grafana.sidecar.dashboards.labelValue)) | quote }} {{- end }} app: {{ template "kube-prometheus-stack.name" $ }}-grafana {{ include "kube-prometheus-stack.labels" $ | indent 4 }} @@ -69,7 +69,11 @@ data: }, "id": 2, - "interval": null, + "interval": "1m", + "legend": { + "alignAsTable": true, + "rightSide": true + }, "links": [ ], @@ -149,6 +153,7 @@ data: }, "id": 3, + "interval": "1m", "legend": { "alignAsTable": true, "avg": false, @@ -181,7 +186,7 @@ data: "steppedLine": false, "targets": [ { - "expr": "sum(rate(workqueue_adds_total{cluster=\"$cluster\", job=\"{{ include "exporter.kubeControllerManager.jobName" . }}\", instance=~\"$instance\"}[5m])) by (cluster, instance, name)", + "expr": "sum(rate(workqueue_adds_total{cluster=\"$cluster\", job=\"{{ include "exporter.kubeControllerManager.jobName" . }}\", instance=~\"$instance\"}[$__rate_interval])) by (cluster, instance, name)", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}cluster{{`}}`}} {{`{{`}}instance{{`}}`}} {{`{{`}}name{{`}}`}}", @@ -255,6 +260,7 @@ data: }, "id": 4, + "interval": "1m", "legend": { "alignAsTable": true, "avg": false, @@ -287,7 +293,7 @@ data: "steppedLine": false, "targets": [ { - "expr": "sum(rate(workqueue_depth{cluster=\"$cluster\", job=\"{{ include "exporter.kubeControllerManager.jobName" . }}\", instance=~\"$instance\"}[5m])) by (cluster, instance, name)", + "expr": "sum(rate(workqueue_depth{cluster=\"$cluster\", job=\"{{ include "exporter.kubeControllerManager.jobName" . }}\", instance=~\"$instance\"}[$__rate_interval])) by (cluster, instance, name)", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}cluster{{`}}`}} {{`{{`}}instance{{`}}`}} {{`{{`}}name{{`}}`}}", @@ -361,6 +367,7 @@ data: }, "id": 5, + "interval": "1m", "legend": { "alignAsTable": true, "avg": false, @@ -393,7 +400,7 @@ data: "steppedLine": false, "targets": [ { - "expr": "histogram_quantile(0.99, sum(rate(workqueue_queue_duration_seconds_bucket{cluster=\"$cluster\", job=\"{{ include "exporter.kubeControllerManager.jobName" . }}\", instance=~\"$instance\"}[5m])) by (cluster, instance, name, le))", + "expr": "histogram_quantile(0.99, sum(rate(workqueue_queue_duration_seconds_bucket{cluster=\"$cluster\", job=\"{{ include "exporter.kubeControllerManager.jobName" . }}\", instance=~\"$instance\"}[$__rate_interval])) by (cluster, instance, name, le))", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}cluster{{`}}`}} {{`{{`}}instance{{`}}`}} {{`{{`}}name{{`}}`}}", @@ -467,13 +474,14 @@ data: }, "id": 6, + "interval": "1m", "legend": { - "alignAsTable": false, + "alignAsTable": true, "avg": false, "current": false, "max": false, "min": false, - "rightSide": false, + "rightSide": true, "show": true, "sideWidth": null, "total": false, @@ -499,28 +507,28 @@ data: "steppedLine": false, "targets": [ { - "expr": "sum(rate(rest_client_requests_total{job=\"{{ include "exporter.kubeControllerManager.jobName" . }}\", instance=~\"$instance\",code=~\"2..\"}[5m]))", + "expr": "sum(rate(rest_client_requests_total{job=\"{{ include "exporter.kubeControllerManager.jobName" . }}\", instance=~\"$instance\",code=~\"2..\"}[$__rate_interval]))", "format": "time_series", "intervalFactor": 2, "legendFormat": "2xx", "refId": "A" }, { - "expr": "sum(rate(rest_client_requests_total{job=\"{{ include "exporter.kubeControllerManager.jobName" . }}\", instance=~\"$instance\",code=~\"3..\"}[5m]))", + "expr": "sum(rate(rest_client_requests_total{job=\"{{ include "exporter.kubeControllerManager.jobName" . }}\", instance=~\"$instance\",code=~\"3..\"}[$__rate_interval]))", "format": "time_series", "intervalFactor": 2, "legendFormat": "3xx", "refId": "B" }, { - "expr": "sum(rate(rest_client_requests_total{job=\"{{ include "exporter.kubeControllerManager.jobName" . }}\", instance=~\"$instance\",code=~\"4..\"}[5m]))", + "expr": "sum(rate(rest_client_requests_total{job=\"{{ include "exporter.kubeControllerManager.jobName" . }}\", instance=~\"$instance\",code=~\"4..\"}[$__rate_interval]))", "format": "time_series", "intervalFactor": 2, "legendFormat": "4xx", "refId": "C" }, { - "expr": "sum(rate(rest_client_requests_total{job=\"{{ include "exporter.kubeControllerManager.jobName" . }}\", instance=~\"$instance\",code=~\"5..\"}[5m]))", + "expr": "sum(rate(rest_client_requests_total{job=\"{{ include "exporter.kubeControllerManager.jobName" . }}\", instance=~\"$instance\",code=~\"5..\"}[$__rate_interval]))", "format": "time_series", "intervalFactor": 2, "legendFormat": "5xx", @@ -581,13 +589,14 @@ data: }, "id": 7, + "interval": "1m", "legend": { - "alignAsTable": false, + "alignAsTable": true, "avg": false, "current": false, "max": false, "min": false, - "rightSide": false, + "rightSide": true, "show": true, "sideWidth": null, "total": false, @@ -613,7 +622,7 @@ data: "steppedLine": false, "targets": [ { - "expr": "histogram_quantile(0.99, sum(rate(rest_client_request_duration_seconds_bucket{cluster=\"$cluster\", job=\"{{ include "exporter.kubeControllerManager.jobName" . }}\", instance=~\"$instance\", verb=\"POST\"}[5m])) by (verb, url, le))", + "expr": "histogram_quantile(0.99, sum(rate(rest_client_request_duration_seconds_bucket{cluster=\"$cluster\", job=\"{{ include "exporter.kubeControllerManager.jobName" . }}\", instance=~\"$instance\", verb=\"POST\"}[$__rate_interval])) by (verb, url, le))", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}verb{{`}}`}} {{`{{`}}url{{`}}`}}", @@ -687,6 +696,7 @@ data: }, "id": 8, + "interval": "1m", "legend": { "alignAsTable": true, "avg": false, @@ -719,7 +729,7 @@ data: "steppedLine": false, "targets": [ { - "expr": "histogram_quantile(0.99, sum(rate(rest_client_request_duration_seconds_bucket{cluster=\"$cluster\", job=\"{{ include "exporter.kubeControllerManager.jobName" . }}\", instance=~\"$instance\", verb=\"GET\"}[5m])) by (verb, url, le))", + "expr": "histogram_quantile(0.99, sum(rate(rest_client_request_duration_seconds_bucket{cluster=\"$cluster\", job=\"{{ include "exporter.kubeControllerManager.jobName" . }}\", instance=~\"$instance\", verb=\"GET\"}[$__rate_interval])) by (verb, url, le))", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}verb{{`}}`}} {{`{{`}}url{{`}}`}}", @@ -793,13 +803,14 @@ data: }, "id": 9, + "interval": "1m", "legend": { - "alignAsTable": false, + "alignAsTable": true, "avg": false, "current": false, "max": false, "min": false, - "rightSide": false, + "rightSide": true, "show": true, "sideWidth": null, "total": false, @@ -886,13 +897,14 @@ data: }, "id": 10, + "interval": "1m", "legend": { - "alignAsTable": false, + "alignAsTable": true, "avg": false, "current": false, "max": false, "min": false, - "rightSide": false, + "rightSide": true, "show": true, "sideWidth": null, "total": false, @@ -918,7 +930,7 @@ data: "steppedLine": false, "targets": [ { - "expr": "rate(process_cpu_seconds_total{cluster=\"$cluster\", job=\"{{ include "exporter.kubeControllerManager.jobName" . }}\",instance=~\"$instance\"}[5m])", + "expr": "rate(process_cpu_seconds_total{cluster=\"$cluster\", job=\"{{ include "exporter.kubeControllerManager.jobName" . }}\",instance=~\"$instance\"}[$__rate_interval])", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}instance{{`}}`}}", @@ -979,13 +991,14 @@ data: }, "id": 11, + "interval": "1m", "legend": { - "alignAsTable": false, + "alignAsTable": true, "avg": false, "current": false, "max": false, "min": false, - "rightSide": false, + "rightSide": true, "show": true, "sideWidth": null, "total": false, @@ -1077,11 +1090,11 @@ data: "list": [ { "current": { - "text": "default", - "value": "default" + "text": "Prometheus", + "value": "Prometheus" }, "hide": 0, - "label": null, + "label": "Data Source", "name": "datasource", "options": [ diff --git a/packages/rancher-project-monitoring/generated-changes/exclude/templates/grafana/dashboards-1.14/etcd.yaml b/packages/rancher-project-monitoring/generated-changes/exclude/templates/grafana/dashboards-1.14/etcd.yaml index 0a5422d0..3956638c 100644 --- a/packages/rancher-project-monitoring/generated-changes/exclude/templates/grafana/dashboards-1.14/etcd.yaml +++ b/packages/rancher-project-monitoring/generated-changes/exclude/templates/grafana/dashboards-1.14/etcd.yaml @@ -1,5 +1,5 @@ {{- /* -Generated from 'etcd' from https://raw.githubusercontent.com/etcd-io/website/master/content/en/docs/v3.4/op-guide/grafana.json +Generated from 'etcd' from https://raw.githubusercontent.com/etcd-io/etcd/main/contrib/mixin/mixin.libsonnet Do not change in-place! In order to change this file first read following link: https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack */ -}} @@ -15,7 +15,7 @@ metadata: {{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} labels: {{- if $.Values.grafana.sidecar.dashboards.label }} - {{ $.Values.grafana.sidecar.dashboards.label }}: "1" + {{ $.Values.grafana.sidecar.dashboards.label }}: {{ ternary $.Values.grafana.sidecar.dashboards.labelValue "1" (not (empty $.Values.grafana.sidecar.dashboards.labelValue)) | quote }} {{- end }} app: {{ template "kube-prometheus-stack.name" $ }}-grafana {{ include "kube-prometheus-stack.labels" $ | indent 4 }} @@ -29,7 +29,6 @@ data: "editable": true, "gnetId": null, "hideControls": false, - "id": 6, "links": [], "refresh": "10s", "rows": [ @@ -149,7 +148,7 @@ data: "steppedLine": false, "targets": [ { - "expr": "sum(rate(grpc_server_started_total{job=\"$cluster\",grpc_type=\"unary\"}[5m]))", + "expr": "sum(rate(grpc_server_started_total{job=\"$cluster\",grpc_type=\"unary\"}[$__rate_interval]))", "format": "time_series", "intervalFactor": 2, "legendFormat": "RPC Rate", @@ -158,7 +157,7 @@ data: "step": 2 }, { - "expr": "sum(rate(grpc_server_handled_total{job=\"$cluster\",grpc_type=\"unary\",grpc_code!=\"OK\"}[5m]))", + "expr": "sum(rate(grpc_server_handled_total{job=\"$cluster\",grpc_type=\"unary\",grpc_code=~\"Unknown|FailedPrecondition|ResourceExhausted|Internal|Unavailable|DataLoss|DeadlineExceeded\"}[$__rate_interval]))", "format": "time_series", "intervalFactor": 2, "legendFormat": "RPC Failed Rate", @@ -405,7 +404,7 @@ data: "steppedLine": true, "targets": [ { - "expr": "histogram_quantile(0.99, sum(rate(etcd_disk_wal_fsync_duration_seconds_bucket{job=\"$cluster\"}[5m])) by (instance, le))", + "expr": "histogram_quantile(0.99, sum(rate(etcd_disk_wal_fsync_duration_seconds_bucket{job=\"$cluster\"}[$__rate_interval])) by (instance, le))", "hide": false, "intervalFactor": 2, "legendFormat": "{{`{{`}}instance{{`}}`}} WAL fsync", @@ -414,7 +413,7 @@ data: "step": 4 }, { - "expr": "histogram_quantile(0.99, sum(rate(etcd_disk_backend_commit_duration_seconds_bucket{job=\"$cluster\"}[5m])) by (instance, le))", + "expr": "histogram_quantile(0.99, sum(rate(etcd_disk_backend_commit_duration_seconds_bucket{job=\"$cluster\"}[$__rate_interval])) by (instance, le))", "intervalFactor": 2, "legendFormat": "{{`{{`}}instance{{`}}`}} DB fsync", "metric": "etcd_disk_backend_commit_duration_seconds_bucket", @@ -572,7 +571,7 @@ data: "steppedLine": false, "targets": [ { - "expr": "rate(etcd_network_client_grpc_received_bytes_total{job=\"$cluster\"}[5m])", + "expr": "rate(etcd_network_client_grpc_received_bytes_total{job=\"$cluster\"}[$__rate_interval])", "intervalFactor": 2, "legendFormat": "{{`{{`}}instance{{`}}`}} Client Traffic In", "metric": "etcd_network_client_grpc_received_bytes_total", @@ -648,7 +647,7 @@ data: "steppedLine": false, "targets": [ { - "expr": "rate(etcd_network_client_grpc_sent_bytes_total{job=\"$cluster\"}[5m])", + "expr": "rate(etcd_network_client_grpc_sent_bytes_total{job=\"$cluster\"}[$__rate_interval])", "intervalFactor": 2, "legendFormat": "{{`{{`}}instance{{`}}`}} Client Traffic Out", "metric": "etcd_network_client_grpc_sent_bytes_total", @@ -724,7 +723,7 @@ data: "steppedLine": false, "targets": [ { - "expr": "sum(rate(etcd_network_peer_received_bytes_total{job=\"$cluster\"}[5m])) by (instance)", + "expr": "sum(rate(etcd_network_peer_received_bytes_total{job=\"$cluster\"}[$__rate_interval])) by (instance)", "intervalFactor": 2, "legendFormat": "{{`{{`}}instance{{`}}`}} Peer Traffic In", "metric": "etcd_network_peer_received_bytes_total", @@ -801,7 +800,7 @@ data: "steppedLine": false, "targets": [ { - "expr": "sum(rate(etcd_network_peer_sent_bytes_total{job=\"$cluster\"}[5m])) by (instance)", + "expr": "sum(rate(etcd_network_peer_sent_bytes_total{job=\"$cluster\"}[$__rate_interval])) by (instance)", "hide": false, "interval": "", "intervalFactor": 2, @@ -885,7 +884,7 @@ data: "steppedLine": false, "targets": [ { - "expr": "sum(rate(etcd_server_proposals_failed_total{job=\"$cluster\"}[5m]))", + "expr": "sum(rate(etcd_server_proposals_failed_total{job=\"$cluster\"}[$__rate_interval]))", "intervalFactor": 2, "legendFormat": "Proposal Failure Rate", "metric": "etcd_server_proposals_failed_total", @@ -901,7 +900,7 @@ data: "step": 2 }, { - "expr": "sum(rate(etcd_server_proposals_committed_total{job=\"$cluster\"}[5m]))", + "expr": "sum(rate(etcd_server_proposals_committed_total{job=\"$cluster\"}[$__rate_interval]))", "intervalFactor": 2, "legendFormat": "Proposal Commit Rate", "metric": "etcd_server_proposals_committed_total", @@ -909,7 +908,7 @@ data: "step": 2 }, { - "expr": "sum(rate(etcd_server_proposals_applied_total{job=\"$cluster\"}[5m]))", + "expr": "sum(rate(etcd_server_proposals_applied_total{job=\"$cluster\"}[$__rate_interval]))", "intervalFactor": 2, "legendFormat": "Proposal Apply Rate", "refId": "D", @@ -1030,6 +1029,115 @@ data: "show": true } ] + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "decimals": 0, + "editable": true, + "error": false, + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "fill": 0, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 28 + }, + "hiddenSeries": false, + "id": 42, + "isNew": true, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": false, + "show": false, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.4.3", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "histogram_quantile(0.99, sum by (instance, le) (rate(etcd_network_peer_round_trip_time_seconds_bucket{job=\"$cluster\"}[$__rate_interval])))", + "interval": "", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}instance{{`}}`}} Peer round trip time", + "metric": "etcd_network_peer_round_trip_time_seconds_bucket", + "refId": "A", + "step": 2 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Peer round trip time", + "tooltip": { + "msResolution": false, + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:925", + "decimals": null, + "format": "s", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "$$hashKey": "object:926", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } } ], "title": "New row" @@ -1038,7 +1146,9 @@ data: "schemaVersion": 13, "sharedCrosshair": false, "style": "dark", - "tags": [], + "tags": [ + "etcd-mixin" + ], "templating": { "list": [ { @@ -1047,7 +1157,7 @@ data: "value": "Prometheus" }, "hide": 0, - "label": null, + "label": "Data Source", "name": "datasource", "options": [], "query": "prometheus", @@ -1069,7 +1179,7 @@ data: "name": "cluster", "options": [], "query": "label_values(etcd_server_has_leader, job)", - "refresh": 1, + "refresh": 2, "regex": "", "sort": 2, "tagValuesQuery": "", @@ -1112,6 +1222,7 @@ data: }, "timezone": "{{ .Values.grafana.defaultDashboardsTimezone }}", "title": "etcd", + "uid": "c2f4e12cdf69feb95caa41a5a1b423d9", "version": 215 } {{- end }} diff --git a/packages/rancher-project-monitoring/generated-changes/exclude/templates/grafana/dashboards-1.14/k8s-coredns.yaml b/packages/rancher-project-monitoring/generated-changes/exclude/templates/grafana/dashboards-1.14/k8s-coredns.yaml index 4ba8768f..5d5840e0 100644 --- a/packages/rancher-project-monitoring/generated-changes/exclude/templates/grafana/dashboards-1.14/k8s-coredns.yaml +++ b/packages/rancher-project-monitoring/generated-changes/exclude/templates/grafana/dashboards-1.14/k8s-coredns.yaml @@ -10,7 +10,7 @@ metadata: {{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} labels: {{- if $.Values.grafana.sidecar.dashboards.label }} - {{ $.Values.grafana.sidecar.dashboards.label }}: "1" + {{ $.Values.grafana.sidecar.dashboards.label }}: {{ ternary $.Values.grafana.sidecar.dashboards.labelValue "1" (not (empty $.Values.grafana.sidecar.dashboards.labelValue)) | quote }} {{- end }} app: {{ template "kube-prometheus-stack.name" $ }}-grafana {{ include "kube-prometheus-stack.labels" $ | indent 4 }} @@ -118,7 +118,7 @@ data: "steppedLine": false, "targets": [ { - "expr": "sum(rate(coredns_dns_request_count_total{instance=~\"$instance\"}[5m])) by (proto) or\nsum(rate(coredns_dns_requests_total{instance=~\"$instance\"}[5m])) by (proto)", + "expr": "sum(rate(coredns_dns_request_count_total{job=\"coredns\",instance=~\"$instance\"}[5m])) by (proto) or\nsum(rate(coredns_dns_requests_total{job=\"coredns\",instance=~\"$instance\"}[5m])) by (proto)", "format": "time_series", "interval": "", "intervalFactor": 2, @@ -228,7 +228,7 @@ data: "steppedLine": false, "targets": [ { - "expr": "sum(rate(coredns_dns_request_type_count_total{instance=~\"$instance\"}[5m])) by (type) or \nsum(rate(coredns_dns_requests_total{instance=~\"$instance\"}[5m])) by (type)", + "expr": "sum(rate(coredns_dns_request_type_count_total{job=\"coredns\",instance=~\"$instance\"}[5m])) by (type) or \nsum(rate(coredns_dns_requests_total{job=\"coredns\",instance=~\"$instance\"}[5m])) by (type)", "interval": "", "intervalFactor": 2, "legendFormat": "{{"{{type}}"}}", @@ -333,7 +333,7 @@ data: "steppedLine": false, "targets": [ { - "expr": "sum(rate(coredns_dns_request_count_total{instance=~\"$instance\"}[5m])) by (zone) or\nsum(rate(coredns_dns_requests_total{instance=~\"$instance\"}[5m])) by (zone)", + "expr": "sum(rate(coredns_dns_request_count_total{job=\"coredns\",instance=~\"$instance\"}[5m])) by (zone) or\nsum(rate(coredns_dns_requests_total{job=\"coredns\",instance=~\"$instance\"}[5m])) by (zone)", "interval": "", "intervalFactor": 2, "legendFormat": "{{"{{zone}}"}}", @@ -438,7 +438,7 @@ data: "steppedLine": false, "targets": [ { - "expr": "sum(rate(coredns_dns_request_do_count_total{instance=~\"$instance\"}[5m])) or\nsum(rate(coredns_dns_do_requests_total{instance=~\"$instance\"}[5m]))", + "expr": "sum(rate(coredns_dns_request_do_count_total{job=\"coredns\",instance=~\"$instance\"}[5m])) or\nsum(rate(coredns_dns_do_requests_total{job=\"coredns\",instance=~\"$instance\"}[5m]))", "interval": "", "intervalFactor": 2, "legendFormat": "DO", @@ -446,7 +446,7 @@ data: "step": 40 }, { - "expr": "sum(rate(coredns_dns_request_count_total{instance=~\"$instance\"}[5m])) or\nsum(rate(coredns_dns_requests_total{instance=~\"$instance\"}[5m]))", + "expr": "sum(rate(coredns_dns_request_count_total{job=\"coredns\",instance=~\"$instance\"}[5m])) or\nsum(rate(coredns_dns_requests_total{job=\"coredns\",instance=~\"$instance\"}[5m]))", "interval": "", "intervalFactor": 2, "legendFormat": "total", @@ -559,7 +559,7 @@ data: "steppedLine": false, "targets": [ { - "expr": "histogram_quantile(0.99, sum(rate(coredns_dns_request_size_bytes_bucket{instance=~\"$instance\",proto=\"udp\"}[5m])) by (le,proto))", + "expr": "histogram_quantile(0.99, sum(rate(coredns_dns_request_size_bytes_bucket{job=\"coredns\",instance=~\"$instance\",proto=\"udp\"}[5m])) by (le,proto))", "interval": "", "intervalFactor": 2, "legendFormat": "{{"{{proto}}"}}:99 ", @@ -567,14 +567,14 @@ data: "step": 60 }, { - "expr": "histogram_quantile(0.90, sum(rate(coredns_dns_request_size_bytes_bucket{instance=~\"$instance\",proto=\"udp\"}[5m])) by (le,proto))", + "expr": "histogram_quantile(0.90, sum(rate(coredns_dns_request_size_bytes_bucket{job=\"coredns\",instance=~\"$instance\",proto=\"udp\"}[5m])) by (le,proto))", "intervalFactor": 2, "legendFormat": "{{"{{proto}}"}}:90", "refId": "B", "step": 60 }, { - "expr": "histogram_quantile(0.50, sum(rate(coredns_dns_request_size_bytes_bucket{instance=~\"$instance\",proto=\"udp\"}[5m])) by (le,proto))", + "expr": "histogram_quantile(0.50, sum(rate(coredns_dns_request_size_bytes_bucket{job=\"coredns\",instance=~\"$instance\",proto=\"udp\"}[5m])) by (le,proto))", "intervalFactor": 2, "legendFormat": "{{"{{proto}}"}}:50", "refId": "C", @@ -686,7 +686,7 @@ data: "steppedLine": false, "targets": [ { - "expr": "histogram_quantile(0.99, sum(rate(coredns_dns_request_size_bytes_bucket{instance=~\"$instance\",proto=\"tcp\"}[5m])) by (le,proto))", + "expr": "histogram_quantile(0.99, sum(rate(coredns_dns_request_size_bytes_bucket{job=\"coredns\",instance=~\"$instance\",proto=\"tcp\"}[5m])) by (le,proto))", "format": "time_series", "interval": "", "intervalFactor": 2, @@ -695,7 +695,7 @@ data: "step": 60 }, { - "expr": "histogram_quantile(0.90, sum(rate(coredns_dns_request_size_bytes_bucket{instance=~\"$instance\",proto=\"tcp\"}[5m])) by (le,proto))", + "expr": "histogram_quantile(0.90, sum(rate(coredns_dns_request_size_bytes_bucket{job=\"coredns\",instance=~\"$instance\",proto=\"tcp\"}[5m])) by (le,proto))", "format": "time_series", "interval": "", "intervalFactor": 2, @@ -704,7 +704,7 @@ data: "step": 60 }, { - "expr": "histogram_quantile(0.50, sum(rate(coredns_dns_request_size_bytes_bucket{instance=~\"$instance\",proto=\"tcp\"}[5m])) by (le,proto))", + "expr": "histogram_quantile(0.50, sum(rate(coredns_dns_request_size_bytes_bucket{job=\"coredns\",instance=~\"$instance\",proto=\"tcp\"}[5m])) by (le,proto))", "format": "time_series", "interval": "", "intervalFactor": 2, @@ -805,7 +805,7 @@ data: "steppedLine": false, "targets": [ { - "expr": "sum(rate(coredns_dns_response_rcode_count_total{instance=~\"$instance\"}[5m])) by (rcode) or\nsum(rate(coredns_dns_responses_total{instance=~\"$instance\"}[5m])) by (rcode)", + "expr": "sum(rate(coredns_dns_response_rcode_count_total{job=\"coredns\",instance=~\"$instance\"}[5m])) by (rcode) or\nsum(rate(coredns_dns_responses_total{job=\"coredns\",instance=~\"$instance\"}[5m])) by (rcode)", "interval": "", "intervalFactor": 2, "legendFormat": "{{"{{rcode}}"}}", @@ -905,7 +905,7 @@ data: "steppedLine": false, "targets": [ { - "expr": "histogram_quantile(0.99, sum(rate(coredns_dns_request_duration_seconds_bucket{instance=~\"$instance\"}[5m])) by (le, job))", + "expr": "histogram_quantile(0.99, sum(rate(coredns_dns_request_duration_seconds_bucket{job=\"coredns\",instance=~\"$instance\"}[5m])) by (le, job))", "format": "time_series", "intervalFactor": 2, "legendFormat": "99%", @@ -913,7 +913,7 @@ data: "step": 40 }, { - "expr": "histogram_quantile(0.90, sum(rate(coredns_dns_request_duration_seconds_bucket{instance=~\"$instance\"}[5m])) by (le))", + "expr": "histogram_quantile(0.90, sum(rate(coredns_dns_request_duration_seconds_bucket{job=\"coredns\",instance=~\"$instance\"}[5m])) by (le))", "format": "time_series", "intervalFactor": 2, "legendFormat": "90%", @@ -921,7 +921,7 @@ data: "step": 40 }, { - "expr": "histogram_quantile(0.50, sum(rate(coredns_dns_request_duration_seconds_bucket{instance=~\"$instance\"}[5m])) by (le))", + "expr": "histogram_quantile(0.50, sum(rate(coredns_dns_request_duration_seconds_bucket{job=\"coredns\",instance=~\"$instance\"}[5m])) by (le))", "format": "time_series", "intervalFactor": 2, "legendFormat": "50%", @@ -1038,7 +1038,7 @@ data: "steppedLine": false, "targets": [ { - "expr": "histogram_quantile(0.99, sum(rate(coredns_dns_response_size_bytes_bucket{instance=~\"$instance\",proto=\"udp\"}[5m])) by (le,proto)) ", + "expr": "histogram_quantile(0.99, sum(rate(coredns_dns_response_size_bytes_bucket{job=\"coredns\",instance=~\"$instance\",proto=\"udp\"}[5m])) by (le,proto)) ", "interval": "", "intervalFactor": 2, "legendFormat": "{{"{{proto}}"}}:99%", @@ -1046,7 +1046,7 @@ data: "step": 40 }, { - "expr": "histogram_quantile(0.90, sum(rate(coredns_dns_response_size_bytes_bucket{instance=~\"$instance\",proto=\"udp\"}[5m])) by (le,proto)) ", + "expr": "histogram_quantile(0.90, sum(rate(coredns_dns_response_size_bytes_bucket{job=\"coredns\",instance=~\"$instance\",proto=\"udp\"}[5m])) by (le,proto)) ", "interval": "", "intervalFactor": 2, "legendFormat": "{{"{{proto}}"}}:90%", @@ -1054,7 +1054,7 @@ data: "step": 40 }, { - "expr": "histogram_quantile(0.50, sum(rate(coredns_dns_response_size_bytes_bucket{instance=~\"$instance\",proto=\"udp\"}[5m])) by (le,proto)) ", + "expr": "histogram_quantile(0.50, sum(rate(coredns_dns_response_size_bytes_bucket{job=\"coredns\",instance=~\"$instance\",proto=\"udp\"}[5m])) by (le,proto)) ", "hide": false, "intervalFactor": 2, "legendFormat": "{{"{{proto}}"}}:50%", @@ -1172,7 +1172,7 @@ data: "steppedLine": false, "targets": [ { - "expr": "histogram_quantile(0.99, sum(rate(coredns_dns_response_size_bytes_bucket{instance=~\"$instance\",proto=\"tcp\"}[5m])) by (le,proto)) ", + "expr": "histogram_quantile(0.99, sum(rate(coredns_dns_response_size_bytes_bucket{job=\"coredns\",instance=~\"$instance\",proto=\"tcp\"}[5m])) by (le,proto)) ", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{"{{proto}}"}}:99%", @@ -1180,7 +1180,7 @@ data: "step": 40 }, { - "expr": "histogram_quantile(0.90, sum(rate(coredns_dns_response_size_bytes_bucket{instance=~\"$instance\",proto=\"tcp\"}[5m])) by (le,proto)) ", + "expr": "histogram_quantile(0.90, sum(rate(coredns_dns_response_size_bytes_bucket{job=\"coredns\",instance=~\"$instance\",proto=\"tcp\"}[5m])) by (le,proto)) ", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{"{{proto}}"}}:90%", @@ -1188,7 +1188,7 @@ data: "step": 40 }, { - "expr": "histogram_quantile(0.50, sum(rate(coredns_dns_response_size_bytes_bucket{instance=~\"$instance\",proto=\"tcp\"}[5m])) by (le, proto)) ", + "expr": "histogram_quantile(0.50, sum(rate(coredns_dns_response_size_bytes_bucket{job=\"coredns\",instance=~\"$instance\",proto=\"tcp\"}[5m])) by (le, proto)) ", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{"{{proto}}"}}:50%", @@ -1289,7 +1289,7 @@ data: "steppedLine": false, "targets": [ { - "expr": "sum(coredns_cache_size{instance=~\"$instance\"}) by (type) or\nsum(coredns_cache_entries{instance=~\"$instance\"}) by (type)", + "expr": "sum(coredns_cache_size{job=\"coredns\",instance=~\"$instance\"}) by (type) or\nsum(coredns_cache_entries{job=\"coredns\",instance=~\"$instance\"}) by (type)", "interval": "", "intervalFactor": 2, "legendFormat": "{{"{{type}}"}}", @@ -1394,7 +1394,7 @@ data: "steppedLine": false, "targets": [ { - "expr": "sum(rate(coredns_cache_hits_total{instance=~\"$instance\"}[5m])) by (type)", + "expr": "sum(rate(coredns_cache_hits_total{job=\"coredns\",instance=~\"$instance\"}[5m])) by (type)", "hide": false, "intervalFactor": 2, "legendFormat": "hits:{{"{{type}}"}}", @@ -1402,7 +1402,7 @@ data: "step": 40 }, { - "expr": "sum(rate(coredns_cache_misses_total{instance=~\"$instance\"}[5m])) by (type)", + "expr": "sum(rate(coredns_cache_misses_total{job=\"coredns\",instance=~\"$instance\"}[5m])) by (type)", "hide": false, "intervalFactor": 2, "legendFormat": "misses", @@ -1461,13 +1461,12 @@ data: "list": [ { "current": { - "selected": true, - "text": "default", - "value": "default" + "text": "Prometheus", + "value": "Prometheus" }, "hide": 0, "includeAll": false, - "label": null, + "label": "Data Source", "multi": false, "name": "datasource", "options": [], diff --git a/packages/rancher-project-monitoring/generated-changes/exclude/templates/grafana/dashboards-1.14/k8s-resources-cluster.yaml b/packages/rancher-project-monitoring/generated-changes/exclude/templates/grafana/dashboards-1.14/k8s-resources-cluster.yaml index de2bb007..581c4779 100644 --- a/packages/rancher-project-monitoring/generated-changes/exclude/templates/grafana/dashboards-1.14/k8s-resources-cluster.yaml +++ b/packages/rancher-project-monitoring/generated-changes/exclude/templates/grafana/dashboards-1.14/k8s-resources-cluster.yaml @@ -14,7 +14,7 @@ metadata: {{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} labels: {{- if $.Values.grafana.sidecar.dashboards.label }} - {{ $.Values.grafana.sidecar.dashboards.label }}: "1" + {{ $.Values.grafana.sidecar.dashboards.label }}: {{ ternary $.Values.grafana.sidecar.dashboards.labelValue "1" (not (empty $.Values.grafana.sidecar.dashboards.labelValue)) | quote }} {{- end }} app: {{ template "kube-prometheus-stack.name" $ }}-grafana {{ include "kube-prometheus-stack.labels" $ | indent 4 }} @@ -52,10 +52,12 @@ data: "id": 1, "interval": "1m", "legend": { + "alignAsTable": true, "avg": false, "current": false, "max": false, "min": false, + "rightSide": true, "show": true, "total": false, "values": false @@ -79,7 +81,7 @@ data: "steppedLine": false, "targets": [ { - "expr": "1 - avg(rate(node_cpu_seconds_total{mode=\"idle\", cluster=\"$cluster\"}[$__rate_interval]))", + "expr": "cluster:node_cpu:ratio_rate5m{cluster=\"$cluster\"}", "format": "time_series", "instant": true, "intervalFactor": 2, @@ -92,7 +94,7 @@ data: "title": "CPU Utilisation", "tooltip": { "shared": false, - "sort": 0, + "sort": 2, "value_type": "individual" }, "type": "singlestat", @@ -135,11 +137,14 @@ data: "fill": 1, "format": "percentunit", "id": 2, + "interval": "1m", "legend": { + "alignAsTable": true, "avg": false, "current": false, "max": false, "min": false, + "rightSide": true, "show": true, "total": false, "values": false @@ -163,7 +168,7 @@ data: "steppedLine": false, "targets": [ { - "expr": "sum(namespace_cpu:kube_pod_container_resource_requests:sum{cluster=\"$cluster\"}) / sum(kube_node_status_allocatable{resource=\"cpu\",cluster=\"$cluster\"})", + "expr": "sum(namespace_cpu:kube_pod_container_resource_requests:sum{cluster=\"$cluster\"}) / sum(kube_node_status_allocatable{job=\"kube-state-metrics\",resource=\"cpu\",cluster=\"$cluster\"})", "format": "time_series", "instant": true, "intervalFactor": 2, @@ -176,7 +181,7 @@ data: "title": "CPU Requests Commitment", "tooltip": { "shared": false, - "sort": 0, + "sort": 2, "value_type": "individual" }, "type": "singlestat", @@ -219,11 +224,14 @@ data: "fill": 1, "format": "percentunit", "id": 3, + "interval": "1m", "legend": { + "alignAsTable": true, "avg": false, "current": false, "max": false, "min": false, + "rightSide": true, "show": true, "total": false, "values": false @@ -247,7 +255,7 @@ data: "steppedLine": false, "targets": [ { - "expr": "sum(namespace_cpu:kube_pod_container_resource_limits:sum{cluster=\"$cluster\"}) / sum(kube_node_status_allocatable{resource=\"cpu\",cluster=\"$cluster\"})", + "expr": "sum(namespace_cpu:kube_pod_container_resource_limits:sum{cluster=\"$cluster\"}) / sum(kube_node_status_allocatable{job=\"kube-state-metrics\",resource=\"cpu\",cluster=\"$cluster\"})", "format": "time_series", "instant": true, "intervalFactor": 2, @@ -260,7 +268,7 @@ data: "title": "CPU Limits Commitment", "tooltip": { "shared": false, - "sort": 0, + "sort": 2, "value_type": "individual" }, "type": "singlestat", @@ -303,11 +311,14 @@ data: "fill": 1, "format": "percentunit", "id": 4, + "interval": "1m", "legend": { + "alignAsTable": true, "avg": false, "current": false, "max": false, "min": false, + "rightSide": true, "show": true, "total": false, "values": false @@ -331,7 +342,7 @@ data: "steppedLine": false, "targets": [ { - "expr": "1 - sum(:node_memory_MemAvailable_bytes:sum{cluster=\"$cluster\"}) / sum(node_memory_MemTotal_bytes{cluster=\"$cluster\"})", + "expr": "1 - sum(:node_memory_MemAvailable_bytes:sum{cluster=\"$cluster\"}) / sum(node_memory_MemTotal_bytes{job=\"node-exporter\",cluster=\"$cluster\"})", "format": "time_series", "instant": true, "intervalFactor": 2, @@ -344,7 +355,7 @@ data: "title": "Memory Utilisation", "tooltip": { "shared": false, - "sort": 0, + "sort": 2, "value_type": "individual" }, "type": "singlestat", @@ -387,11 +398,14 @@ data: "fill": 1, "format": "percentunit", "id": 5, + "interval": "1m", "legend": { + "alignAsTable": true, "avg": false, "current": false, "max": false, "min": false, + "rightSide": true, "show": true, "total": false, "values": false @@ -415,7 +429,7 @@ data: "steppedLine": false, "targets": [ { - "expr": "sum(namespace_memory:kube_pod_container_resource_requests:sum{cluster=\"$cluster\"}) / sum(kube_node_status_allocatable{resource=\"memory\",cluster=\"$cluster\"})", + "expr": "sum(namespace_memory:kube_pod_container_resource_requests:sum{cluster=\"$cluster\"}) / sum(kube_node_status_allocatable{job=\"kube-state-metrics\",resource=\"memory\",cluster=\"$cluster\"})", "format": "time_series", "instant": true, "intervalFactor": 2, @@ -428,7 +442,7 @@ data: "title": "Memory Requests Commitment", "tooltip": { "shared": false, - "sort": 0, + "sort": 2, "value_type": "individual" }, "type": "singlestat", @@ -471,11 +485,14 @@ data: "fill": 1, "format": "percentunit", "id": 6, + "interval": "1m", "legend": { + "alignAsTable": true, "avg": false, "current": false, "max": false, "min": false, + "rightSide": true, "show": true, "total": false, "values": false @@ -499,7 +516,7 @@ data: "steppedLine": false, "targets": [ { - "expr": "sum(namespace_memory:kube_pod_container_resource_limits:sum{cluster=\"$cluster\"}) / sum(kube_node_status_allocatable{resource=\"memory\",cluster=\"$cluster\"})", + "expr": "sum(namespace_memory:kube_pod_container_resource_limits:sum{cluster=\"$cluster\"}) / sum(kube_node_status_allocatable{job=\"kube-state-metrics\",resource=\"memory\",cluster=\"$cluster\"})", "format": "time_series", "instant": true, "intervalFactor": 2, @@ -512,7 +529,7 @@ data: "title": "Memory Limits Commitment", "tooltip": { "shared": false, - "sort": 0, + "sort": 2, "value_type": "individual" }, "type": "singlestat", @@ -566,11 +583,14 @@ data: "datasource": "$datasource", "fill": 10, "id": 7, + "interval": "1m", "legend": { + "alignAsTable": true, "avg": false, "current": false, "max": false, "min": false, + "rightSide": true, "show": true, "total": false, "values": false @@ -610,7 +630,7 @@ data: "title": "CPU Usage", "tooltip": { "shared": false, - "sort": 0, + "sort": 2, "value_type": "individual" }, "type": "graph", @@ -664,11 +684,14 @@ data: "datasource": "$datasource", "fill": 1, "id": 8, + "interval": "1m", "legend": { + "alignAsTable": true, "avg": false, "current": false, "max": false, "min": false, + "rightSide": true, "show": true, "total": false, "values": false @@ -708,7 +731,7 @@ data: "link": true, "linkTargetBlank": false, "linkTooltip": "Drill down to pods", - "linkUrl": "/d/85a562078cdf77779eaa1add43ccec1e/k8s-resources-namespace?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$__cell_1", + "linkUrl": "d/85a562078cdf77779eaa1add43ccec1e/k8s-resources-namespace?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$__cell_1", "pattern": "Value #A", "thresholds": [ @@ -727,7 +750,7 @@ data: "link": true, "linkTargetBlank": false, "linkTooltip": "Drill down to workloads", - "linkUrl": "/d/a87fb0d919ec0ea5f6543124e16c42a5/k8s-resources-workloads-namespace?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$__cell_1", + "linkUrl": "d/a87fb0d919ec0ea5f6543124e16c42a5/k8s-resources-workloads-namespace?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$__cell_1", "pattern": "Value #B", "thresholds": [ @@ -841,7 +864,7 @@ data: "link": true, "linkTargetBlank": false, "linkTooltip": "Drill down to pods", - "linkUrl": "/d/85a562078cdf77779eaa1add43ccec1e/k8s-resources-namespace?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$__cell", + "linkUrl": "d/85a562078cdf77779eaa1add43ccec1e/k8s-resources-namespace?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$__cell", "pattern": "namespace", "thresholds": [ @@ -867,7 +890,7 @@ data: ], "targets": [ { - "expr": "sum(kube_pod_owner{cluster=\"$cluster\"}) by (namespace)", + "expr": "sum(kube_pod_owner{job=\"kube-state-metrics\", cluster=\"$cluster\"}) by (namespace)", "format": "table", "instant": true, "intervalFactor": 2, @@ -938,7 +961,7 @@ data: "title": "CPU Quota", "tooltip": { "shared": false, - "sort": 0, + "sort": 2, "value_type": "individual" }, "transform": "table", @@ -993,11 +1016,14 @@ data: "datasource": "$datasource", "fill": 10, "id": 9, + "interval": "1m", "legend": { + "alignAsTable": true, "avg": false, "current": false, "max": false, "min": false, + "rightSide": true, "show": true, "total": false, "values": false @@ -1021,7 +1047,7 @@ data: "steppedLine": false, "targets": [ { - "expr": "sum(container_memory_rss{cluster=\"$cluster\", container!=\"\"}) by (namespace)", + "expr": "sum(container_memory_rss{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", container!=\"\"}) by (namespace)", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}namespace{{`}}`}}", @@ -1037,7 +1063,7 @@ data: "title": "Memory Usage (w/o cache)", "tooltip": { "shared": false, - "sort": 0, + "sort": 2, "value_type": "individual" }, "type": "graph", @@ -1091,11 +1117,14 @@ data: "datasource": "$datasource", "fill": 1, "id": 10, + "interval": "1m", "legend": { + "alignAsTable": true, "avg": false, "current": false, "max": false, "min": false, + "rightSide": true, "show": true, "total": false, "values": false @@ -1135,7 +1164,7 @@ data: "link": true, "linkTargetBlank": false, "linkTooltip": "Drill down to pods", - "linkUrl": "/d/85a562078cdf77779eaa1add43ccec1e/k8s-resources-namespace?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$__cell_1", + "linkUrl": "d/85a562078cdf77779eaa1add43ccec1e/k8s-resources-namespace?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$__cell_1", "pattern": "Value #A", "thresholds": [ @@ -1154,7 +1183,7 @@ data: "link": true, "linkTargetBlank": false, "linkTooltip": "Drill down to workloads", - "linkUrl": "/d/a87fb0d919ec0ea5f6543124e16c42a5/k8s-resources-workloads-namespace?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$__cell_1", + "linkUrl": "d/a87fb0d919ec0ea5f6543124e16c42a5/k8s-resources-workloads-namespace?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$__cell_1", "pattern": "Value #B", "thresholds": [ @@ -1268,7 +1297,7 @@ data: "link": true, "linkTargetBlank": false, "linkTooltip": "Drill down to pods", - "linkUrl": "/d/85a562078cdf77779eaa1add43ccec1e/k8s-resources-namespace?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$__cell", + "linkUrl": "d/85a562078cdf77779eaa1add43ccec1e/k8s-resources-namespace?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$__cell", "pattern": "namespace", "thresholds": [ @@ -1294,7 +1323,7 @@ data: ], "targets": [ { - "expr": "sum(kube_pod_owner{cluster=\"$cluster\"}) by (namespace)", + "expr": "sum(kube_pod_owner{job=\"kube-state-metrics\", cluster=\"$cluster\"}) by (namespace)", "format": "table", "instant": true, "intervalFactor": 2, @@ -1312,7 +1341,7 @@ data: "step": 10 }, { - "expr": "sum(container_memory_rss{cluster=\"$cluster\", container!=\"\"}) by (namespace)", + "expr": "sum(container_memory_rss{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", container!=\"\"}) by (namespace)", "format": "table", "instant": true, "intervalFactor": 2, @@ -1330,7 +1359,7 @@ data: "step": 10 }, { - "expr": "sum(container_memory_rss{cluster=\"$cluster\", container!=\"\"}) by (namespace) / sum(namespace_memory:kube_pod_container_resource_requests:sum{cluster=\"$cluster\"}) by (namespace)", + "expr": "sum(container_memory_rss{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", container!=\"\"}) by (namespace) / sum(namespace_memory:kube_pod_container_resource_requests:sum{cluster=\"$cluster\"}) by (namespace)", "format": "table", "instant": true, "intervalFactor": 2, @@ -1348,7 +1377,7 @@ data: "step": 10 }, { - "expr": "sum(container_memory_rss{cluster=\"$cluster\", container!=\"\"}) by (namespace) / sum(namespace_memory:kube_pod_container_resource_limits:sum{cluster=\"$cluster\"}) by (namespace)", + "expr": "sum(container_memory_rss{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", container!=\"\"}) by (namespace) / sum(namespace_memory:kube_pod_container_resource_limits:sum{cluster=\"$cluster\"}) by (namespace)", "format": "table", "instant": true, "intervalFactor": 2, @@ -1365,7 +1394,7 @@ data: "title": "Requests by Namespace", "tooltip": { "shared": false, - "sort": 0, + "sort": 2, "value_type": "individual" }, "transform": "table", @@ -1422,10 +1451,12 @@ data: "id": 11, "interval": "1m", "legend": { + "alignAsTable": true, "avg": false, "current": false, "max": false, "min": false, + "rightSide": true, "show": true, "total": false, "values": false @@ -1579,7 +1610,7 @@ data: "link": true, "linkTargetBlank": false, "linkTooltip": "Drill down to pods", - "linkUrl": "/d/85a562078cdf77779eaa1add43ccec1e/k8s-resources-namespace?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$__cell", + "linkUrl": "d/85a562078cdf77779eaa1add43ccec1e/k8s-resources-namespace?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$__cell", "pattern": "namespace", "thresholds": [ @@ -1605,7 +1636,7 @@ data: ], "targets": [ { - "expr": "sum(irate(container_network_receive_bytes_total{cluster=\"$cluster\", namespace=~\".+\"}[$__rate_interval])) by (namespace)", + "expr": "sum(irate(container_network_receive_bytes_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=~\".+\"}[$__rate_interval])) by (namespace)", "format": "table", "instant": true, "intervalFactor": 2, @@ -1614,7 +1645,7 @@ data: "step": 10 }, { - "expr": "sum(irate(container_network_transmit_bytes_total{cluster=\"$cluster\", namespace=~\".+\"}[$__rate_interval])) by (namespace)", + "expr": "sum(irate(container_network_transmit_bytes_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=~\".+\"}[$__rate_interval])) by (namespace)", "format": "table", "instant": true, "intervalFactor": 2, @@ -1623,7 +1654,7 @@ data: "step": 10 }, { - "expr": "sum(irate(container_network_receive_packets_total{cluster=\"$cluster\", namespace=~\".+\"}[$__rate_interval])) by (namespace)", + "expr": "sum(irate(container_network_receive_packets_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=~\".+\"}[$__rate_interval])) by (namespace)", "format": "table", "instant": true, "intervalFactor": 2, @@ -1632,7 +1663,7 @@ data: "step": 10 }, { - "expr": "sum(irate(container_network_transmit_packets_total{cluster=\"$cluster\", namespace=~\".+\"}[$__rate_interval])) by (namespace)", + "expr": "sum(irate(container_network_transmit_packets_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=~\".+\"}[$__rate_interval])) by (namespace)", "format": "table", "instant": true, "intervalFactor": 2, @@ -1641,7 +1672,7 @@ data: "step": 10 }, { - "expr": "sum(irate(container_network_receive_packets_dropped_total{cluster=\"$cluster\", namespace=~\".+\"}[$__rate_interval])) by (namespace)", + "expr": "sum(irate(container_network_receive_packets_dropped_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=~\".+\"}[$__rate_interval])) by (namespace)", "format": "table", "instant": true, "intervalFactor": 2, @@ -1650,7 +1681,7 @@ data: "step": 10 }, { - "expr": "sum(irate(container_network_transmit_packets_dropped_total{cluster=\"$cluster\", namespace=~\".+\"}[$__rate_interval])) by (namespace)", + "expr": "sum(irate(container_network_transmit_packets_dropped_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=~\".+\"}[$__rate_interval])) by (namespace)", "format": "table", "instant": true, "intervalFactor": 2, @@ -1667,7 +1698,7 @@ data: "title": "Current Network Usage", "tooltip": { "shared": false, - "sort": 0, + "sort": 2, "value_type": "individual" }, "transform": "table", @@ -1722,11 +1753,14 @@ data: "datasource": "$datasource", "fill": 10, "id": 12, + "interval": "1m", "legend": { + "alignAsTable": true, "avg": false, "current": false, "max": false, "min": false, + "rightSide": true, "show": true, "total": false, "values": false @@ -1750,7 +1784,7 @@ data: "steppedLine": false, "targets": [ { - "expr": "sum(irate(container_network_receive_bytes_total{cluster=\"$cluster\", namespace=~\".+\"}[$__rate_interval])) by (namespace)", + "expr": "sum(irate(container_network_receive_bytes_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=~\".+\"}[$__rate_interval])) by (namespace)", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}namespace{{`}}`}}", @@ -1766,7 +1800,7 @@ data: "title": "Receive Bandwidth", "tooltip": { "shared": false, - "sort": 0, + "sort": 2, "value_type": "individual" }, "type": "graph", @@ -1808,11 +1842,14 @@ data: "datasource": "$datasource", "fill": 10, "id": 13, + "interval": "1m", "legend": { + "alignAsTable": true, "avg": false, "current": false, "max": false, "min": false, + "rightSide": true, "show": true, "total": false, "values": false @@ -1836,7 +1873,7 @@ data: "steppedLine": false, "targets": [ { - "expr": "sum(irate(container_network_transmit_bytes_total{cluster=\"$cluster\", namespace=~\".+\"}[$__rate_interval])) by (namespace)", + "expr": "sum(irate(container_network_transmit_bytes_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=~\".+\"}[$__rate_interval])) by (namespace)", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}namespace{{`}}`}}", @@ -1852,7 +1889,7 @@ data: "title": "Transmit Bandwidth", "tooltip": { "shared": false, - "sort": 0, + "sort": 2, "value_type": "individual" }, "type": "graph", @@ -1906,11 +1943,14 @@ data: "datasource": "$datasource", "fill": 10, "id": 14, + "interval": "1m", "legend": { + "alignAsTable": true, "avg": false, "current": false, "max": false, "min": false, + "rightSide": true, "show": true, "total": false, "values": false @@ -1934,7 +1974,7 @@ data: "steppedLine": false, "targets": [ { - "expr": "avg(irate(container_network_receive_bytes_total{cluster=\"$cluster\", namespace=~\".+\"}[$__rate_interval])) by (namespace)", + "expr": "avg(irate(container_network_receive_bytes_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=~\".+\"}[$__rate_interval])) by (namespace)", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}namespace{{`}}`}}", @@ -1950,7 +1990,7 @@ data: "title": "Average Container Bandwidth by Namespace: Received", "tooltip": { "shared": false, - "sort": 0, + "sort": 2, "value_type": "individual" }, "type": "graph", @@ -1992,11 +2032,14 @@ data: "datasource": "$datasource", "fill": 10, "id": 15, + "interval": "1m", "legend": { + "alignAsTable": true, "avg": false, "current": false, "max": false, "min": false, + "rightSide": true, "show": true, "total": false, "values": false @@ -2020,7 +2063,7 @@ data: "steppedLine": false, "targets": [ { - "expr": "avg(irate(container_network_transmit_bytes_total{cluster=\"$cluster\", namespace=~\".+\"}[$__rate_interval])) by (namespace)", + "expr": "avg(irate(container_network_transmit_bytes_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=~\".+\"}[$__rate_interval])) by (namespace)", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}namespace{{`}}`}}", @@ -2036,7 +2079,7 @@ data: "title": "Average Container Bandwidth by Namespace: Transmitted", "tooltip": { "shared": false, - "sort": 0, + "sort": 2, "value_type": "individual" }, "type": "graph", @@ -2090,11 +2133,14 @@ data: "datasource": "$datasource", "fill": 10, "id": 16, + "interval": "1m", "legend": { + "alignAsTable": true, "avg": false, "current": false, "max": false, "min": false, + "rightSide": true, "show": true, "total": false, "values": false @@ -2118,7 +2164,7 @@ data: "steppedLine": false, "targets": [ { - "expr": "sum(irate(container_network_receive_packets_total{cluster=\"$cluster\", namespace=~\".+\"}[$__rate_interval])) by (namespace)", + "expr": "sum(irate(container_network_receive_packets_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=~\".+\"}[$__rate_interval])) by (namespace)", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}namespace{{`}}`}}", @@ -2134,7 +2180,7 @@ data: "title": "Rate of Received Packets", "tooltip": { "shared": false, - "sort": 0, + "sort": 2, "value_type": "individual" }, "type": "graph", @@ -2176,11 +2222,14 @@ data: "datasource": "$datasource", "fill": 10, "id": 17, + "interval": "1m", "legend": { + "alignAsTable": true, "avg": false, "current": false, "max": false, "min": false, + "rightSide": true, "show": true, "total": false, "values": false @@ -2204,7 +2253,7 @@ data: "steppedLine": false, "targets": [ { - "expr": "sum(irate(container_network_transmit_packets_total{cluster=\"$cluster\", namespace=~\".+\"}[$__rate_interval])) by (namespace)", + "expr": "sum(irate(container_network_transmit_packets_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=~\".+\"}[$__rate_interval])) by (namespace)", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}namespace{{`}}`}}", @@ -2220,7 +2269,7 @@ data: "title": "Rate of Transmitted Packets", "tooltip": { "shared": false, - "sort": 0, + "sort": 2, "value_type": "individual" }, "type": "graph", @@ -2274,11 +2323,14 @@ data: "datasource": "$datasource", "fill": 10, "id": 18, + "interval": "1m", "legend": { + "alignAsTable": true, "avg": false, "current": false, "max": false, "min": false, + "rightSide": true, "show": true, "total": false, "values": false @@ -2302,7 +2354,7 @@ data: "steppedLine": false, "targets": [ { - "expr": "sum(irate(container_network_receive_packets_dropped_total{cluster=\"$cluster\", namespace=~\".+\"}[$__rate_interval])) by (namespace)", + "expr": "sum(irate(container_network_receive_packets_dropped_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=~\".+\"}[$__rate_interval])) by (namespace)", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}namespace{{`}}`}}", @@ -2318,7 +2370,7 @@ data: "title": "Rate of Received Packets Dropped", "tooltip": { "shared": false, - "sort": 0, + "sort": 2, "value_type": "individual" }, "type": "graph", @@ -2360,11 +2412,14 @@ data: "datasource": "$datasource", "fill": 10, "id": 19, + "interval": "1m", "legend": { + "alignAsTable": true, "avg": false, "current": false, "max": false, "min": false, + "rightSide": true, "show": true, "total": false, "values": false @@ -2388,7 +2443,7 @@ data: "steppedLine": false, "targets": [ { - "expr": "sum(irate(container_network_transmit_packets_dropped_total{cluster=\"$cluster\", namespace=~\".+\"}[$__rate_interval])) by (namespace)", + "expr": "sum(irate(container_network_transmit_packets_dropped_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=~\".+\"}[$__rate_interval])) by (namespace)", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}namespace{{`}}`}}", @@ -2404,7 +2459,7 @@ data: "title": "Rate of Transmitted Packets Dropped", "tooltip": { "shared": false, - "sort": 0, + "sort": 2, "value_type": "individual" }, "type": "graph", @@ -2459,11 +2514,14 @@ data: "decimals": -1, "fill": 10, "id": 20, + "interval": "1m", "legend": { + "alignAsTable": true, "avg": false, "current": false, "max": false, "min": false, + "rightSide": true, "show": true, "total": false, "values": false @@ -2487,7 +2545,7 @@ data: "steppedLine": false, "targets": [ { - "expr": "ceil(sum by(namespace) (rate(container_fs_reads_total{container!=\"\", cluster=\"$cluster\"}[5m]) + rate(container_fs_writes_total{container!=\"\", cluster=\"$cluster\"}[5m])))", + "expr": "ceil(sum by(namespace) (rate(container_fs_reads_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", container!=\"\", device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", cluster=\"$cluster\", namespace!=\"\"}[$__rate_interval]) + rate(container_fs_writes_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", container!=\"\", cluster=\"$cluster\", namespace!=\"\"}[$__rate_interval])))", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}namespace{{`}}`}}", @@ -2503,7 +2561,7 @@ data: "title": "IOPS(Reads+Writes)", "tooltip": { "shared": false, - "sort": 0, + "sort": 2, "value_type": "individual" }, "type": "graph", @@ -2545,11 +2603,14 @@ data: "datasource": "$datasource", "fill": 10, "id": 21, + "interval": "1m", "legend": { + "alignAsTable": true, "avg": false, "current": false, "max": false, "min": false, + "rightSide": true, "show": true, "total": false, "values": false @@ -2573,7 +2634,7 @@ data: "steppedLine": false, "targets": [ { - "expr": "sum by(namespace) (rate(container_fs_reads_bytes_total{container!=\"\", cluster=\"$cluster\"}[5m]) + rate(container_fs_writes_bytes_total{container!=\"\", cluster=\"$cluster\"}[5m]))", + "expr": "sum by(namespace) (rate(container_fs_reads_bytes_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", container!=\"\", device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", cluster=\"$cluster\", namespace!=\"\"}[$__rate_interval]) + rate(container_fs_writes_bytes_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", container!=\"\", cluster=\"$cluster\", namespace!=\"\"}[$__rate_interval]))", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}namespace{{`}}`}}", @@ -2589,7 +2650,7 @@ data: "title": "ThroughPut(Read+Write)", "tooltip": { "shared": false, - "sort": 0, + "sort": 2, "value_type": "individual" }, "type": "graph", @@ -2643,11 +2704,14 @@ data: "datasource": "$datasource", "fill": 1, "id": 22, + "interval": "1m", "legend": { + "alignAsTable": true, "avg": false, "current": false, "max": false, "min": false, + "rightSide": true, "show": true, "total": false, "values": false @@ -2805,7 +2869,7 @@ data: "link": true, "linkTargetBlank": false, "linkTooltip": "Drill down to pods", - "linkUrl": "/d/85a562078cdf77779eaa1add43ccec1e/k8s-resources-namespace?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$__cell", + "linkUrl": "d/85a562078cdf77779eaa1add43ccec1e/k8s-resources-namespace?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$__cell", "pattern": "namespace", "thresholds": [ @@ -2831,7 +2895,7 @@ data: ], "targets": [ { - "expr": "sum by(namespace) (rate(container_fs_reads_total{container!=\"\", cluster=\"$cluster\"}[5m]))", + "expr": "sum by(namespace) (rate(container_fs_reads_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", container!=\"\", cluster=\"$cluster\", namespace!=\"\"}[$__rate_interval]))", "format": "table", "instant": true, "intervalFactor": 2, @@ -2840,7 +2904,7 @@ data: "step": 10 }, { - "expr": "sum by(namespace) (rate(container_fs_writes_total{container!=\"\", cluster=\"$cluster\"}[5m]))", + "expr": "sum by(namespace) (rate(container_fs_writes_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", container!=\"\", cluster=\"$cluster\", namespace!=\"\"}[$__rate_interval]))", "format": "table", "instant": true, "intervalFactor": 2, @@ -2849,7 +2913,7 @@ data: "step": 10 }, { - "expr": "sum by(namespace) (rate(container_fs_reads_total{container!=\"\", cluster=\"$cluster\"}[5m]) + rate(container_fs_writes_total{container!=\"\", cluster=\"$cluster\"}[5m]))", + "expr": "sum by(namespace) (rate(container_fs_reads_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", container!=\"\", cluster=\"$cluster\", namespace!=\"\"}[$__rate_interval]) + rate(container_fs_writes_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", container!=\"\", cluster=\"$cluster\", namespace!=\"\"}[$__rate_interval]))", "format": "table", "instant": true, "intervalFactor": 2, @@ -2858,7 +2922,7 @@ data: "step": 10 }, { - "expr": "sum by(namespace) (rate(container_fs_reads_bytes_total{container!=\"\", cluster=\"$cluster\"}[5m]))", + "expr": "sum by(namespace) (rate(container_fs_reads_bytes_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", container!=\"\", cluster=\"$cluster\", namespace!=\"\"}[$__rate_interval]))", "format": "table", "instant": true, "intervalFactor": 2, @@ -2867,7 +2931,7 @@ data: "step": 10 }, { - "expr": "sum by(namespace) (rate(container_fs_writes_bytes_total{container!=\"\", cluster=\"$cluster\"}[5m]))", + "expr": "sum by(namespace) (rate(container_fs_writes_bytes_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", container!=\"\", cluster=\"$cluster\", namespace!=\"\"}[$__rate_interval]))", "format": "table", "instant": true, "intervalFactor": 2, @@ -2876,7 +2940,7 @@ data: "step": 10 }, { - "expr": "sum by(namespace) (rate(container_fs_reads_bytes_total{container!=\"\", cluster=\"$cluster\"}[5m]) + rate(container_fs_writes_bytes_total{container!=\"\", cluster=\"$cluster\"}[5m]))", + "expr": "sum by(namespace) (rate(container_fs_reads_bytes_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", container!=\"\", cluster=\"$cluster\", namespace!=\"\"}[$__rate_interval]) + rate(container_fs_writes_bytes_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", container!=\"\", cluster=\"$cluster\", namespace!=\"\"}[$__rate_interval]))", "format": "table", "instant": true, "intervalFactor": 2, @@ -2893,7 +2957,7 @@ data: "title": "Current Storage IO", "tooltip": { "shared": false, - "sort": 0, + "sort": 2, "value_type": "individual" }, "transform": "table", @@ -2944,11 +3008,11 @@ data: "list": [ { "current": { - "text": "default", - "value": "default" + "text": "Prometheus", + "value": "Prometheus" }, "hide": 0, - "label": null, + "label": "Data Source", "name": "datasource", "options": [ diff --git a/packages/rancher-project-monitoring/generated-changes/exclude/templates/grafana/dashboards-1.14/kubelet.yaml b/packages/rancher-project-monitoring/generated-changes/exclude/templates/grafana/dashboards-1.14/kubelet.yaml index 1ddb4d17..11c0934a 100644 --- a/packages/rancher-project-monitoring/generated-changes/exclude/templates/grafana/dashboards-1.14/kubelet.yaml +++ b/packages/rancher-project-monitoring/generated-changes/exclude/templates/grafana/dashboards-1.14/kubelet.yaml @@ -15,7 +15,7 @@ metadata: {{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} labels: {{- if $.Values.grafana.sidecar.dashboards.label }} - {{ $.Values.grafana.sidecar.dashboards.label }}: "1" + {{ $.Values.grafana.sidecar.dashboards.label }}: {{ ternary $.Values.grafana.sidecar.dashboards.labelValue "1" (not (empty $.Values.grafana.sidecar.dashboards.labelValue)) | quote }} {{- end }} app: {{ template "kube-prometheus-stack.name" $ }}-grafana {{ include "kube-prometheus-stack.labels" $ | indent 4 }} @@ -209,7 +209,7 @@ data: "refId": "A" } ], - "title": "Running Container", + "title": "Running Containers", "transparent": false, "type": "stat" }, @@ -373,7 +373,7 @@ data: "pluginVersion": "7", "targets": [ { - "expr": "sum(rate(kubelet_node_config_error{cluster=\"$cluster\", job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics\", instance=~\"$instance\"}[5m]))", + "expr": "sum(rate(kubelet_node_config_error{cluster=\"$cluster\", job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics\", instance=~\"$instance\"}[$__rate_interval]))", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}instance{{`}}`}}", @@ -432,7 +432,7 @@ data: "steppedLine": false, "targets": [ { - "expr": "sum(rate(kubelet_runtime_operations_total{cluster=\"$cluster\",job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics\",instance=~\"$instance\"}[5m])) by (operation_type, instance)", + "expr": "sum(rate(kubelet_runtime_operations_total{cluster=\"$cluster\",job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics\",instance=~\"$instance\"}[$__rate_interval])) by (operation_type, instance)", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}instance{{`}}`}} {{`{{`}}operation_type{{`}}`}}", @@ -527,7 +527,7 @@ data: "steppedLine": false, "targets": [ { - "expr": "sum(rate(kubelet_runtime_operations_errors_total{cluster=\"$cluster\",job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics\",instance=~\"$instance\"}[5m])) by (instance, operation_type)", + "expr": "sum(rate(kubelet_runtime_operations_errors_total{cluster=\"$cluster\",job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics\",instance=~\"$instance\"}[$__rate_interval])) by (instance, operation_type)", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}instance{{`}}`}} {{`{{`}}operation_type{{`}}`}}", @@ -622,7 +622,7 @@ data: "steppedLine": false, "targets": [ { - "expr": "histogram_quantile(0.99, sum(rate(kubelet_runtime_operations_duration_seconds_bucket{cluster=\"$cluster\",job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics\",instance=~\"$instance\"}[5m])) by (instance, operation_type, le))", + "expr": "histogram_quantile(0.99, sum(rate(kubelet_runtime_operations_duration_seconds_bucket{cluster=\"$cluster\",job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics\",instance=~\"$instance\"}[$__rate_interval])) by (instance, operation_type, le))", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}instance{{`}}`}} {{`{{`}}operation_type{{`}}`}}", @@ -717,14 +717,14 @@ data: "steppedLine": false, "targets": [ { - "expr": "sum(rate(kubelet_pod_start_duration_seconds_count{cluster=\"$cluster\",job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics\",instance=~\"$instance\"}[5m])) by (instance)", + "expr": "sum(rate(kubelet_pod_start_duration_seconds_count{cluster=\"$cluster\",job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics\",instance=~\"$instance\"}[$__rate_interval])) by (instance)", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}instance{{`}}`}} pod", "refId": "A" }, { - "expr": "sum(rate(kubelet_pod_worker_duration_seconds_count{cluster=\"$cluster\",job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics\",instance=~\"$instance\"}[5m])) by (instance)", + "expr": "sum(rate(kubelet_pod_worker_duration_seconds_count{cluster=\"$cluster\",job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics\",instance=~\"$instance\"}[$__rate_interval])) by (instance)", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}instance{{`}}`}} worker", @@ -819,14 +819,14 @@ data: "steppedLine": false, "targets": [ { - "expr": "histogram_quantile(0.99, sum(rate(kubelet_pod_start_duration_seconds_count{cluster=\"$cluster\",job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics\",instance=~\"$instance\"}[5m])) by (instance, le))", + "expr": "histogram_quantile(0.99, sum(rate(kubelet_pod_start_duration_seconds_bucket{cluster=\"$cluster\",job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics\",instance=~\"$instance\"}[$__rate_interval])) by (instance, le))", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}instance{{`}}`}} pod", "refId": "A" }, { - "expr": "histogram_quantile(0.99, sum(rate(kubelet_pod_worker_duration_seconds_bucket{cluster=\"$cluster\",job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics\",instance=~\"$instance\"}[5m])) by (instance, le))", + "expr": "histogram_quantile(0.99, sum(rate(kubelet_pod_worker_duration_seconds_bucket{cluster=\"$cluster\",job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics\",instance=~\"$instance\"}[$__rate_interval])) by (instance, le))", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}instance{{`}}`}} worker", @@ -923,7 +923,7 @@ data: "steppedLine": false, "targets": [ { - "expr": "sum(rate(storage_operation_duration_seconds_count{cluster=\"$cluster\",job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics\",instance=~\"$instance\"}[5m])) by (instance, operation_name, volume_plugin)", + "expr": "sum(rate(storage_operation_duration_seconds_count{cluster=\"$cluster\",job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics\",instance=~\"$instance\"}[$__rate_interval])) by (instance, operation_name, volume_plugin)", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}instance{{`}}`}} {{`{{`}}operation_name{{`}}`}} {{`{{`}}volume_plugin{{`}}`}}", @@ -1020,7 +1020,7 @@ data: "steppedLine": false, "targets": [ { - "expr": "sum(rate(storage_operation_errors_total{cluster=\"$cluster\",job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics\",instance=~\"$instance\"}[5m])) by (instance, operation_name, volume_plugin)", + "expr": "sum(rate(storage_operation_errors_total{cluster=\"$cluster\",job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics\",instance=~\"$instance\"}[$__rate_interval])) by (instance, operation_name, volume_plugin)", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}instance{{`}}`}} {{`{{`}}operation_name{{`}}`}} {{`{{`}}volume_plugin{{`}}`}}", @@ -1117,7 +1117,7 @@ data: "steppedLine": false, "targets": [ { - "expr": "histogram_quantile(0.99, sum(rate(storage_operation_duration_seconds_bucket{cluster=\"$cluster\", job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics\", instance=~\"$instance\"}[5m])) by (instance, operation_name, volume_plugin, le))", + "expr": "histogram_quantile(0.99, sum(rate(storage_operation_duration_seconds_bucket{cluster=\"$cluster\", job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics\", instance=~\"$instance\"}[$__rate_interval])) by (instance, operation_name, volume_plugin, le))", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}instance{{`}}`}} {{`{{`}}operation_name{{`}}`}} {{`{{`}}volume_plugin{{`}}`}}", @@ -1212,7 +1212,7 @@ data: "steppedLine": false, "targets": [ { - "expr": "sum(rate(kubelet_cgroup_manager_duration_seconds_count{cluster=\"$cluster\", job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics\", instance=~\"$instance\"}[5m])) by (instance, operation_type)", + "expr": "sum(rate(kubelet_cgroup_manager_duration_seconds_count{cluster=\"$cluster\", job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics\", instance=~\"$instance\"}[$__rate_interval])) by (instance, operation_type)", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}operation_type{{`}}`}}", @@ -1307,7 +1307,7 @@ data: "steppedLine": false, "targets": [ { - "expr": "histogram_quantile(0.99, sum(rate(kubelet_cgroup_manager_duration_seconds_bucket{cluster=\"$cluster\", job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics\", instance=~\"$instance\"}[5m])) by (instance, operation_type, le))", + "expr": "histogram_quantile(0.99, sum(rate(kubelet_cgroup_manager_duration_seconds_bucket{cluster=\"$cluster\", job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics\", instance=~\"$instance\"}[$__rate_interval])) by (instance, operation_type, le))", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}instance{{`}}`}} {{`{{`}}operation_type{{`}}`}}", @@ -1403,7 +1403,7 @@ data: "steppedLine": false, "targets": [ { - "expr": "sum(rate(kubelet_pleg_relist_duration_seconds_count{cluster=\"$cluster\", job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics\", instance=~\"$instance\"}[5m])) by (instance)", + "expr": "sum(rate(kubelet_pleg_relist_duration_seconds_count{cluster=\"$cluster\", job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics\", instance=~\"$instance\"}[$__rate_interval])) by (instance)", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}instance{{`}}`}}", @@ -1498,7 +1498,7 @@ data: "steppedLine": false, "targets": [ { - "expr": "histogram_quantile(0.99, sum(rate(kubelet_pleg_relist_interval_seconds_bucket{cluster=\"$cluster\",job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics\",instance=~\"$instance\"}[5m])) by (instance, le))", + "expr": "histogram_quantile(0.99, sum(rate(kubelet_pleg_relist_interval_seconds_bucket{cluster=\"$cluster\",job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics\",instance=~\"$instance\"}[$__rate_interval])) by (instance, le))", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}instance{{`}}`}}", @@ -1593,7 +1593,7 @@ data: "steppedLine": false, "targets": [ { - "expr": "histogram_quantile(0.99, sum(rate(kubelet_pleg_relist_duration_seconds_bucket{cluster=\"$cluster\",job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics\",instance=~\"$instance\"}[5m])) by (instance, le))", + "expr": "histogram_quantile(0.99, sum(rate(kubelet_pleg_relist_duration_seconds_bucket{cluster=\"$cluster\",job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics\",instance=~\"$instance\"}[$__rate_interval])) by (instance, le))", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}instance{{`}}`}}", @@ -1688,28 +1688,28 @@ data: "steppedLine": false, "targets": [ { - "expr": "sum(rate(rest_client_requests_total{cluster=\"$cluster\",job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics\", instance=~\"$instance\",code=~\"2..\"}[5m]))", + "expr": "sum(rate(rest_client_requests_total{cluster=\"$cluster\",job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics\", instance=~\"$instance\",code=~\"2..\"}[$__rate_interval]))", "format": "time_series", "intervalFactor": 2, "legendFormat": "2xx", "refId": "A" }, { - "expr": "sum(rate(rest_client_requests_total{cluster=\"$cluster\",job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics\", instance=~\"$instance\",code=~\"3..\"}[5m]))", + "expr": "sum(rate(rest_client_requests_total{cluster=\"$cluster\",job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics\", instance=~\"$instance\",code=~\"3..\"}[$__rate_interval]))", "format": "time_series", "intervalFactor": 2, "legendFormat": "3xx", "refId": "B" }, { - "expr": "sum(rate(rest_client_requests_total{cluster=\"$cluster\",job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics\", instance=~\"$instance\",code=~\"4..\"}[5m]))", + "expr": "sum(rate(rest_client_requests_total{cluster=\"$cluster\",job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics\", instance=~\"$instance\",code=~\"4..\"}[$__rate_interval]))", "format": "time_series", "intervalFactor": 2, "legendFormat": "4xx", "refId": "C" }, { - "expr": "sum(rate(rest_client_requests_total{cluster=\"$cluster\",job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics\", instance=~\"$instance\",code=~\"5..\"}[5m]))", + "expr": "sum(rate(rest_client_requests_total{cluster=\"$cluster\",job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics\", instance=~\"$instance\",code=~\"5..\"}[$__rate_interval]))", "format": "time_series", "intervalFactor": 2, "legendFormat": "5xx", @@ -1804,7 +1804,7 @@ data: "steppedLine": false, "targets": [ { - "expr": "histogram_quantile(0.99, sum(rate(rest_client_request_duration_seconds_bucket{cluster=\"$cluster\",job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics\", instance=~\"$instance\"}[5m])) by (instance, verb, url, le))", + "expr": "histogram_quantile(0.99, sum(rate(rest_client_request_duration_seconds_bucket{cluster=\"$cluster\",job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics\", instance=~\"$instance\"}[$__rate_interval])) by (instance, verb, url, le))", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}instance{{`}}`}} {{`{{`}}verb{{`}}`}} {{`{{`}}url{{`}}`}}", @@ -1994,7 +1994,7 @@ data: "steppedLine": false, "targets": [ { - "expr": "rate(process_cpu_seconds_total{cluster=\"$cluster\",job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics\",instance=~\"$instance\"}[5m])", + "expr": "rate(process_cpu_seconds_total{cluster=\"$cluster\",job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics\",instance=~\"$instance\"}[$__rate_interval])", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}instance{{`}}`}}", @@ -2150,11 +2150,11 @@ data: "list": [ { "current": { - "text": "default", - "value": "default" + "text": "Prometheus", + "value": "Prometheus" }, "hide": 0, - "label": null, + "label": "Data Source", "name": "datasource", "options": [ @@ -2198,13 +2198,13 @@ data: "datasource": "$datasource", "hide": 0, "includeAll": true, - "label": null, + "label": "instance", "multi": false, "name": "instance", "options": [ ], - "query": "label_values(kubelet_runtime_operations_total{cluster=\"$cluster\", job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics\"}, instance)", + "query": "label_values(up{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics\",cluster=\"$cluster\"}, instance)", "refresh": 2, "regex": "", "sort": 1, diff --git a/packages/rancher-project-monitoring/generated-changes/exclude/templates/grafana/dashboards-1.14/node-cluster-rsrc-use.yaml b/packages/rancher-project-monitoring/generated-changes/exclude/templates/grafana/dashboards-1.14/node-cluster-rsrc-use.yaml index 16623196..ad688a39 100644 --- a/packages/rancher-project-monitoring/generated-changes/exclude/templates/grafana/dashboards-1.14/node-cluster-rsrc-use.yaml +++ b/packages/rancher-project-monitoring/generated-changes/exclude/templates/grafana/dashboards-1.14/node-cluster-rsrc-use.yaml @@ -14,7 +14,7 @@ metadata: {{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} labels: {{- if $.Values.grafana.sidecar.dashboards.label }} - {{ $.Values.grafana.sidecar.dashboards.label }}: "1" + {{ $.Values.grafana.sidecar.dashboards.label }}: {{ ternary $.Values.grafana.sidecar.dashboards.labelValue "1" (not (empty $.Values.grafana.sidecar.dashboards.labelValue)) | quote }} {{- end }} app: {{ template "kube-prometheus-stack.name" $ }}-grafana {{ include "kube-prometheus-stack.labels" $ | indent 4 }} @@ -988,7 +988,7 @@ data: "value": "Prometheus" }, "hide": 0, - "label": null, + "label": "Data Source", "name": "datasource", "options": [ diff --git a/packages/rancher-project-monitoring/generated-changes/exclude/templates/grafana/dashboards-1.14/node-rsrc-use.yaml b/packages/rancher-project-monitoring/generated-changes/exclude/templates/grafana/dashboards-1.14/node-rsrc-use.yaml index e488c695..561dcb93 100644 --- a/packages/rancher-project-monitoring/generated-changes/exclude/templates/grafana/dashboards-1.14/node-rsrc-use.yaml +++ b/packages/rancher-project-monitoring/generated-changes/exclude/templates/grafana/dashboards-1.14/node-rsrc-use.yaml @@ -14,7 +14,7 @@ metadata: {{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} labels: {{- if $.Values.grafana.sidecar.dashboards.label }} - {{ $.Values.grafana.sidecar.dashboards.label }}: "1" + {{ $.Values.grafana.sidecar.dashboards.label }}: {{ ternary $.Values.grafana.sidecar.dashboards.labelValue "1" (not (empty $.Values.grafana.sidecar.dashboards.labelValue)) | quote }} {{- end }} app: {{ template "kube-prometheus-stack.name" $ }}-grafana {{ include "kube-prometheus-stack.labels" $ | indent 4 }} @@ -988,7 +988,7 @@ data: "value": "Prometheus" }, "hide": 0, - "label": null, + "label": "Data Source", "name": "datasource", "options": [ diff --git a/packages/rancher-project-monitoring/generated-changes/exclude/templates/grafana/dashboards-1.14/nodes-darwin.yaml b/packages/rancher-project-monitoring/generated-changes/exclude/templates/grafana/dashboards-1.14/nodes-darwin.yaml new file mode 100644 index 00000000..09bc5930 --- /dev/null +++ b/packages/rancher-project-monitoring/generated-changes/exclude/templates/grafana/dashboards-1.14/nodes-darwin.yaml @@ -0,0 +1,1073 @@ +{{- /* +Generated from 'nodes-darwin' from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/grafana-dashboardDefinitions.yaml +Do not change in-place! In order to change this file first read following link: +https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack +*/ -}} +{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} +{{- if and (or .Values.grafana.enabled .Values.grafana.forceDeployDashboards) (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.grafana.defaultDashboardsEnabled }} +apiVersion: v1 +kind: ConfigMap +metadata: + namespace: {{ template "kube-prometheus-stack-grafana.namespace" . }} + name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" $) "nodes-darwin" | trunc 63 | trimSuffix "-" }} + annotations: +{{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} + labels: + {{- if $.Values.grafana.sidecar.dashboards.label }} + {{ $.Values.grafana.sidecar.dashboards.label }}: {{ ternary $.Values.grafana.sidecar.dashboards.labelValue "1" (not (empty $.Values.grafana.sidecar.dashboards.labelValue)) | quote }} + {{- end }} + app: {{ template "kube-prometheus-stack.name" $ }}-grafana +{{ include "kube-prometheus-stack.labels" $ | indent 4 }} +data: + nodes-darwin.json: |- + { + "__inputs": [ + + ], + "__requires": [ + + ], + "annotations": { + "list": [ + + ] + }, + "editable": false, + "gnetId": null, + "graphTooltip": 1, + "hideControls": false, + "id": null, + "links": [ + + ], + "refresh": "30s", + "rows": [ + { + "collapse": false, + "collapsed": false, + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "fillGradient": 0, + "gridPos": { + + }, + "id": 2, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "sideWidth": null, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "(\n (1 - sum without (mode) (rate(node_cpu_seconds_total{job=\"node-exporter\", mode=~\"idle|iowait|steal\", instance=\"$instance\"}[$__rate_interval])))\n/ ignoring(cpu) group_left\n count without (cpu, mode) (node_cpu_seconds_total{job=\"node-exporter\", mode=\"idle\", instance=\"$instance\"})\n)\n", + "format": "time_series", + "intervalFactor": 5, + "legendFormat": "{{`{{`}}cpu{{`}}`}}", + "refId": "A" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "CPU Usage", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "percentunit", + "label": null, + "logBase": 1, + "max": 1, + "min": 0, + "show": true + }, + { + "format": "percentunit", + "label": null, + "logBase": 1, + "max": 1, + "min": 0, + "show": true + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 0, + "fillGradient": 0, + "gridPos": { + + }, + "id": 3, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "sideWidth": null, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "node_load1{job=\"node-exporter\", instance=\"$instance\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "1m load average", + "refId": "A" + }, + { + "expr": "node_load5{job=\"node-exporter\", instance=\"$instance\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "5m load average", + "refId": "B" + }, + { + "expr": "node_load15{job=\"node-exporter\", instance=\"$instance\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "15m load average", + "refId": "C" + }, + { + "expr": "count(node_cpu_seconds_total{job=\"node-exporter\", instance=\"$instance\", mode=\"idle\"})", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "logical cores", + "refId": "D" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Load Average", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "CPU", + "titleSize": "h6", + "type": "row" + }, + { + "collapse": false, + "collapsed": false, + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "fillGradient": 0, + "gridPos": { + + }, + "id": 4, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "sideWidth": null, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 9, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "node_memory_total_bytes{job=\"node-exporter\", instance=\"$instance\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Physical Memory", + "refId": "A" + }, + { + "expr": "(\n node_memory_internal_bytes{job=\"node-exporter\", instance=\"$instance\"} -\n node_memory_purgeable_bytes{job=\"node-exporter\", instance=\"$instance\"} +\n node_memory_wired_bytes{job=\"node-exporter\", instance=\"$instance\"} +\n node_memory_compressed_bytes{job=\"node-exporter\", instance=\"$instance\"}\n)\n", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Memory Used", + "refId": "B" + }, + { + "expr": "(\n node_memory_internal_bytes{job=\"node-exporter\", instance=\"$instance\"} -\n node_memory_purgeable_bytes{job=\"node-exporter\", instance=\"$instance\"}\n)\n", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "App Memory", + "refId": "C" + }, + { + "expr": "node_memory_wired_bytes{job=\"node-exporter\", instance=\"$instance\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Wired Memory", + "refId": "D" + }, + { + "expr": "node_memory_compressed_bytes{job=\"node-exporter\", instance=\"$instance\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Compressed", + "refId": "E" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Memory Usage", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "bytes", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "bytes", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + }, + { + "datasource": "$datasource", + "fieldConfig": { + "defaults": { + "max": 100, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "rgba(50, 172, 45, 0.97)" + }, + { + "color": "rgba(237, 129, 40, 0.89)", + "value": 80 + }, + { + "color": "rgba(245, 54, 54, 0.9)", + "value": 90 + } + ] + }, + "unit": "percent" + } + }, + "gridPos": { + + }, + "id": 5, + "span": 3, + "targets": [ + { + "expr": "(\n (\n avg(node_memory_internal_bytes{job=\"node-exporter\", instance=\"$instance\"}) -\n avg(node_memory_purgeable_bytes{job=\"node-exporter\", instance=\"$instance\"}) +\n avg(node_memory_wired_bytes{job=\"node-exporter\", instance=\"$instance\"}) +\n avg(node_memory_compressed_bytes{job=\"node-exporter\", instance=\"$instance\"})\n ) /\n avg(node_memory_total_bytes{job=\"node-exporter\", instance=\"$instance\"})\n)\n*\n100\n", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "" + } + ], + "title": "Memory Usage", + "transparent": false, + "type": "gauge" + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Memory", + "titleSize": "h6", + "type": "row" + }, + { + "collapse": false, + "collapsed": false, + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 0, + "fillGradient": 0, + "gridPos": { + + }, + "id": 6, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "sideWidth": null, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + { + "alias": "/ read| written/", + "yaxis": 1 + }, + { + "alias": "/ io time/", + "yaxis": 2 + } + ], + "spaceLength": 10, + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "rate(node_disk_read_bytes_total{job=\"node-exporter\", instance=\"$instance\", device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\"}[$__rate_interval])", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{`{{`}}device{{`}}`}} read", + "refId": "A" + }, + { + "expr": "rate(node_disk_written_bytes_total{job=\"node-exporter\", instance=\"$instance\", device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\"}[$__rate_interval])", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{`{{`}}device{{`}}`}} written", + "refId": "B" + }, + { + "expr": "rate(node_disk_io_time_seconds_total{job=\"node-exporter\", instance=\"$instance\", device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\"}[$__rate_interval])", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{`{{`}}device{{`}}`}} io time", + "refId": "C" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Disk I/O", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "percentunit", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + }, + { + "datasource": "$datasource", + "fieldConfig": { + "defaults": { + "custom": { + + }, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "yellow", + "value": 0.8 + }, + { + "color": "red", + "value": 0.9 + } + ] + }, + "unit": "decbytes" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Mounted on" + }, + "properties": [ + { + "id": "custom.width", + "value": 260 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Size" + }, + "properties": [ + { + "id": "custom.width", + "value": 93 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Used" + }, + "properties": [ + { + "id": "custom.width", + "value": 72 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Available" + }, + "properties": [ + { + "id": "custom.width", + "value": 88 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Used, %" + }, + "properties": [ + { + "id": "unit", + "value": "percentunit" + }, + { + "id": "custom.displayMode", + "value": "gradient-gauge" + }, + { + "id": "max", + "value": 1 + }, + { + "id": "min", + "value": 0 + } + ] + } + ] + }, + "gridPos": { + + }, + "id": 7, + "span": 6, + "targets": [ + { + "expr": "max by (mountpoint) (node_filesystem_size_bytes{job=\"node-exporter\", instance=\"$instance\", fstype!=\"\"})\n", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "" + }, + { + "expr": "max by (mountpoint) (node_filesystem_avail_bytes{job=\"node-exporter\", instance=\"$instance\", fstype!=\"\"})\n", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "" + } + ], + "title": "Disk Space Usage", + "transformations": [ + { + "id": "groupBy", + "options": { + "fields": { + "Value #A": { + "aggregations": [ + "lastNotNull" + ], + "operation": "aggregate" + }, + "Value #B": { + "aggregations": [ + "lastNotNull" + ], + "operation": "aggregate" + }, + "mountpoint": { + "aggregations": [ + + ], + "operation": "groupby" + } + } + } + }, + { + "id": "merge", + "options": { + + } + }, + { + "id": "calculateField", + "options": { + "alias": "Used", + "binary": { + "left": "Value #A (lastNotNull)", + "operator": "-", + "reducer": "sum", + "right": "Value #B (lastNotNull)" + }, + "mode": "binary", + "reduce": { + "reducer": "sum" + } + } + }, + { + "id": "calculateField", + "options": { + "alias": "Used, %", + "binary": { + "left": "Used", + "operator": "/", + "reducer": "sum", + "right": "Value #A (lastNotNull)" + }, + "mode": "binary", + "reduce": { + "reducer": "sum" + } + } + }, + { + "id": "organize", + "options": { + "excludeByName": { + + }, + "indexByName": { + + }, + "renameByName": { + "Value #A (lastNotNull)": "Size", + "Value #B (lastNotNull)": "Available", + "mountpoint": "Mounted on" + } + } + }, + { + "id": "sortBy", + "options": { + "fields": { + + }, + "sort": [ + { + "field": "Mounted on" + } + ] + } + } + ], + "transparent": false, + "type": "table" + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Disk", + "titleSize": "h6", + "type": "row" + }, + { + "collapse": false, + "collapsed": false, + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "description": "Network received (bits/s)", + "fill": 0, + "fillGradient": 0, + "gridPos": { + + }, + "id": 8, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "sideWidth": null, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "rate(node_network_receive_bytes_total{job=\"node-exporter\", instance=\"$instance\", device!=\"lo\"}[$__rate_interval]) * 8", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{`{{`}}device{{`}}`}}", + "refId": "A" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Network Received", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "description": "Network transmitted (bits/s)", + "fill": 0, + "fillGradient": 0, + "gridPos": { + + }, + "id": 9, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "sideWidth": null, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "rate(node_network_transmit_bytes_total{job=\"node-exporter\", instance=\"$instance\", device!=\"lo\"}[$__rate_interval]) * 8", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{`{{`}}device{{`}}`}}", + "refId": "A" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Network Transmitted", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Network", + "titleSize": "h6", + "type": "row" + } + ], + "schemaVersion": 14, + "style": "dark", + "tags": [ + "node-exporter-mixin" + ], + "templating": { + "list": [ + { + "current": { + "text": "Prometheus", + "value": "Prometheus" + }, + "hide": 0, + "label": "Data Source", + "name": "datasource", + "options": [ + + ], + "query": "prometheus", + "refresh": 1, + "regex": "", + "type": "datasource" + }, + { + "allValue": null, + "current": { + + }, + "datasource": "$datasource", + "hide": 0, + "includeAll": false, + "label": "Instance", + "multi": false, + "name": "instance", + "options": [ + + ], + "query": "label_values(node_uname_info{job=\"node-exporter\", sysname=\"Darwin\"}, instance)", + "refresh": 2, + "regex": "", + "sort": 0, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "query", + "useTags": false + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + "timezone": "{{ .Values.grafana.defaultDashboardsTimezone }}", + "title": "Node Exporter / MacOS", + "version": 0 + } +{{- end }} \ No newline at end of file diff --git a/packages/rancher-project-monitoring/generated-changes/exclude/templates/grafana/dashboards-1.14/nodes.yaml b/packages/rancher-project-monitoring/generated-changes/exclude/templates/grafana/dashboards-1.14/nodes.yaml index 80eb79fc..adbe3f02 100644 --- a/packages/rancher-project-monitoring/generated-changes/exclude/templates/grafana/dashboards-1.14/nodes.yaml +++ b/packages/rancher-project-monitoring/generated-changes/exclude/templates/grafana/dashboards-1.14/nodes.yaml @@ -4,7 +4,7 @@ Do not change in-place! In order to change this file first read following link: https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack */ -}} {{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} -{{- if and (or .Values.grafana.enabled .Values.grafana.forceDeployDashboards) (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.grafana.defaultDashboardsEnabled }} +{{- if and (or .Values.grafana.enabled .Values.grafana.forceDeployDashboards) (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.grafana.defaultDashboardsEnabled .Values.nodeExporter.enabled }} apiVersion: v1 kind: ConfigMap metadata: @@ -14,7 +14,7 @@ metadata: {{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} labels: {{- if $.Values.grafana.sidecar.dashboards.label }} - {{ $.Values.grafana.sidecar.dashboards.label }}: "1" + {{ $.Values.grafana.sidecar.dashboards.label }}: {{ ternary $.Values.grafana.sidecar.dashboards.labelValue "1" (not (empty $.Values.grafana.sidecar.dashboards.labelValue)) | quote }} {{- end }} app: {{ template "kube-prometheus-stack.name" $ }}-grafana {{ include "kube-prometheus-stack.labels" $ | indent 4 }} @@ -92,7 +92,7 @@ data: "steppedLine": false, "targets": [ { - "expr": "(\n (1 - rate(node_cpu_seconds_total{job=\"node-exporter\", mode=\"idle\", instance=\"$instance\"}[$__rate_interval]))\n/ ignoring(cpu) group_left\n count without (cpu)( node_cpu_seconds_total{job=\"node-exporter\", mode=\"idle\", instance=\"$instance\"})\n)\n", + "expr": "(\n (1 - sum without (mode) (rate(node_cpu_seconds_total{job=\"node-exporter\", mode=~\"idle|iowait|steal\", instance=\"$instance\"}[$__rate_interval])))\n/ ignoring(cpu) group_left\n count without (cpu, mode) (node_cpu_seconds_total{job=\"node-exporter\", mode=\"idle\", instance=\"$instance\"})\n)\n", "format": "time_series", "intervalFactor": 5, "legendFormat": "{{`{{`}}cpu{{`}}`}}", @@ -257,8 +257,8 @@ data: "repeat": null, "repeatIteration": null, "repeatRowId": null, - "showTitle": false, - "title": "Dashboard Row", + "showTitle": true, + "title": "CPU", "titleSize": "h6", "type": "row" }, @@ -381,92 +381,53 @@ data: ] }, { - "cacheTimeout": null, - "colorBackground": false, - "colorValue": false, - "colors": [ - "rgba(50, 172, 45, 0.97)", - "rgba(237, 129, 40, 0.89)", - "rgba(245, 54, 54, 0.9)" - ], "datasource": "$datasource", - "format": "percent", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": true, - "thresholdLabels": false, - "thresholdMarkers": true + "fieldConfig": { + "defaults": { + "max": 100, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "rgba(50, 172, 45, 0.97)" + }, + { + "color": "rgba(237, 129, 40, 0.89)", + "value": 80 + }, + { + "color": "rgba(245, 54, 54, 0.9)", + "value": 90 + } + ] + }, + "unit": "percent" + } }, "gridPos": { }, "id": 5, - "interval": null, - "links": [ - - ], - "mappingType": 1, - "mappingTypes": [ - { - "name": "value to text", - "value": 1 - }, - { - "name": "range to text", - "value": 2 - } - ], - "maxDataPoints": 100, - "nullPointMode": "connected", - "nullText": null, - "postfix": "", - "postfixFontSize": "50%", - "prefix": "", - "prefixFontSize": "50%", - "rangeMaps": [ - { - "from": "null", - "text": "N/A", - "to": "null" - } - ], "span": 3, - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": false, - "lineColor": "rgb(31, 120, 193)", - "show": false - }, - "tableColumn": "", "targets": [ { - "expr": "100 -\n(\n avg(node_memory_MemAvailable_bytes{job=\"node-exporter\", instance=\"$instance\"})\n/\n avg(node_memory_MemTotal_bytes{job=\"node-exporter\", instance=\"$instance\"})\n* 100\n)\n", + "expr": "100 -\n(\n avg(node_memory_MemAvailable_bytes{job=\"node-exporter\", instance=\"$instance\"}) /\n avg(node_memory_MemTotal_bytes{job=\"node-exporter\", instance=\"$instance\"})\n* 100\n)\n", "format": "time_series", "intervalFactor": 2, - "legendFormat": "", - "refId": "A" + "legendFormat": "" } ], - "thresholds": "80, 90", "title": "Memory Usage", - "type": "singlestat", - "valueFontSize": "80%", - "valueMaps": [ - { - "op": "=", - "text": "N/A", - "value": "null" - } - ], - "valueName": "current" + "transparent": false, + "type": "gauge" } ], "repeat": null, "repeatIteration": null, "repeatRowId": null, - "showTitle": false, - "title": "Dashboard Row", + "showTitle": true, + "title": "Memory", "titleSize": "h6", "type": "row" }, @@ -527,23 +488,23 @@ data: "steppedLine": false, "targets": [ { - "expr": "rate(node_disk_read_bytes_total{job=\"node-exporter\", instance=\"$instance\", device=~\"mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+\"}[$__rate_interval])", + "expr": "rate(node_disk_read_bytes_total{job=\"node-exporter\", instance=\"$instance\", device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\"}[$__rate_interval])", "format": "time_series", - "intervalFactor": 2, + "intervalFactor": 1, "legendFormat": "{{`{{`}}device{{`}}`}} read", "refId": "A" }, { - "expr": "rate(node_disk_written_bytes_total{job=\"node-exporter\", instance=\"$instance\", device=~\"mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+\"}[$__rate_interval])", + "expr": "rate(node_disk_written_bytes_total{job=\"node-exporter\", instance=\"$instance\", device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\"}[$__rate_interval])", "format": "time_series", - "intervalFactor": 2, + "intervalFactor": 1, "legendFormat": "{{`{{`}}device{{`}}`}} written", "refId": "B" }, { - "expr": "rate(node_disk_io_time_seconds_total{job=\"node-exporter\", instance=\"$instance\", device=~\"mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+\"}[$__rate_interval])", + "expr": "rate(node_disk_io_time_seconds_total{job=\"node-exporter\", instance=\"$instance\", device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\"}[$__rate_interval])", "format": "time_series", - "intervalFactor": 2, + "intervalFactor": 1, "legendFormat": "{{`{{`}}device{{`}}`}} io time", "refId": "C" } @@ -571,7 +532,7 @@ data: }, "yaxes": [ { - "format": "bytes", + "format": "Bps", "label": null, "logBase": 1, "max": null, @@ -579,7 +540,7 @@ data: "show": true }, { - "format": "s", + "format": "percentunit", "label": null, "logBase": 1, "max": null, @@ -589,118 +550,230 @@ data: ] }, { - "aliasColors": { + "datasource": "$datasource", + "fieldConfig": { + "defaults": { + "custom": { + }, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "yellow", + "value": 0.8 + }, + { + "color": "red", + "value": 0.9 + } + ] + }, + "unit": "decbytes" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Mounted on" + }, + "properties": [ + { + "id": "custom.width", + "value": 260 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Size" + }, + "properties": [ + { + "id": "custom.width", + "value": 93 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Used" + }, + "properties": [ + { + "id": "custom.width", + "value": 72 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Available" + }, + "properties": [ + { + "id": "custom.width", + "value": 88 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Used, %" + }, + "properties": [ + { + "id": "unit", + "value": "percentunit" + }, + { + "id": "custom.displayMode", + "value": "gradient-gauge" + }, + { + "id": "max", + "value": 1 + }, + { + "id": "min", + "value": 0 + } + ] + } + ] }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "fillGradient": 0, "gridPos": { }, "id": 7, - "legend": { - "alignAsTable": false, - "avg": false, - "current": false, - "max": false, - "min": false, - "rightSide": false, - "show": true, - "sideWidth": null, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [ - - ], - "nullPointMode": "null", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "repeat": null, - "seriesOverrides": [ - { - "alias": "used", - "color": "#E0B400" - }, - { - "alias": "available", - "color": "#73BF69" - } - ], - "spaceLength": 10, "span": 6, - "stack": true, - "steppedLine": false, "targets": [ { - "expr": "sum(\n max by (device) (\n node_filesystem_size_bytes{job=\"node-exporter\", instance=\"$instance\", fstype!=\"\"}\n -\n node_filesystem_avail_bytes{job=\"node-exporter\", instance=\"$instance\", fstype!=\"\"}\n )\n)\n", - "format": "time_series", + "expr": "max by (mountpoint) (node_filesystem_size_bytes{job=\"node-exporter\", instance=\"$instance\", fstype!=\"\"})\n", + "format": "table", + "instant": true, "intervalFactor": 2, - "legendFormat": "used", - "refId": "A" + "legendFormat": "" }, { - "expr": "sum(\n max by (device) (\n node_filesystem_avail_bytes{job=\"node-exporter\", instance=\"$instance\", fstype!=\"\"}\n )\n)\n", - "format": "time_series", + "expr": "max by (mountpoint) (node_filesystem_avail_bytes{job=\"node-exporter\", instance=\"$instance\", fstype!=\"\"})\n", + "format": "table", + "instant": true, "intervalFactor": 2, - "legendFormat": "available", - "refId": "B" + "legendFormat": "" } ], - "thresholds": [ - - ], - "timeFrom": null, - "timeShift": null, "title": "Disk Space Usage", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ + "transformations": [ + { + "id": "groupBy", + "options": { + "fields": { + "Value #A": { + "aggregations": [ + "lastNotNull" + ], + "operation": "aggregate" + }, + "Value #B": { + "aggregations": [ + "lastNotNull" + ], + "operation": "aggregate" + }, + "mountpoint": { + "aggregations": [ - ] - }, - "yaxes": [ + ], + "operation": "groupby" + } + } + } + }, { - "format": "bytes", - "label": null, - "logBase": 1, - "max": null, - "min": 0, - "show": true + "id": "merge", + "options": { + + } }, { - "format": "bytes", - "label": null, - "logBase": 1, - "max": null, - "min": 0, - "show": true + "id": "calculateField", + "options": { + "alias": "Used", + "binary": { + "left": "Value #A (lastNotNull)", + "operator": "-", + "reducer": "sum", + "right": "Value #B (lastNotNull)" + }, + "mode": "binary", + "reduce": { + "reducer": "sum" + } + } + }, + { + "id": "calculateField", + "options": { + "alias": "Used, %", + "binary": { + "left": "Used", + "operator": "/", + "reducer": "sum", + "right": "Value #A (lastNotNull)" + }, + "mode": "binary", + "reduce": { + "reducer": "sum" + } + } + }, + { + "id": "organize", + "options": { + "excludeByName": { + + }, + "indexByName": { + + }, + "renameByName": { + "Value #A (lastNotNull)": "Size", + "Value #B (lastNotNull)": "Available", + "mountpoint": "Mounted on" + } + } + }, + { + "id": "sortBy", + "options": { + "fields": { + + }, + "sort": [ + { + "field": "Mounted on" + } + ] + } } - ] + ], + "transparent": false, + "type": "table" } ], "repeat": null, "repeatIteration": null, "repeatRowId": null, - "showTitle": false, - "title": "Dashboard Row", + "showTitle": true, + "title": "Disk", "titleSize": "h6", "type": "row" }, @@ -716,6 +789,7 @@ data: "dashLength": 10, "dashes": false, "datasource": "$datasource", + "description": "Network received (bits/s)", "fill": 0, "fillGradient": 0, "gridPos": { @@ -754,9 +828,9 @@ data: "steppedLine": false, "targets": [ { - "expr": "rate(node_network_receive_bytes_total{job=\"node-exporter\", instance=\"$instance\", device!=\"lo\"}[$__rate_interval])", + "expr": "rate(node_network_receive_bytes_total{job=\"node-exporter\", instance=\"$instance\", device!=\"lo\"}[$__rate_interval]) * 8", "format": "time_series", - "intervalFactor": 2, + "intervalFactor": 1, "legendFormat": "{{`{{`}}device{{`}}`}}", "refId": "A" } @@ -784,7 +858,7 @@ data: }, "yaxes": [ { - "format": "bytes", + "format": "bps", "label": null, "logBase": 1, "max": null, @@ -792,7 +866,7 @@ data: "show": true }, { - "format": "bytes", + "format": "bps", "label": null, "logBase": 1, "max": null, @@ -809,6 +883,7 @@ data: "dashLength": 10, "dashes": false, "datasource": "$datasource", + "description": "Network transmitted (bits/s)", "fill": 0, "fillGradient": 0, "gridPos": { @@ -847,9 +922,9 @@ data: "steppedLine": false, "targets": [ { - "expr": "rate(node_network_transmit_bytes_total{job=\"node-exporter\", instance=\"$instance\", device!=\"lo\"}[$__rate_interval])", + "expr": "rate(node_network_transmit_bytes_total{job=\"node-exporter\", instance=\"$instance\", device!=\"lo\"}[$__rate_interval]) * 8", "format": "time_series", - "intervalFactor": 2, + "intervalFactor": 1, "legendFormat": "{{`{{`}}device{{`}}`}}", "refId": "A" } @@ -877,7 +952,7 @@ data: }, "yaxes": [ { - "format": "bytes", + "format": "bps", "label": null, "logBase": 1, "max": null, @@ -885,7 +960,7 @@ data: "show": true }, { - "format": "bytes", + "format": "bps", "label": null, "logBase": 1, "max": null, @@ -898,8 +973,8 @@ data: "repeat": null, "repeatIteration": null, "repeatRowId": null, - "showTitle": false, - "title": "Dashboard Row", + "showTitle": true, + "title": "Network", "titleSize": "h6", "type": "row" } @@ -917,7 +992,7 @@ data: "value": "Prometheus" }, "hide": 0, - "label": null, + "label": "Data Source", "name": "datasource", "options": [ @@ -935,13 +1010,13 @@ data: "datasource": "$datasource", "hide": 0, "includeAll": false, - "label": null, + "label": "Instance", "multi": false, "name": "instance", "options": [ ], - "query": "label_values(node_exporter_build_info{job=\"node-exporter\"}, instance)", + "query": "label_values(node_uname_info{job=\"node-exporter\", sysname!=\"Darwin\"}, instance)", "refresh": 2, "regex": "", "sort": 0, diff --git a/packages/rancher-project-monitoring/generated-changes/exclude/templates/grafana/dashboards-1.14/prometheus-remote-write.yaml b/packages/rancher-project-monitoring/generated-changes/exclude/templates/grafana/dashboards-1.14/prometheus-remote-write.yaml index a5eb1644..08279580 100644 --- a/packages/rancher-project-monitoring/generated-changes/exclude/templates/grafana/dashboards-1.14/prometheus-remote-write.yaml +++ b/packages/rancher-project-monitoring/generated-changes/exclude/templates/grafana/dashboards-1.14/prometheus-remote-write.yaml @@ -14,7 +14,7 @@ metadata: {{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} labels: {{- if $.Values.grafana.sidecar.dashboards.label }} - {{ $.Values.grafana.sidecar.dashboards.label }}: "1" + {{ $.Values.grafana.sidecar.dashboards.label }}: {{ ternary $.Values.grafana.sidecar.dashboards.labelValue "1" (not (empty $.Values.grafana.sidecar.dashboards.labelValue)) | quote }} {{- end }} app: {{ template "kube-prometheus-stack.name" $ }}-grafana {{ include "kube-prometheus-stack.labels" $ | indent 4 }} @@ -1525,8 +1525,12 @@ data: "templating": { "list": [ { + "current": { + "text": "Prometheus", + "value": "Prometheus" + }, "hide": 0, - "label": null, + "label": "Data Source", "name": "datasource", "options": [ @@ -1551,15 +1555,15 @@ data: } }, "datasource": "$datasource", - "hide": 0, + "hide": {{ if .Values.grafana.sidecar.dashboards.multicluster.global.enabled }}0{{ else }}2{{ end }}, "includeAll": true, "label": null, "multi": false, - "name": "instance", + "name": "cluster", "options": [ ], - "query": "label_values(prometheus_build_info, instance)", + "query": "label_values(kube_pod_container_info{image=~\".*prometheus.*\"}, cluster)", "refresh": 2, "regex": "", "sort": 0, @@ -1586,15 +1590,15 @@ data: } }, "datasource": "$datasource", - "hide": {{ if .Values.grafana.sidecar.dashboards.multicluster.global.enabled }}0{{ else }}2{{ end }}, + "hide": 0, "includeAll": true, "label": null, "multi": false, - "name": "cluster", + "name": "instance", "options": [ ], - "query": "label_values(kube_pod_container_info{image=~\".*prometheus.*\"}, cluster)", + "query": "label_values(prometheus_build_info{cluster=~\"$cluster\"}, instance)", "refresh": 2, "regex": "", "sort": 0, diff --git a/packages/rancher-project-monitoring/generated-changes/exclude/templates/grafana/dashboards-1.14/proxy.yaml b/packages/rancher-project-monitoring/generated-changes/exclude/templates/grafana/dashboards-1.14/proxy.yaml index e5571c40..77d4fdf9 100644 --- a/packages/rancher-project-monitoring/generated-changes/exclude/templates/grafana/dashboards-1.14/proxy.yaml +++ b/packages/rancher-project-monitoring/generated-changes/exclude/templates/grafana/dashboards-1.14/proxy.yaml @@ -15,7 +15,7 @@ metadata: {{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} labels: {{- if $.Values.grafana.sidecar.dashboards.label }} - {{ $.Values.grafana.sidecar.dashboards.label }}: "1" + {{ $.Values.grafana.sidecar.dashboards.label }}: {{ ternary $.Values.grafana.sidecar.dashboards.labelValue "1" (not (empty $.Values.grafana.sidecar.dashboards.labelValue)) | quote }} {{- end }} app: {{ template "kube-prometheus-stack.name" $ }}-grafana {{ include "kube-prometheus-stack.labels" $ | indent 4 }} @@ -69,7 +69,11 @@ data: }, "id": 2, - "interval": null, + "interval": "1m", + "legend": { + "alignAsTable": true, + "rightSide": true + }, "links": [ ], @@ -149,13 +153,14 @@ data: }, "id": 3, + "interval": "1m", "legend": { - "alignAsTable": false, + "alignAsTable": true, "avg": false, "current": false, "max": false, "min": false, - "rightSide": false, + "rightSide": true, "show": true, "sideWidth": null, "total": false, @@ -181,7 +186,7 @@ data: "steppedLine": false, "targets": [ { - "expr": "sum(rate(kubeproxy_sync_proxy_rules_duration_seconds_count{cluster=\"$cluster\", job=\"{{ include "exporter.kubeProxy.jobName" . }}\", instance=~\"$instance\"}[5m]))", + "expr": "sum(rate(kubeproxy_sync_proxy_rules_duration_seconds_count{cluster=\"$cluster\", job=\"{{ include "exporter.kubeProxy.jobName" . }}\", instance=~\"$instance\"}[$__rate_interval]))", "format": "time_series", "intervalFactor": 2, "legendFormat": "rate", @@ -242,6 +247,7 @@ data: }, "id": 4, + "interval": "1m", "legend": { "alignAsTable": true, "avg": false, @@ -274,7 +280,7 @@ data: "steppedLine": false, "targets": [ { - "expr": "histogram_quantile(0.99,rate(kubeproxy_sync_proxy_rules_duration_seconds_bucket{cluster=\"$cluster\", job=\"{{ include "exporter.kubeProxy.jobName" . }}\", instance=~\"$instance\"}[5m]))", + "expr": "histogram_quantile(0.99,rate(kubeproxy_sync_proxy_rules_duration_seconds_bucket{cluster=\"$cluster\", job=\"{{ include "exporter.kubeProxy.jobName" . }}\", instance=~\"$instance\"}[$__rate_interval]))", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}instance{{`}}`}}", @@ -348,13 +354,14 @@ data: }, "id": 5, + "interval": "1m", "legend": { - "alignAsTable": false, + "alignAsTable": true, "avg": false, "current": false, "max": false, "min": false, - "rightSide": false, + "rightSide": true, "show": true, "sideWidth": null, "total": false, @@ -380,7 +387,7 @@ data: "steppedLine": false, "targets": [ { - "expr": "sum(rate(kubeproxy_network_programming_duration_seconds_count{cluster=\"$cluster\", job=\"{{ include "exporter.kubeProxy.jobName" . }}\", instance=~\"$instance\"}[5m]))", + "expr": "sum(rate(kubeproxy_network_programming_duration_seconds_count{cluster=\"$cluster\", job=\"{{ include "exporter.kubeProxy.jobName" . }}\", instance=~\"$instance\"}[$__rate_interval]))", "format": "time_series", "intervalFactor": 2, "legendFormat": "rate", @@ -441,6 +448,7 @@ data: }, "id": 6, + "interval": "1m", "legend": { "alignAsTable": true, "avg": false, @@ -473,7 +481,7 @@ data: "steppedLine": false, "targets": [ { - "expr": "histogram_quantile(0.99, sum(rate(kubeproxy_network_programming_duration_seconds_bucket{cluster=\"$cluster\", job=\"{{ include "exporter.kubeProxy.jobName" . }}\", instance=~\"$instance\"}[5m])) by (instance, le))", + "expr": "histogram_quantile(0.99, sum(rate(kubeproxy_network_programming_duration_seconds_bucket{cluster=\"$cluster\", job=\"{{ include "exporter.kubeProxy.jobName" . }}\", instance=~\"$instance\"}[$__rate_interval])) by (instance, le))", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}instance{{`}}`}}", @@ -547,13 +555,14 @@ data: }, "id": 7, + "interval": "1m", "legend": { - "alignAsTable": false, + "alignAsTable": true, "avg": false, "current": false, "max": false, "min": false, - "rightSide": false, + "rightSide": true, "show": true, "sideWidth": null, "total": false, @@ -579,28 +588,28 @@ data: "steppedLine": false, "targets": [ { - "expr": "sum(rate(rest_client_requests_total{cluster=\"$cluster\", job=\"{{ include "exporter.kubeProxy.jobName" . }}\", instance=~\"$instance\",code=~\"2..\"}[5m]))", + "expr": "sum(rate(rest_client_requests_total{cluster=\"$cluster\", job=\"{{ include "exporter.kubeProxy.jobName" . }}\", instance=~\"$instance\",code=~\"2..\"}[$__rate_interval]))", "format": "time_series", "intervalFactor": 2, "legendFormat": "2xx", "refId": "A" }, { - "expr": "sum(rate(rest_client_requests_total{cluster=\"$cluster\", job=\"{{ include "exporter.kubeProxy.jobName" . }}\", instance=~\"$instance\",code=~\"3..\"}[5m]))", + "expr": "sum(rate(rest_client_requests_total{cluster=\"$cluster\", job=\"{{ include "exporter.kubeProxy.jobName" . }}\", instance=~\"$instance\",code=~\"3..\"}[$__rate_interval]))", "format": "time_series", "intervalFactor": 2, "legendFormat": "3xx", "refId": "B" }, { - "expr": "sum(rate(rest_client_requests_total{cluster=\"$cluster\", job=\"{{ include "exporter.kubeProxy.jobName" . }}\", instance=~\"$instance\",code=~\"4..\"}[5m]))", + "expr": "sum(rate(rest_client_requests_total{cluster=\"$cluster\", job=\"{{ include "exporter.kubeProxy.jobName" . }}\", instance=~\"$instance\",code=~\"4..\"}[$__rate_interval]))", "format": "time_series", "intervalFactor": 2, "legendFormat": "4xx", "refId": "C" }, { - "expr": "sum(rate(rest_client_requests_total{cluster=\"$cluster\", job=\"{{ include "exporter.kubeProxy.jobName" . }}\", instance=~\"$instance\",code=~\"5..\"}[5m]))", + "expr": "sum(rate(rest_client_requests_total{cluster=\"$cluster\", job=\"{{ include "exporter.kubeProxy.jobName" . }}\", instance=~\"$instance\",code=~\"5..\"}[$__rate_interval]))", "format": "time_series", "intervalFactor": 2, "legendFormat": "5xx", @@ -661,13 +670,14 @@ data: }, "id": 8, + "interval": "1m", "legend": { - "alignAsTable": false, + "alignAsTable": true, "avg": false, "current": false, "max": false, "min": false, - "rightSide": false, + "rightSide": true, "show": true, "sideWidth": null, "total": false, @@ -693,7 +703,7 @@ data: "steppedLine": false, "targets": [ { - "expr": "histogram_quantile(0.99, sum(rate(rest_client_request_duration_seconds_bucket{cluster=\"$cluster\", job=\"{{ include "exporter.kubeProxy.jobName" . }}\",instance=~\"$instance\",verb=\"POST\"}[5m])) by (verb, url, le))", + "expr": "histogram_quantile(0.99, sum(rate(rest_client_request_duration_seconds_bucket{cluster=\"$cluster\", job=\"{{ include "exporter.kubeProxy.jobName" . }}\",instance=~\"$instance\",verb=\"POST\"}[$__rate_interval])) by (verb, url, le))", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}verb{{`}}`}} {{`{{`}}url{{`}}`}}", @@ -767,6 +777,7 @@ data: }, "id": 9, + "interval": "1m", "legend": { "alignAsTable": true, "avg": false, @@ -799,7 +810,7 @@ data: "steppedLine": false, "targets": [ { - "expr": "histogram_quantile(0.99, sum(rate(rest_client_request_duration_seconds_bucket{cluster=\"$cluster\", job=\"{{ include "exporter.kubeProxy.jobName" . }}\", instance=~\"$instance\", verb=\"GET\"}[5m])) by (verb, url, le))", + "expr": "histogram_quantile(0.99, sum(rate(rest_client_request_duration_seconds_bucket{cluster=\"$cluster\", job=\"{{ include "exporter.kubeProxy.jobName" . }}\", instance=~\"$instance\", verb=\"GET\"}[$__rate_interval])) by (verb, url, le))", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}verb{{`}}`}} {{`{{`}}url{{`}}`}}", @@ -873,13 +884,14 @@ data: }, "id": 10, + "interval": "1m", "legend": { - "alignAsTable": false, + "alignAsTable": true, "avg": false, "current": false, "max": false, "min": false, - "rightSide": false, + "rightSide": true, "show": true, "sideWidth": null, "total": false, @@ -966,13 +978,14 @@ data: }, "id": 11, + "interval": "1m", "legend": { - "alignAsTable": false, + "alignAsTable": true, "avg": false, "current": false, "max": false, "min": false, - "rightSide": false, + "rightSide": true, "show": true, "sideWidth": null, "total": false, @@ -998,7 +1011,7 @@ data: "steppedLine": false, "targets": [ { - "expr": "rate(process_cpu_seconds_total{cluster=\"$cluster\", job=\"{{ include "exporter.kubeProxy.jobName" . }}\",instance=~\"$instance\"}[5m])", + "expr": "rate(process_cpu_seconds_total{cluster=\"$cluster\", job=\"{{ include "exporter.kubeProxy.jobName" . }}\",instance=~\"$instance\"}[$__rate_interval])", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}instance{{`}}`}}", @@ -1059,13 +1072,14 @@ data: }, "id": 12, + "interval": "1m", "legend": { - "alignAsTable": false, + "alignAsTable": true, "avg": false, "current": false, "max": false, "min": false, - "rightSide": false, + "rightSide": true, "show": true, "sideWidth": null, "total": false, @@ -1157,11 +1171,11 @@ data: "list": [ { "current": { - "text": "default", - "value": "default" + "text": "Prometheus", + "value": "Prometheus" }, "hide": 0, - "label": null, + "label": "Data Source", "name": "datasource", "options": [ @@ -1185,7 +1199,7 @@ data: "options": [ ], - "query": "label_values(kube_pod_info, cluster)", + "query": "label_values(up{job=\"{{ include "exporter.kubeProxy.jobName" . }}\"}, cluster)", "refresh": 2, "regex": "", "sort": 1, @@ -1211,7 +1225,7 @@ data: "options": [ ], - "query": "label_values(kubeproxy_network_programming_duration_seconds_bucket{cluster=\"$cluster\", job=\"{{ include "exporter.kubeProxy.jobName" . }}\"}, instance)", + "query": "label_values(up{job=\"{{ include "exporter.kubeProxy.jobName" . }}\", cluster=\"$cluster\", job=\"{{ include "exporter.kubeProxy.jobName" . }}\"}, instance)", "refresh": 2, "regex": "", "sort": 1, diff --git a/packages/rancher-project-monitoring/generated-changes/exclude/templates/grafana/dashboards-1.14/scheduler.yaml b/packages/rancher-project-monitoring/generated-changes/exclude/templates/grafana/dashboards-1.14/scheduler.yaml index 1132d193..b71a9d4e 100644 --- a/packages/rancher-project-monitoring/generated-changes/exclude/templates/grafana/dashboards-1.14/scheduler.yaml +++ b/packages/rancher-project-monitoring/generated-changes/exclude/templates/grafana/dashboards-1.14/scheduler.yaml @@ -15,7 +15,7 @@ metadata: {{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} labels: {{- if $.Values.grafana.sidecar.dashboards.label }} - {{ $.Values.grafana.sidecar.dashboards.label }}: "1" + {{ $.Values.grafana.sidecar.dashboards.label }}: {{ ternary $.Values.grafana.sidecar.dashboards.labelValue "1" (not (empty $.Values.grafana.sidecar.dashboards.labelValue)) | quote }} {{- end }} app: {{ template "kube-prometheus-stack.name" $ }}-grafana {{ include "kube-prometheus-stack.labels" $ | indent 4 }} @@ -69,7 +69,11 @@ data: }, "id": 2, - "interval": null, + "interval": "1m", + "legend": { + "alignAsTable": true, + "rightSide": true + }, "links": [ ], @@ -149,6 +153,7 @@ data: }, "id": 3, + "interval": "1m", "legend": { "alignAsTable": true, "avg": false, @@ -181,28 +186,28 @@ data: "steppedLine": false, "targets": [ { - "expr": "sum(rate(scheduler_e2e_scheduling_duration_seconds_count{cluster=\"$cluster\", job=\"{{ include "exporter.kubeScheduler.jobName" . }}\", instance=~\"$instance\"}[5m])) by (cluster, instance)", + "expr": "sum(rate(scheduler_e2e_scheduling_duration_seconds_count{cluster=\"$cluster\", job=\"{{ include "exporter.kubeScheduler.jobName" . }}\", instance=~\"$instance\"}[$__rate_interval])) by (cluster, instance)", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}cluster{{`}}`}} {{`{{`}}instance{{`}}`}} e2e", "refId": "A" }, { - "expr": "sum(rate(scheduler_binding_duration_seconds_count{cluster=\"$cluster\", job=\"{{ include "exporter.kubeScheduler.jobName" . }}\", instance=~\"$instance\"}[5m])) by (cluster, instance)", + "expr": "sum(rate(scheduler_binding_duration_seconds_count{cluster=\"$cluster\", job=\"{{ include "exporter.kubeScheduler.jobName" . }}\", instance=~\"$instance\"}[$__rate_interval])) by (cluster, instance)", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}cluster{{`}}`}} {{`{{`}}instance{{`}}`}} binding", "refId": "B" }, { - "expr": "sum(rate(scheduler_scheduling_algorithm_duration_seconds_count{cluster=\"$cluster\", job=\"{{ include "exporter.kubeScheduler.jobName" . }}\", instance=~\"$instance\"}[5m])) by (cluster, instance)", + "expr": "sum(rate(scheduler_scheduling_algorithm_duration_seconds_count{cluster=\"$cluster\", job=\"{{ include "exporter.kubeScheduler.jobName" . }}\", instance=~\"$instance\"}[$__rate_interval])) by (cluster, instance)", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}cluster{{`}}`}} {{`{{`}}instance{{`}}`}} scheduling algorithm", "refId": "C" }, { - "expr": "sum(rate(scheduler_volume_scheduling_duration_seconds_count{cluster=\"$cluster\", job=\"{{ include "exporter.kubeScheduler.jobName" . }}\", instance=~\"$instance\"}[5m])) by (cluster, instance)", + "expr": "sum(rate(scheduler_volume_scheduling_duration_seconds_count{cluster=\"$cluster\", job=\"{{ include "exporter.kubeScheduler.jobName" . }}\", instance=~\"$instance\"}[$__rate_interval])) by (cluster, instance)", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}cluster{{`}}`}} {{`{{`}}instance{{`}}`}} volume", @@ -263,6 +268,7 @@ data: }, "id": 4, + "interval": "1m", "legend": { "alignAsTable": true, "avg": false, @@ -295,28 +301,28 @@ data: "steppedLine": false, "targets": [ { - "expr": "histogram_quantile(0.99, sum(rate(scheduler_e2e_scheduling_duration_seconds_bucket{cluster=\"$cluster\", job=\"{{ include "exporter.kubeScheduler.jobName" . }}\",instance=~\"$instance\"}[5m])) by (cluster, instance, le))", + "expr": "histogram_quantile(0.99, sum(rate(scheduler_e2e_scheduling_duration_seconds_bucket{cluster=\"$cluster\", job=\"{{ include "exporter.kubeScheduler.jobName" . }}\",instance=~\"$instance\"}[$__rate_interval])) by (cluster, instance, le))", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}cluster{{`}}`}} {{`{{`}}instance{{`}}`}} e2e", "refId": "A" }, { - "expr": "histogram_quantile(0.99, sum(rate(scheduler_binding_duration_seconds_bucket{cluster=\"$cluster\", job=\"{{ include "exporter.kubeScheduler.jobName" . }}\",instance=~\"$instance\"}[5m])) by (cluster, instance, le))", + "expr": "histogram_quantile(0.99, sum(rate(scheduler_binding_duration_seconds_bucket{cluster=\"$cluster\", job=\"{{ include "exporter.kubeScheduler.jobName" . }}\",instance=~\"$instance\"}[$__rate_interval])) by (cluster, instance, le))", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}cluster{{`}}`}} {{`{{`}}instance{{`}}`}} binding", "refId": "B" }, { - "expr": "histogram_quantile(0.99, sum(rate(scheduler_scheduling_algorithm_duration_seconds_bucket{cluster=\"$cluster\", job=\"{{ include "exporter.kubeScheduler.jobName" . }}\",instance=~\"$instance\"}[5m])) by (cluster, instance, le))", + "expr": "histogram_quantile(0.99, sum(rate(scheduler_scheduling_algorithm_duration_seconds_bucket{cluster=\"$cluster\", job=\"{{ include "exporter.kubeScheduler.jobName" . }}\",instance=~\"$instance\"}[$__rate_interval])) by (cluster, instance, le))", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}cluster{{`}}`}} {{`{{`}}instance{{`}}`}} scheduling algorithm", "refId": "C" }, { - "expr": "histogram_quantile(0.99, sum(rate(scheduler_volume_scheduling_duration_seconds_bucket{cluster=\"$cluster\", job=\"{{ include "exporter.kubeScheduler.jobName" . }}\",instance=~\"$instance\"}[5m])) by (cluster, instance, le))", + "expr": "histogram_quantile(0.99, sum(rate(scheduler_volume_scheduling_duration_seconds_bucket{cluster=\"$cluster\", job=\"{{ include "exporter.kubeScheduler.jobName" . }}\",instance=~\"$instance\"}[$__rate_interval])) by (cluster, instance, le))", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}cluster{{`}}`}} {{`{{`}}instance{{`}}`}} volume", @@ -390,13 +396,14 @@ data: }, "id": 5, + "interval": "1m", "legend": { - "alignAsTable": false, + "alignAsTable": true, "avg": false, "current": false, "max": false, "min": false, - "rightSide": false, + "rightSide": true, "show": true, "sideWidth": null, "total": false, @@ -422,28 +429,28 @@ data: "steppedLine": false, "targets": [ { - "expr": "sum(rate(rest_client_requests_total{cluster=\"$cluster\", job=\"{{ include "exporter.kubeScheduler.jobName" . }}\", instance=~\"$instance\",code=~\"2..\"}[5m]))", + "expr": "sum(rate(rest_client_requests_total{cluster=\"$cluster\", job=\"{{ include "exporter.kubeScheduler.jobName" . }}\", instance=~\"$instance\",code=~\"2..\"}[$__rate_interval]))", "format": "time_series", "intervalFactor": 2, "legendFormat": "2xx", "refId": "A" }, { - "expr": "sum(rate(rest_client_requests_total{cluster=\"$cluster\", job=\"{{ include "exporter.kubeScheduler.jobName" . }}\", instance=~\"$instance\",code=~\"3..\"}[5m]))", + "expr": "sum(rate(rest_client_requests_total{cluster=\"$cluster\", job=\"{{ include "exporter.kubeScheduler.jobName" . }}\", instance=~\"$instance\",code=~\"3..\"}[$__rate_interval]))", "format": "time_series", "intervalFactor": 2, "legendFormat": "3xx", "refId": "B" }, { - "expr": "sum(rate(rest_client_requests_total{cluster=\"$cluster\", job=\"{{ include "exporter.kubeScheduler.jobName" . }}\", instance=~\"$instance\",code=~\"4..\"}[5m]))", + "expr": "sum(rate(rest_client_requests_total{cluster=\"$cluster\", job=\"{{ include "exporter.kubeScheduler.jobName" . }}\", instance=~\"$instance\",code=~\"4..\"}[$__rate_interval]))", "format": "time_series", "intervalFactor": 2, "legendFormat": "4xx", "refId": "C" }, { - "expr": "sum(rate(rest_client_requests_total{cluster=\"$cluster\", job=\"{{ include "exporter.kubeScheduler.jobName" . }}\", instance=~\"$instance\",code=~\"5..\"}[5m]))", + "expr": "sum(rate(rest_client_requests_total{cluster=\"$cluster\", job=\"{{ include "exporter.kubeScheduler.jobName" . }}\", instance=~\"$instance\",code=~\"5..\"}[$__rate_interval]))", "format": "time_series", "intervalFactor": 2, "legendFormat": "5xx", @@ -504,13 +511,14 @@ data: }, "id": 6, + "interval": "1m", "legend": { - "alignAsTable": false, + "alignAsTable": true, "avg": false, "current": false, "max": false, "min": false, - "rightSide": false, + "rightSide": true, "show": true, "sideWidth": null, "total": false, @@ -536,7 +544,7 @@ data: "steppedLine": false, "targets": [ { - "expr": "histogram_quantile(0.99, sum(rate(rest_client_request_duration_seconds_bucket{cluster=\"$cluster\", job=\"{{ include "exporter.kubeScheduler.jobName" . }}\", instance=~\"$instance\", verb=\"POST\"}[5m])) by (verb, url, le))", + "expr": "histogram_quantile(0.99, sum(rate(rest_client_request_duration_seconds_bucket{cluster=\"$cluster\", job=\"{{ include "exporter.kubeScheduler.jobName" . }}\", instance=~\"$instance\", verb=\"POST\"}[$__rate_interval])) by (verb, url, le))", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}verb{{`}}`}} {{`{{`}}url{{`}}`}}", @@ -610,6 +618,7 @@ data: }, "id": 7, + "interval": "1m", "legend": { "alignAsTable": true, "avg": false, @@ -642,7 +651,7 @@ data: "steppedLine": false, "targets": [ { - "expr": "histogram_quantile(0.99, sum(rate(rest_client_request_duration_seconds_bucket{cluster=\"$cluster\", job=\"{{ include "exporter.kubeScheduler.jobName" . }}\", instance=~\"$instance\", verb=\"GET\"}[5m])) by (verb, url, le))", + "expr": "histogram_quantile(0.99, sum(rate(rest_client_request_duration_seconds_bucket{cluster=\"$cluster\", job=\"{{ include "exporter.kubeScheduler.jobName" . }}\", instance=~\"$instance\", verb=\"GET\"}[$__rate_interval])) by (verb, url, le))", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}verb{{`}}`}} {{`{{`}}url{{`}}`}}", @@ -716,13 +725,14 @@ data: }, "id": 8, + "interval": "1m", "legend": { - "alignAsTable": false, + "alignAsTable": true, "avg": false, "current": false, "max": false, "min": false, - "rightSide": false, + "rightSide": true, "show": true, "sideWidth": null, "total": false, @@ -809,13 +819,14 @@ data: }, "id": 9, + "interval": "1m", "legend": { - "alignAsTable": false, + "alignAsTable": true, "avg": false, "current": false, "max": false, "min": false, - "rightSide": false, + "rightSide": true, "show": true, "sideWidth": null, "total": false, @@ -841,7 +852,7 @@ data: "steppedLine": false, "targets": [ { - "expr": "rate(process_cpu_seconds_total{cluster=\"$cluster\", job=\"{{ include "exporter.kubeScheduler.jobName" . }}\", instance=~\"$instance\"}[5m])", + "expr": "rate(process_cpu_seconds_total{cluster=\"$cluster\", job=\"{{ include "exporter.kubeScheduler.jobName" . }}\", instance=~\"$instance\"}[$__rate_interval])", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}instance{{`}}`}}", @@ -902,13 +913,14 @@ data: }, "id": 10, + "interval": "1m", "legend": { - "alignAsTable": false, + "alignAsTable": true, "avg": false, "current": false, "max": false, "min": false, - "rightSide": false, + "rightSide": true, "show": true, "sideWidth": null, "total": false, @@ -1000,11 +1012,11 @@ data: "list": [ { "current": { - "text": "default", - "value": "default" + "text": "Prometheus", + "value": "Prometheus" }, "hide": 0, - "label": null, + "label": "Data Source", "name": "datasource", "options": [ @@ -1054,7 +1066,7 @@ data: "options": [ ], - "query": "label_values(process_cpu_seconds_total{cluster=\"$cluster\", job=\"{{ include "exporter.kubeScheduler.jobName" . }}\"}, instance)", + "query": "label_values(up{job=\"{{ include "exporter.kubeScheduler.jobName" . }}\", cluster=\"$cluster\"}, instance)", "refresh": 2, "regex": "", "sort": 1, diff --git a/packages/rancher-project-monitoring/generated-changes/exclude/templates/grafana/dashboards-1.14/statefulset.yaml b/packages/rancher-project-monitoring/generated-changes/exclude/templates/grafana/dashboards-1.14/statefulset.yaml deleted file mode 100644 index f94dc0b1..00000000 --- a/packages/rancher-project-monitoring/generated-changes/exclude/templates/grafana/dashboards-1.14/statefulset.yaml +++ /dev/null @@ -1,928 +0,0 @@ -{{- /* -Generated from 'statefulset' from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/master/manifests/grafana-dashboardDefinitions.yaml -Do not change in-place! In order to change this file first read following link: -https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack -*/ -}} -{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} -{{- if and (or .Values.grafana.enabled .Values.grafana.forceDeployDashboards) (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.grafana.defaultDashboardsEnabled }} -apiVersion: v1 -kind: ConfigMap -metadata: - namespace: {{ .Values.grafana.defaultDashboards.namespace }} - name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" $) "statefulset" | trunc 63 | trimSuffix "-" }} - annotations: -{{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} - labels: - {{- if $.Values.grafana.sidecar.dashboards.label }} - {{ $.Values.grafana.sidecar.dashboards.label }}: "1" - {{- end }} - app: {{ template "kube-prometheus-stack.name" $ }}-grafana -{{ include "kube-prometheus-stack.labels" $ | indent 4 }} -data: - statefulset.json: |- - { - "__inputs": [ - - ], - "__requires": [ - - ], - "annotations": { - "list": [ - - ] - }, - "editable": false, - "gnetId": null, - "graphTooltip": 0, - "hideControls": false, - "id": null, - "links": [ - - ], - "refresh": "", - "rows": [ - { - "collapse": false, - "collapsed": false, - "panels": [ - { - "cacheTimeout": null, - "colorBackground": false, - "colorValue": false, - "colors": [ - "#299c46", - "rgba(237, 129, 40, 0.89)", - "#d44a3a" - ], - "datasource": "$datasource", - "format": "none", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": false, - "thresholdLabels": false, - "thresholdMarkers": true - }, - "gridPos": { - - }, - "id": 2, - "interval": null, - "links": [ - - ], - "mappingType": 1, - "mappingTypes": [ - { - "name": "value to text", - "value": 1 - }, - { - "name": "range to text", - "value": 2 - } - ], - "maxDataPoints": 100, - "nullPointMode": "connected", - "nullText": null, - "postfix": "cores", - "postfixFontSize": "50%", - "prefix": "", - "prefixFontSize": "50%", - "rangeMaps": [ - { - "from": "null", - "text": "N/A", - "to": "null" - } - ], - "span": 4, - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "lineColor": "rgb(31, 120, 193)", - "show": true - }, - "tableColumn": "", - "targets": [ - { - "expr": "sum(rate(container_cpu_usage_seconds_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", container!=\"\", namespace=\"$namespace\", pod=~\"$statefulset.*\"}[3m]))", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "", - "refId": "A" - } - ], - "thresholds": "", - "title": "CPU", - "tooltip": { - "shared": false - }, - "type": "singlestat", - "valueFontSize": "80%", - "valueMaps": [ - { - "op": "=", - "text": "0", - "value": "null" - } - ], - "valueName": "current" - }, - { - "cacheTimeout": null, - "colorBackground": false, - "colorValue": false, - "colors": [ - "#299c46", - "rgba(237, 129, 40, 0.89)", - "#d44a3a" - ], - "datasource": "$datasource", - "format": "none", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": false, - "thresholdLabels": false, - "thresholdMarkers": true - }, - "gridPos": { - - }, - "id": 3, - "interval": null, - "links": [ - - ], - "mappingType": 1, - "mappingTypes": [ - { - "name": "value to text", - "value": 1 - }, - { - "name": "range to text", - "value": 2 - } - ], - "maxDataPoints": 100, - "nullPointMode": "connected", - "nullText": null, - "postfix": "GB", - "postfixFontSize": "50%", - "prefix": "", - "prefixFontSize": "50%", - "rangeMaps": [ - { - "from": "null", - "text": "N/A", - "to": "null" - } - ], - "span": 4, - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "lineColor": "rgb(31, 120, 193)", - "show": true - }, - "tableColumn": "", - "targets": [ - { - "expr": "sum(container_memory_usage_bytes{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", container!=\"\", namespace=\"$namespace\", pod=~\"$statefulset.*\"}) / 1024^3", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "", - "refId": "A" - } - ], - "thresholds": "", - "title": "Memory", - "tooltip": { - "shared": false - }, - "type": "singlestat", - "valueFontSize": "80%", - "valueMaps": [ - { - "op": "=", - "text": "0", - "value": "null" - } - ], - "valueName": "current" - }, - { - "cacheTimeout": null, - "colorBackground": false, - "colorValue": false, - "colors": [ - "#299c46", - "rgba(237, 129, 40, 0.89)", - "#d44a3a" - ], - "datasource": "$datasource", - "format": "none", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": false, - "thresholdLabels": false, - "thresholdMarkers": true - }, - "gridPos": { - - }, - "id": 4, - "interval": null, - "links": [ - - ], - "mappingType": 1, - "mappingTypes": [ - { - "name": "value to text", - "value": 1 - }, - { - "name": "range to text", - "value": 2 - } - ], - "maxDataPoints": 100, - "nullPointMode": "connected", - "nullText": null, - "postfix": "Bps", - "postfixFontSize": "50%", - "prefix": "", - "prefixFontSize": "50%", - "rangeMaps": [ - { - "from": "null", - "text": "N/A", - "to": "null" - } - ], - "span": 4, - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "lineColor": "rgb(31, 120, 193)", - "show": true - }, - "tableColumn": "", - "targets": [ - { - "expr": "sum(rate(container_network_transmit_bytes_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=\"$namespace\", pod=~\"$statefulset.*\"}[3m])) + sum(rate(container_network_receive_bytes_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=\"$namespace\",pod=~\"$statefulset.*\"}[3m]))", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "", - "refId": "A" - } - ], - "thresholds": "", - "title": "Network", - "tooltip": { - "shared": false - }, - "type": "singlestat", - "valueFontSize": "80%", - "valueMaps": [ - { - "op": "=", - "text": "0", - "value": "null" - } - ], - "valueName": "current" - } - ], - "repeat": null, - "repeatIteration": null, - "repeatRowId": null, - "showTitle": false, - "title": "Dashboard Row", - "titleSize": "h6", - "type": "row" - }, - { - "collapse": false, - "collapsed": false, - "height": "100px", - "panels": [ - { - "cacheTimeout": null, - "colorBackground": false, - "colorValue": false, - "colors": [ - "#299c46", - "rgba(237, 129, 40, 0.89)", - "#d44a3a" - ], - "datasource": "$datasource", - "format": "none", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": false, - "thresholdLabels": false, - "thresholdMarkers": true - }, - "gridPos": { - - }, - "id": 5, - "interval": null, - "links": [ - - ], - "mappingType": 1, - "mappingTypes": [ - { - "name": "value to text", - "value": 1 - }, - { - "name": "range to text", - "value": 2 - } - ], - "maxDataPoints": 100, - "nullPointMode": "connected", - "nullText": null, - "postfix": "", - "postfixFontSize": "50%", - "prefix": "", - "prefixFontSize": "50%", - "rangeMaps": [ - { - "from": "null", - "text": "N/A", - "to": "null" - } - ], - "span": 3, - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": false, - "lineColor": "rgb(31, 120, 193)", - "show": false - }, - "tableColumn": "", - "targets": [ - { - "expr": "max(kube_statefulset_replicas{job=\"kube-state-metrics\", cluster=\"$cluster\", namespace=\"$namespace\", statefulset=\"$statefulset\"}) without (instance, pod)", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "", - "refId": "A" - } - ], - "thresholds": "", - "title": "Desired Replicas", - "tooltip": { - "shared": false - }, - "type": "singlestat", - "valueFontSize": "80%", - "valueMaps": [ - { - "op": "=", - "text": "0", - "value": "null" - } - ], - "valueName": "current" - }, - { - "cacheTimeout": null, - "colorBackground": false, - "colorValue": false, - "colors": [ - "#299c46", - "rgba(237, 129, 40, 0.89)", - "#d44a3a" - ], - "datasource": "$datasource", - "format": "none", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": false, - "thresholdLabels": false, - "thresholdMarkers": true - }, - "gridPos": { - - }, - "id": 6, - "interval": null, - "links": [ - - ], - "mappingType": 1, - "mappingTypes": [ - { - "name": "value to text", - "value": 1 - }, - { - "name": "range to text", - "value": 2 - } - ], - "maxDataPoints": 100, - "nullPointMode": "connected", - "nullText": null, - "postfix": "", - "postfixFontSize": "50%", - "prefix": "", - "prefixFontSize": "50%", - "rangeMaps": [ - { - "from": "null", - "text": "N/A", - "to": "null" - } - ], - "span": 3, - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": false, - "lineColor": "rgb(31, 120, 193)", - "show": false - }, - "tableColumn": "", - "targets": [ - { - "expr": "min(kube_statefulset_status_replicas_current{job=\"kube-state-metrics\", cluster=\"$cluster\", namespace=\"$namespace\", statefulset=\"$statefulset\"}) without (instance, pod)", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "", - "refId": "A" - } - ], - "thresholds": "", - "title": "Replicas of current version", - "tooltip": { - "shared": false - }, - "type": "singlestat", - "valueFontSize": "80%", - "valueMaps": [ - { - "op": "=", - "text": "0", - "value": "null" - } - ], - "valueName": "current" - }, - { - "cacheTimeout": null, - "colorBackground": false, - "colorValue": false, - "colors": [ - "#299c46", - "rgba(237, 129, 40, 0.89)", - "#d44a3a" - ], - "datasource": "$datasource", - "format": "none", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": false, - "thresholdLabels": false, - "thresholdMarkers": true - }, - "gridPos": { - - }, - "id": 7, - "interval": null, - "links": [ - - ], - "mappingType": 1, - "mappingTypes": [ - { - "name": "value to text", - "value": 1 - }, - { - "name": "range to text", - "value": 2 - } - ], - "maxDataPoints": 100, - "nullPointMode": "connected", - "nullText": null, - "postfix": "", - "postfixFontSize": "50%", - "prefix": "", - "prefixFontSize": "50%", - "rangeMaps": [ - { - "from": "null", - "text": "N/A", - "to": "null" - } - ], - "span": 3, - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": false, - "lineColor": "rgb(31, 120, 193)", - "show": false - }, - "tableColumn": "", - "targets": [ - { - "expr": "max(kube_statefulset_status_observed_generation{job=\"kube-state-metrics\", cluster=\"$cluster\", namespace=\"$namespace\", statefulset=\"$statefulset\"}) without (instance, pod)", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "", - "refId": "A" - } - ], - "thresholds": "", - "title": "Observed Generation", - "tooltip": { - "shared": false - }, - "type": "singlestat", - "valueFontSize": "80%", - "valueMaps": [ - { - "op": "=", - "text": "0", - "value": "null" - } - ], - "valueName": "current" - }, - { - "cacheTimeout": null, - "colorBackground": false, - "colorValue": false, - "colors": [ - "#299c46", - "rgba(237, 129, 40, 0.89)", - "#d44a3a" - ], - "datasource": "$datasource", - "format": "none", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": false, - "thresholdLabels": false, - "thresholdMarkers": true - }, - "gridPos": { - - }, - "id": 8, - "interval": null, - "links": [ - - ], - "mappingType": 1, - "mappingTypes": [ - { - "name": "value to text", - "value": 1 - }, - { - "name": "range to text", - "value": 2 - } - ], - "maxDataPoints": 100, - "nullPointMode": "connected", - "nullText": null, - "postfix": "", - "postfixFontSize": "50%", - "prefix": "", - "prefixFontSize": "50%", - "rangeMaps": [ - { - "from": "null", - "text": "N/A", - "to": "null" - } - ], - "span": 3, - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": false, - "lineColor": "rgb(31, 120, 193)", - "show": false - }, - "tableColumn": "", - "targets": [ - { - "expr": "max(kube_statefulset_metadata_generation{job=\"kube-state-metrics\", statefulset=\"$statefulset\", cluster=\"$cluster\", namespace=\"$namespace\"}) without (instance, pod)", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "", - "refId": "A" - } - ], - "thresholds": "", - "title": "Metadata Generation", - "tooltip": { - "shared": false - }, - "type": "singlestat", - "valueFontSize": "80%", - "valueMaps": [ - { - "op": "=", - "text": "0", - "value": "null" - } - ], - "valueName": "current" - } - ], - "repeat": null, - "repeatIteration": null, - "repeatRowId": null, - "showTitle": false, - "title": "Dashboard Row", - "titleSize": "h6", - "type": "row" - }, - { - "collapse": false, - "collapsed": false, - "panels": [ - { - "aliasColors": { - - }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "fillGradient": 0, - "gridPos": { - - }, - "id": 9, - "legend": { - "alignAsTable": false, - "avg": false, - "current": false, - "max": false, - "min": false, - "rightSide": false, - "show": true, - "sideWidth": null, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [ - - ], - "nullPointMode": "null", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "repeat": null, - "seriesOverrides": [ - - ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "max(kube_statefulset_replicas{job=\"kube-state-metrics\", statefulset=\"$statefulset\", cluster=\"$cluster\", namespace=\"$namespace\"}) without (instance, pod)", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "replicas specified", - "refId": "A" - }, - { - "expr": "max(kube_statefulset_status_replicas{job=\"kube-state-metrics\", statefulset=\"$statefulset\", cluster=\"$cluster\", namespace=\"$namespace\"}) without (instance, pod)", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "replicas created", - "refId": "B" - }, - { - "expr": "min(kube_statefulset_status_replicas_ready{job=\"kube-state-metrics\", statefulset=\"$statefulset\", cluster=\"$cluster\", namespace=\"$namespace\"}) without (instance, pod)", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "ready", - "refId": "C" - }, - { - "expr": "min(kube_statefulset_status_replicas_current{job=\"kube-state-metrics\", statefulset=\"$statefulset\", cluster=\"$cluster\", namespace=\"$namespace\"}) without (instance, pod)", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "replicas of current version", - "refId": "D" - }, - { - "expr": "min(kube_statefulset_status_replicas_updated{job=\"kube-state-metrics\", statefulset=\"$statefulset\", cluster=\"$cluster\", namespace=\"$namespace\"}) without (instance, pod)", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "updated", - "refId": "E" - } - ], - "thresholds": [ - - ], - "timeFrom": null, - "timeShift": null, - "title": "Replicas", - "tooltip": { - "shared": false, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ - - ] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ] - } - ], - "repeat": null, - "repeatIteration": null, - "repeatRowId": null, - "showTitle": false, - "title": "Dashboard Row", - "titleSize": "h6", - "type": "row" - } - ], - "schemaVersion": 14, - "style": "dark", - "tags": [ - "kubernetes-mixin" - ], - "templating": { - "list": [ - { - "current": { - "text": "default", - "value": "default" - }, - "hide": 0, - "label": null, - "name": "datasource", - "options": [ - - ], - "query": "prometheus", - "refresh": 1, - "regex": "", - "type": "datasource" - }, - { - "allValue": null, - "current": { - - }, - "datasource": "$datasource", - "hide": {{ if .Values.grafana.sidecar.dashboards.multicluster }}0{{ else }}2{{ end }}, - "includeAll": false, - "label": "cluster", - "multi": false, - "name": "cluster", - "options": [ - - ], - "query": "label_values(kube_statefulset_metadata_generation, cluster)", - "refresh": 2, - "regex": "", - "sort": 1, - "tagValuesQuery": "", - "tags": [ - - ], - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": null, - "current": { - - }, - "datasource": "$datasource", - "hide": 0, - "includeAll": false, - "label": "Namespace", - "multi": false, - "name": "namespace", - "options": [ - - ], - "query": "label_values(kube_statefulset_metadata_generation{job=\"kube-state-metrics\", cluster=\"$cluster\"}, namespace)", - "refresh": 2, - "regex": "", - "sort": 1, - "tagValuesQuery": "", - "tags": [ - - ], - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": null, - "current": { - - }, - "datasource": "$datasource", - "hide": 0, - "includeAll": false, - "label": "Name", - "multi": false, - "name": "statefulset", - "options": [ - - ], - "query": "label_values(kube_statefulset_metadata_generation{job=\"kube-state-metrics\", cluster=\"$cluster\", namespace=\"$namespace\"}, statefulset)", - "refresh": 2, - "regex": "", - "sort": 1, - "tagValuesQuery": "", - "tags": [ - - ], - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "time": { - "from": "now-1h", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "{{ .Values.grafana.defaultDashboardsTimezone }}", - "title": "Kubernetes / StatefulSets", - "uid": "a31c1f46e6f727cb37c0d731a7245005", - "version": 0 - } -{{- end }} \ No newline at end of file diff --git a/packages/rancher-project-monitoring/generated-changes/exclude/templates/grafana/servicemonitor.yaml b/packages/rancher-project-monitoring/generated-changes/exclude/templates/grafana/servicemonitor.yaml deleted file mode 100644 index b3c97ce5..00000000 --- a/packages/rancher-project-monitoring/generated-changes/exclude/templates/grafana/servicemonitor.yaml +++ /dev/null @@ -1,32 +0,0 @@ -{{- if and .Values.grafana.enabled .Values.grafana.serviceMonitor.selfMonitor }} -apiVersion: monitoring.coreos.com/v1 -kind: ServiceMonitor -metadata: - name: {{ template "kube-prometheus-stack.fullname" . }}-grafana - namespace: {{ template "kube-prometheus-stack-grafana.namespace" . }} - labels: - app: {{ template "kube-prometheus-stack.name" . }}-grafana -{{ include "kube-prometheus-stack.labels" . | indent 4 }} -spec: - selector: - matchLabels: - app.kubernetes.io/name: grafana - app.kubernetes.io/instance: {{ $.Release.Name | quote }} - namespaceSelector: - matchNames: - - {{ printf "%s" (include "kube-prometheus-stack-grafana.namespace" .) | quote }} - endpoints: - - port: {{ .Values.grafana.service.portName }} - {{- if .Values.grafana.serviceMonitor.interval }} - interval: {{ .Values.grafana.serviceMonitor.interval }} - {{- end }} - path: {{ .Values.grafana.serviceMonitor.path | quote }} -{{- if .Values.grafana.serviceMonitor.metricRelabelings }} - metricRelabelings: -{{ tpl (toYaml .Values.grafana.serviceMonitor.metricRelabelings | indent 6) . }} -{{- end }} -{{- if .Values.grafana.serviceMonitor.relabelings }} - relabelings: -{{ toYaml .Values.grafana.serviceMonitor.relabelings | indent 6 }} -{{- end }} -{{- end }} diff --git a/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus-operator/admission-webhooks/job-patch/job-createSecret.yaml b/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus-operator/admission-webhooks/job-patch/job-createSecret.yaml index fc457689..cb1e59b3 100644 --- a/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus-operator/admission-webhooks/job-patch/job-createSecret.yaml +++ b/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus-operator/admission-webhooks/job-patch/job-createSecret.yaml @@ -42,6 +42,10 @@ spec: - --host={{ template "kube-prometheus-stack.operator.fullname" . }},{{ template "kube-prometheus-stack.operator.fullname" . }}.{{ template "kube-prometheus-stack.namespace" . }}.svc - --namespace={{ template "kube-prometheus-stack.namespace" . }} - --secret-name={{ template "kube-prometheus-stack.fullname" . }}-admission + {{- with .Values.prometheusOperator.admissionWebhooks.createSecretJob }} + securityContext: + {{ toYaml .securityContext | nindent 12 }} + {{- end }} resources: {{ toYaml .Values.prometheusOperator.admissionWebhooks.patch.resources | indent 12 }} restartPolicy: OnFailure diff --git a/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus-operator/admission-webhooks/job-patch/job-patchWebhook.yaml b/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus-operator/admission-webhooks/job-patch/job-patchWebhook.yaml index 89b6cbad..067507af 100644 --- a/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus-operator/admission-webhooks/job-patch/job-patchWebhook.yaml +++ b/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus-operator/admission-webhooks/job-patch/job-patchWebhook.yaml @@ -43,6 +43,10 @@ spec: - --namespace={{ template "kube-prometheus-stack.namespace" . }} - --secret-name={{ template "kube-prometheus-stack.fullname" . }}-admission - --patch-failure-policy={{ .Values.prometheusOperator.admissionWebhooks.failurePolicy }} + {{- with .Values.prometheusOperator.admissionWebhooks.patchWebhookJob }} + securityContext: + {{ toYaml .securityContext | nindent 12 }} + {{- end }} resources: {{ toYaml .Values.prometheusOperator.admissionWebhooks.patch.resources | indent 12 }} restartPolicy: OnFailure diff --git a/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus-operator/admission-webhooks/job-patch/psp.yaml b/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus-operator/admission-webhooks/job-patch/psp.yaml index 3bc451d2..9feff52d 100644 --- a/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus-operator/admission-webhooks/job-patch/psp.yaml +++ b/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus-operator/admission-webhooks/job-patch/psp.yaml @@ -6,21 +6,14 @@ metadata: annotations: "helm.sh/hook": pre-install,pre-upgrade,post-install,post-upgrade "helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded - labels: - app: {{ template "kube-prometheus-stack.name" . }}-admission {{- if .Values.global.rbac.pspAnnotations }} - annotations: {{ toYaml .Values.global.rbac.pspAnnotations | indent 4 }} {{- end }} + labels: + app: {{ template "kube-prometheus-stack.name" . }}-admission {{ include "kube-prometheus-stack.labels" . | indent 4 }} spec: privileged: false - # Required to prevent escalations to root. - # allowPrivilegeEscalation: false - # This is redundant with non-root + disallow privilege escalation, - # but we can provide it for defense in depth. - #requiredDropCapabilities: - # - ALL # Allow core volume types. volumes: - 'configMap' @@ -41,13 +34,13 @@ spec: supplementalGroups: rule: 'MustRunAs' ranges: - # Forbid adding the root group. + # Allow adding the root group. - min: 0 max: 65535 fsGroup: rule: 'MustRunAs' ranges: - # Forbid adding the root group. + # Allow adding the root group. - min: 0 max: 65535 readOnlyRootFilesystem: false diff --git a/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus-operator/admission-webhooks/job-patch/serviceaccount.yaml b/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus-operator/admission-webhooks/job-patch/serviceaccount.yaml index 804d94ab..4fd52ae0 100644 --- a/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus-operator/admission-webhooks/job-patch/serviceaccount.yaml +++ b/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus-operator/admission-webhooks/job-patch/serviceaccount.yaml @@ -12,6 +12,6 @@ metadata: {{- include "kube-prometheus-stack.labels" $ | indent 4 }} {{- if .Values.global.imagePullSecrets }} imagePullSecrets: -{{ toYaml .Values.global.imagePullSecrets | indent 2 }} +{{ include "kube-prometheus-stack.imagePullSecrets" . | trim | indent 2 }} {{- end }} {{- end }} diff --git a/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus-operator/admission-webhooks/mutatingWebhookConfiguration.yaml b/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus-operator/admission-webhooks/mutatingWebhookConfiguration.yaml index 9cb8993a..7a12754e 100644 --- a/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus-operator/admission-webhooks/mutatingWebhookConfiguration.yaml +++ b/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus-operator/admission-webhooks/mutatingWebhookConfiguration.yaml @@ -36,6 +36,7 @@ webhooks: {{- if and .Values.prometheusOperator.admissionWebhooks.caBundle (not .Values.prometheusOperator.admissionWebhooks.patch.enabled) (not .Values.prometheusOperator.admissionWebhooks.certManager.enabled) }} caBundle: {{ .Values.prometheusOperator.admissionWebhooks.caBundle }} {{- end }} + timeoutSeconds: {{ .Values.prometheusOperator.admissionWebhooks.timeoutSeconds }} admissionReviewVersions: ["v1", "v1beta1"] sideEffects: None {{- end }} diff --git a/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus-operator/certmanager.yaml b/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus-operator/certmanager.yaml index cfd51655..a1e06aec 100644 --- a/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus-operator/certmanager.yaml +++ b/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus-operator/certmanager.yaml @@ -18,7 +18,7 @@ metadata: namespace: {{ template "kube-prometheus-stack.namespace" . }} spec: secretName: {{ template "kube-prometheus-stack.fullname" . }}-root-cert - duration: 43800h0m0s # 5y + duration: {{ .Values.prometheusOperator.admissionWebhooks.certManager.rootCert.duration | default "43800h0m0s" | quote }} issuerRef: name: {{ template "kube-prometheus-stack.fullname" . }}-self-signed-issuer commonName: "ca.webhook.kube-prometheus-stack" @@ -35,7 +35,7 @@ spec: secretName: {{ template "kube-prometheus-stack.fullname" . }}-root-cert {{- end }} --- -# generate a serving certificate for the apiservices to use +# generate a server certificate for the apiservices to use apiVersion: cert-manager.io/v1 kind: Certificate metadata: @@ -43,7 +43,7 @@ metadata: namespace: {{ template "kube-prometheus-stack.namespace" . }} spec: secretName: {{ template "kube-prometheus-stack.fullname" . }}-admission - duration: 8760h0m0s # 1y + duration: {{ .Values.prometheusOperator.admissionWebhooks.certManager.admissionCert.duration | default "8760h0m0s" | quote }} issuerRef: {{- if .Values.prometheusOperator.admissionWebhooks.certManager.issuerRef }} {{- toYaml .Values.prometheusOperator.admissionWebhooks.certManager.issuerRef | nindent 4 }} diff --git a/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus-operator/clusterrole.yaml b/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus-operator/clusterrole.yaml index e5568534..300956a1 100644 --- a/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus-operator/clusterrole.yaml +++ b/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus-operator/clusterrole.yaml @@ -14,6 +14,7 @@ rules: - alertmanagers/finalizers - alertmanagerconfigs - prometheuses + - prometheuses/status - prometheuses/finalizers - thanosrulers - thanosrulers/finalizers diff --git a/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus-operator/deployment.yaml b/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus-operator/deployment.yaml index b466b263..d6c8ae82 100644 --- a/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus-operator/deployment.yaml +++ b/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus-operator/deployment.yaml @@ -1,4 +1,5 @@ {{- $namespace := printf "%s" (include "kube-prometheus-stack.namespace" .) }} +{{- $defaultKubeletSvcName := printf "%s-kubelet" (include "kube-prometheus-stack.fullname" .) }} {{- if .Values.prometheusOperator.enabled }} apiVersion: apps/v1 kind: Deployment @@ -8,6 +9,10 @@ metadata: labels: app: {{ template "kube-prometheus-stack.name" . }}-operator {{ include "kube-prometheus-stack.labels" . | indent 4 }} +{{- if .Values.prometheusOperator.annotations }} + annotations: +{{ toYaml .Values.prometheusOperator.annotations | indent 4 }} +{{- end }} spec: replicas: 1 selector: @@ -40,7 +45,7 @@ spec: imagePullPolicy: "{{ .Values.prometheusOperator.image.pullPolicy }}" args: {{- if .Values.prometheusOperator.kubeletService.enabled }} - - --kubelet-service={{ .Values.prometheusOperator.kubeletService.namespace }}/{{ template "kube-prometheus-stack.fullname" . }}-kubelet + - --kubelet-service={{ .Values.prometheusOperator.kubeletService.namespace }}/{{ default $defaultKubeletSvcName .Values.prometheusOperator.kubeletService.name }} {{- end }} {{- if .Values.prometheusOperator.logFormat }} - --log-format={{ .Values.prometheusOperator.logFormat }} @@ -49,14 +54,19 @@ spec: - --log-level={{ .Values.prometheusOperator.logLevel }} {{- end }} {{- if .Values.prometheusOperator.denyNamespaces }} - - --deny-namespaces={{ .Values.prometheusOperator.denyNamespaces | join "," }} + - --deny-namespaces={{ tpl (.Values.prometheusOperator.denyNamespaces | join ",") $ }} {{- end }} {{- with $.Values.prometheusOperator.namespaces }} - {{ $ns := .additional }} + {{- $namespaces := list }} {{- if .releaseNamespace }} - {{- $ns = append $ns $namespace }} + {{- $namespaces = append $namespaces $namespace }} + {{- end }} + {{- if .additional }} + {{- range $ns := .additional }} + {{- $namespaces = append $namespaces (tpl $ns $) }} {{- end }} - - --namespaces={{ $ns | join "," }} + {{- end }} + - --namespaces={{ $namespaces | mustUniq | join "," }} {{- end }} - --localhost=127.0.0.1 {{- if .Values.prometheusOperator.prometheusDefaultBaseImage }} @@ -65,18 +75,21 @@ spec: {{- if .Values.prometheusOperator.alertmanagerDefaultBaseImage }} - --alertmanager-default-base-image={{ .Values.prometheusOperator.alertmanagerDefaultBaseImage }} {{- end }} - {{- if .Values.prometheusOperator.prometheusConfigReloaderImage.sha }} - - --prometheus-config-reloader={{ template "system_default_registry" . }}{{ .Values.prometheusOperator.prometheusConfigReloaderImage.repository }}:{{ .Values.prometheusOperator.prometheusConfigReloaderImage.tag }}@sha256:{{ .Values.prometheusOperator.prometheusConfigReloaderImage.sha }} + {{- if .Values.prometheusOperator.prometheusConfigReloader.image.sha }} + - --prometheus-config-reloader={{ .Values.prometheusOperator.prometheusConfigReloader.image.repository }}:{{ .Values.prometheusOperator.prometheusConfigReloader.image.tag }}@sha256:{{ .Values.prometheusOperator.prometheusConfigReloader.image.sha }} {{- else }} - - --prometheus-config-reloader={{ template "system_default_registry" . }}{{ .Values.prometheusOperator.prometheusConfigReloaderImage.repository }}:{{ .Values.prometheusOperator.prometheusConfigReloaderImage.tag }} + - --prometheus-config-reloader={{ .Values.prometheusOperator.prometheusConfigReloader.image.repository }}:{{ .Values.prometheusOperator.prometheusConfigReloader.image.tag }} {{- end }} - - --config-reloader-cpu-request={{ .Values.prometheusOperator.configReloaderCpu }} - - --config-reloader-cpu-limit={{ .Values.prometheusOperator.configReloaderCpu }} - - --config-reloader-memory-request={{ .Values.prometheusOperator.configReloaderMemory }} - - --config-reloader-memory-limit={{ .Values.prometheusOperator.configReloaderMemory }} + - --config-reloader-cpu-request={{ .Values.prometheusOperator.prometheusConfigReloader.resources.requests.cpu }} + - --config-reloader-cpu-limit={{ .Values.prometheusOperator.prometheusConfigReloader.resources.limits.cpu }} + - --config-reloader-memory-request={{ .Values.prometheusOperator.prometheusConfigReloader.resources.requests.memory }} + - --config-reloader-memory-limit={{ .Values.prometheusOperator.prometheusConfigReloader.resources.limits.memory }} {{- if .Values.prometheusOperator.alertmanagerInstanceNamespaces }} - --alertmanager-instance-namespaces={{ .Values.prometheusOperator.alertmanagerInstanceNamespaces | join "," }} {{- end }} + {{- if .Values.prometheusOperator.alertmanagerConfigNamespaces }} + - --alertmanager-config-namespaces={{ .Values.prometheusOperator.alertmanagerConfigNamespaces | join "," }} + {{- end }} {{- if .Values.prometheusOperator.prometheusInstanceNamespaces }} - --prometheus-instance-namespaces={{ .Values.prometheusOperator.prometheusInstanceNamespaces | join "," }} {{- end }} @@ -111,8 +124,7 @@ spec: resources: {{ toYaml .Values.prometheusOperator.resources | indent 12 }} securityContext: - allowPrivilegeEscalation: false - readOnlyRootFilesystem: true +{{ toYaml .Values.prometheusOperator.containerSecurityContext | indent 12 }} {{- if .Values.prometheusOperator.tls.enabled }} volumeMounts: - name: tls-secret diff --git a/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus-operator/psp.yaml b/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus-operator/psp.yaml index 18d1d37d..d9228f0b 100644 --- a/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus-operator/psp.yaml +++ b/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus-operator/psp.yaml @@ -12,12 +12,6 @@ metadata: {{ include "kube-prometheus-stack.labels" . | indent 4 }} spec: privileged: false - # Required to prevent escalations to root. - # allowPrivilegeEscalation: false - # This is redundant with non-root + disallow privilege escalation, - # but we can provide it for defense in depth. - #requiredDropCapabilities: - # - ALL # Allow core volume types. volumes: - 'configMap' @@ -38,13 +32,13 @@ spec: supplementalGroups: rule: 'MustRunAs' ranges: - # Forbid adding the root group. + # Allow adding the root group. - min: 0 max: 65535 fsGroup: rule: 'MustRunAs' ranges: - # Forbid adding the root group. + # Allow adding the root group. - min: 0 max: 65535 readOnlyRootFilesystem: false diff --git a/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus-operator/service.yaml b/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus-operator/service.yaml index 8ccb2bb2..b5ef5b93 100644 --- a/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus-operator/service.yaml +++ b/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus-operator/service.yaml @@ -30,6 +30,9 @@ spec: {{- range $cidr := .Values.prometheusOperator.service.loadBalancerSourceRanges }} - {{ $cidr }} {{- end }} +{{- end }} +{{- if ne .Values.prometheusOperator.service.type "ClusterIP" }} + externalTrafficPolicy: {{ .Values.prometheusOperator.service.externalTrafficPolicy }} {{- end }} ports: {{- if not .Values.prometheusOperator.tls.enabled }} diff --git a/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus-operator/serviceaccount.yaml b/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus-operator/serviceaccount.yaml index 650f53c9..781975f3 100644 --- a/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus-operator/serviceaccount.yaml +++ b/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus-operator/serviceaccount.yaml @@ -11,6 +11,6 @@ metadata: {{ include "kube-prometheus-stack.labels" . | indent 4 }} {{- if .Values.global.imagePullSecrets }} imagePullSecrets: -{{ toYaml .Values.global.imagePullSecrets | indent 2 }} +{{ include "kube-prometheus-stack.imagePullSecrets" . | trim | indent 2 }} {{- end }} {{- end }} diff --git a/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/additionalAlertmanagerConfigs.yaml b/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/additionalAlertmanagerConfigs.yaml index 8aebc96c..2fe8fdb8 100644 --- a/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/additionalAlertmanagerConfigs.yaml +++ b/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/additionalAlertmanagerConfigs.yaml @@ -12,5 +12,5 @@ metadata: app: {{ template "kube-prometheus-stack.name" . }}-prometheus-am-confg {{ include "kube-prometheus-stack.labels" . | indent 4 }} data: - additional-alertmanager-configs.yaml: {{ toYaml .Values.prometheus.prometheusSpec.additionalAlertManagerConfigs | b64enc | quote }} + additional-alertmanager-configs.yaml: {{ tpl (toYaml .Values.prometheus.prometheusSpec.additionalAlertManagerConfigs) . | b64enc | quote }} {{- end }} diff --git a/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/additionalScrapeConfigs.yaml b/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/additionalScrapeConfigs.yaml index 21d9429d..ebdf766f 100644 --- a/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/additionalScrapeConfigs.yaml +++ b/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/additionalScrapeConfigs.yaml @@ -12,5 +12,9 @@ metadata: app: {{ template "kube-prometheus-stack.name" . }}-prometheus-scrape-confg {{ include "kube-prometheus-stack.labels" . | indent 4 }} data: +{{- if eq ( typeOf .Values.prometheus.prometheusSpec.additionalScrapeConfigs ) "string" }} + additional-scrape-configs.yaml: {{ tpl .Values.prometheus.prometheusSpec.additionalScrapeConfigs $ | b64enc | quote }} +{{- else }} additional-scrape-configs.yaml: {{ tpl (toYaml .Values.prometheus.prometheusSpec.additionalScrapeConfigs) $ | b64enc | quote }} {{- end }} +{{- end }} diff --git a/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/rules-1.14/config-reloaders.yaml b/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/rules-1.14/config-reloaders.yaml new file mode 100644 index 00000000..37109eb0 --- /dev/null +++ b/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/rules-1.14/config-reloaders.yaml @@ -0,0 +1,46 @@ +{{- /* +Generated from 'config-reloaders' group from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/prometheusOperator-prometheusRule.yaml +Do not change in-place! In order to change this file first read following link: +https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack +*/ -}} +{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} +{{- if and (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.defaultRules.create .Values.defaultRules.rules.configReloaders }} +apiVersion: monitoring.coreos.com/v1 +kind: PrometheusRule +metadata: + name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" .) "config-reloaders" | trunc 63 | trimSuffix "-" }} + namespace: {{ template "kube-prometheus-stack.namespace" . }} + labels: + app: {{ template "kube-prometheus-stack.name" . }} +{{ include "kube-prometheus-stack.labels" . | indent 4 }} +{{- if .Values.defaultRules.labels }} +{{ toYaml .Values.defaultRules.labels | indent 4 }} +{{- end }} +{{- if .Values.defaultRules.annotations }} + annotations: +{{ toYaml .Values.defaultRules.annotations | indent 4 }} +{{- end }} +spec: + groups: + - name: config-reloaders + rules: +{{- if not (.Values.defaultRules.disabled.ConfigReloaderSidecarErrors | default false) }} + - alert: ConfigReloaderSidecarErrors + annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} + description: 'Errors encountered while the {{`{{`}}$labels.pod{{`}}`}} config-reloader sidecar attempts to sync config in {{`{{`}}$labels.namespace{{`}}`}} namespace. + + As a result, configuration for service running in {{`{{`}}$labels.pod{{`}}`}} may be stale and cannot be updated anymore.' + runbook_url: {{ .Values.defaultRules.runbookUrl }}/prometheus-operator/configreloadersidecarerrors + summary: config-reloader sidecar has not had a successful reload for 10m + expr: max_over_time(reloader_last_reload_successful{namespace=~".+"}[5m]) == 0 + for: 10m + labels: + severity: warning +{{- if .Values.defaultRules.additionalRuleLabels }} +{{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} +{{- end }} +{{- end }} +{{- end }} \ No newline at end of file diff --git a/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/rules-1.14/etcd.yaml b/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/rules-1.14/etcd.yaml index c3702bd3..1caa1939 100644 --- a/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/rules-1.14/etcd.yaml +++ b/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/rules-1.14/etcd.yaml @@ -1,5 +1,5 @@ {{- /* -Generated from 'etcd' group from https://raw.githubusercontent.com/etcd-io/website/master/content/en/docs/v3.4/op-guide/etcd3_alert.rules.yml +Generated from 'etcd' group from https://raw.githubusercontent.com/etcd-io/etcd/main/contrib/mixin/mixin.libsonnet Do not change in-place! In order to change this file first read following link: https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack */ -}} @@ -25,19 +25,54 @@ spec: groups: - name: etcd rules: +{{- if not (.Values.defaultRules.disabled.etcdMembersDown | default false) }} + - alert: etcdMembersDown + annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} + description: 'etcd cluster "{{`{{`}} $labels.job {{`}}`}}": members are down ({{`{{`}} $value {{`}}`}}).' + summary: etcd cluster members are down. + expr: |- + max without (endpoint) ( + sum without (instance) (up{job=~".*etcd.*"} == bool 0) + or + count without (To) ( + sum without (instance) (rate(etcd_network_peer_sent_failures_total{job=~".*etcd.*"}[120s])) > 0.01 + ) + ) + > 0 + for: 10m + labels: + severity: critical +{{- if .Values.defaultRules.additionalRuleLabels }} +{{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} +{{- end }} +{{- end }} +{{- if not (.Values.defaultRules.disabled.etcdInsufficientMembers | default false) }} - alert: etcdInsufficientMembers annotations: - message: 'etcd cluster "{{`{{`}} $labels.job {{`}}`}}": insufficient members ({{`{{`}} $value {{`}}`}}).' - expr: sum(up{job=~".*etcd.*"} == bool 1) by (job) < ((count(up{job=~".*etcd.*"}) by (job) + 1) / 2) +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} + description: 'etcd cluster "{{`{{`}} $labels.job {{`}}`}}": insufficient members ({{`{{`}} $value {{`}}`}}).' + summary: etcd cluster has insufficient number of members. + expr: sum(up{job=~".*etcd.*"} == bool 1) without (instance) < ((count(up{job=~".*etcd.*"}) without (instance) + 1) / 2) for: 3m labels: severity: critical {{- if .Values.defaultRules.additionalRuleLabels }} {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} {{- end }} +{{- end }} +{{- if not (.Values.defaultRules.disabled.etcdNoLeader | default false) }} - alert: etcdNoLeader annotations: - message: 'etcd cluster "{{`{{`}} $labels.job {{`}}`}}": member {{`{{`}} $labels.instance {{`}}`}} has no leader.' +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} + description: 'etcd cluster "{{`{{`}} $labels.job {{`}}`}}": member {{`{{`}} $labels.instance {{`}}`}} has no leader.' + summary: etcd cluster has no leader. expr: etcd_server_has_leader{job=~".*etcd.*"} == 0 for: 1m labels: @@ -45,23 +80,35 @@ spec: {{- if .Values.defaultRules.additionalRuleLabels }} {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} {{- end }} +{{- end }} +{{- if not (.Values.defaultRules.disabled.etcdHighNumberOfLeaderChanges | default false) }} - alert: etcdHighNumberOfLeaderChanges annotations: - message: 'etcd cluster "{{`{{`}} $labels.job {{`}}`}}": instance {{`{{`}} $labels.instance {{`}}`}} has seen {{`{{`}} $value {{`}}`}} leader changes within the last hour.' - expr: rate(etcd_server_leader_changes_seen_total{job=~".*etcd.*"}[15m]) > 3 - for: 15m +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} + description: 'etcd cluster "{{`{{`}} $labels.job {{`}}`}}": {{`{{`}} $value {{`}}`}} leader changes within the last 15 minutes. Frequent elections may be a sign of insufficient resources, high network latency, or disruptions by other components and should be investigated.' + summary: etcd cluster has high number of leader changes. + expr: increase((max without (instance) (etcd_server_leader_changes_seen_total{job=~".*etcd.*"}) or 0*absent(etcd_server_leader_changes_seen_total{job=~".*etcd.*"}))[15m:1m]) >= 4 + for: 5m labels: severity: warning {{- if .Values.defaultRules.additionalRuleLabels }} {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} {{- end }} +{{- end }} +{{- if not (.Values.defaultRules.disabled.etcdHighNumberOfFailedGRPCRequests | default false) }} - alert: etcdHighNumberOfFailedGRPCRequests annotations: - message: 'etcd cluster "{{`{{`}} $labels.job {{`}}`}}": {{`{{`}} $value {{`}}`}}% of requests for {{`{{`}} $labels.grpc_method {{`}}`}} failed on etcd instance {{`{{`}} $labels.instance {{`}}`}}.' +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} + description: 'etcd cluster "{{`{{`}} $labels.job {{`}}`}}": {{`{{`}} $value {{`}}`}}% of requests for {{`{{`}} $labels.grpc_method {{`}}`}} failed on etcd instance {{`{{`}} $labels.instance {{`}}`}}.' + summary: etcd cluster has high number of failed grpc requests. expr: |- - 100 * sum(rate(grpc_server_handled_total{job=~".*etcd.*", grpc_code!="OK"}[5m])) BY (job, instance, grpc_service, grpc_method) + 100 * sum(rate(grpc_server_handled_total{job=~".*etcd.*", grpc_code=~"Unknown|FailedPrecondition|ResourceExhausted|Internal|Unavailable|DataLoss|DeadlineExceeded"}[5m])) without (grpc_type, grpc_code) / - sum(rate(grpc_server_handled_total{job=~".*etcd.*"}[5m])) BY (job, instance, grpc_service, grpc_method) + sum(rate(grpc_server_handled_total{job=~".*etcd.*"}[5m])) without (grpc_type, grpc_code) > 1 for: 10m labels: @@ -69,13 +116,19 @@ spec: {{- if .Values.defaultRules.additionalRuleLabels }} {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} {{- end }} +{{- end }} +{{- if not (.Values.defaultRules.disabled.etcdHighNumberOfFailedGRPCRequests | default false) }} - alert: etcdHighNumberOfFailedGRPCRequests annotations: - message: 'etcd cluster "{{`{{`}} $labels.job {{`}}`}}": {{`{{`}} $value {{`}}`}}% of requests for {{`{{`}} $labels.grpc_method {{`}}`}} failed on etcd instance {{`{{`}} $labels.instance {{`}}`}}.' +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} + description: 'etcd cluster "{{`{{`}} $labels.job {{`}}`}}": {{`{{`}} $value {{`}}`}}% of requests for {{`{{`}} $labels.grpc_method {{`}}`}} failed on etcd instance {{`{{`}} $labels.instance {{`}}`}}.' + summary: etcd cluster has high number of failed grpc requests. expr: |- - 100 * sum(rate(grpc_server_handled_total{job=~".*etcd.*", grpc_code!="OK"}[5m])) BY (job, instance, grpc_service, grpc_method) + 100 * sum(rate(grpc_server_handled_total{job=~".*etcd.*", grpc_code=~"Unknown|FailedPrecondition|ResourceExhausted|Internal|Unavailable|DataLoss|DeadlineExceeded"}[5m])) without (grpc_type, grpc_code) / - sum(rate(grpc_server_handled_total{job=~".*etcd.*"}[5m])) BY (job, instance, grpc_service, grpc_method) + sum(rate(grpc_server_handled_total{job=~".*etcd.*"}[5m])) without (grpc_type, grpc_code) > 5 for: 5m labels: @@ -83,11 +136,17 @@ spec: {{- if .Values.defaultRules.additionalRuleLabels }} {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} {{- end }} +{{- end }} +{{- if not (.Values.defaultRules.disabled.etcdGRPCRequestsSlow | default false) }} - alert: etcdGRPCRequestsSlow annotations: - message: 'etcd cluster "{{`{{`}} $labels.job {{`}}`}}": gRPC requests to {{`{{`}} $labels.grpc_method {{`}}`}} are taking {{`{{`}} $value {{`}}`}}s on etcd instance {{`{{`}} $labels.instance {{`}}`}}.' +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} + description: 'etcd cluster "{{`{{`}} $labels.job {{`}}`}}": 99th percentile of gRPC requests is {{`{{`}} $value {{`}}`}}s on etcd instance {{`{{`}} $labels.instance {{`}}`}} for {{`{{`}} $labels.grpc_method {{`}}`}} method.' + summary: etcd grpc requests are slow expr: |- - histogram_quantile(0.99, sum(rate(grpc_server_handling_seconds_bucket{job=~".*etcd.*", grpc_type="unary"}[5m])) by (job, instance, grpc_service, grpc_method, le)) + histogram_quantile(0.99, sum(rate(grpc_server_handling_seconds_bucket{job=~".*etcd.*", grpc_method!="Defragment", grpc_type="unary"}[5m])) without(grpc_type)) > 0.15 for: 10m labels: @@ -95,9 +154,15 @@ spec: {{- if .Values.defaultRules.additionalRuleLabels }} {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} {{- end }} +{{- end }} +{{- if not (.Values.defaultRules.disabled.etcdMemberCommunicationSlow | default false) }} - alert: etcdMemberCommunicationSlow annotations: - message: 'etcd cluster "{{`{{`}} $labels.job {{`}}`}}": member communication with {{`{{`}} $labels.To {{`}}`}} is taking {{`{{`}} $value {{`}}`}}s on etcd instance {{`{{`}} $labels.instance {{`}}`}}.' +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} + description: 'etcd cluster "{{`{{`}} $labels.job {{`}}`}}": member communication with {{`{{`}} $labels.To {{`}}`}} is taking {{`{{`}} $value {{`}}`}}s on etcd instance {{`{{`}} $labels.instance {{`}}`}}.' + summary: etcd cluster member communication is slow. expr: |- histogram_quantile(0.99, rate(etcd_network_peer_round_trip_time_seconds_bucket{job=~".*etcd.*"}[5m])) > 0.15 @@ -107,9 +172,15 @@ spec: {{- if .Values.defaultRules.additionalRuleLabels }} {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} {{- end }} +{{- end }} +{{- if not (.Values.defaultRules.disabled.etcdHighNumberOfFailedProposals | default false) }} - alert: etcdHighNumberOfFailedProposals annotations: - message: 'etcd cluster "{{`{{`}} $labels.job {{`}}`}}": {{`{{`}} $value {{`}}`}} proposal failures within the last hour on etcd instance {{`{{`}} $labels.instance {{`}}`}}.' +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} + description: 'etcd cluster "{{`{{`}} $labels.job {{`}}`}}": {{`{{`}} $value {{`}}`}} proposal failures within the last 30 minutes on etcd instance {{`{{`}} $labels.instance {{`}}`}}.' + summary: etcd cluster has high number of proposal failures. expr: rate(etcd_server_proposals_failed_total{job=~".*etcd.*"}[15m]) > 5 for: 15m labels: @@ -117,9 +188,15 @@ spec: {{- if .Values.defaultRules.additionalRuleLabels }} {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} {{- end }} +{{- end }} +{{- if not (.Values.defaultRules.disabled.etcdHighFsyncDurations | default false) }} - alert: etcdHighFsyncDurations annotations: - message: 'etcd cluster "{{`{{`}} $labels.job {{`}}`}}": 99th percentile fync durations are {{`{{`}} $value {{`}}`}}s on etcd instance {{`{{`}} $labels.instance {{`}}`}}.' +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} + description: 'etcd cluster "{{`{{`}} $labels.job {{`}}`}}": 99th percentile fsync durations are {{`{{`}} $value {{`}}`}}s on etcd instance {{`{{`}} $labels.instance {{`}}`}}.' + summary: etcd cluster 99th percentile fsync durations are too high. expr: |- histogram_quantile(0.99, rate(etcd_disk_wal_fsync_duration_seconds_bucket{job=~".*etcd.*"}[5m])) > 0.5 @@ -129,9 +206,33 @@ spec: {{- if .Values.defaultRules.additionalRuleLabels }} {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} {{- end }} +{{- end }} +{{- if not (.Values.defaultRules.disabled.etcdHighFsyncDurations | default false) }} + - alert: etcdHighFsyncDurations + annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} + description: 'etcd cluster "{{`{{`}} $labels.job {{`}}`}}": 99th percentile fsync durations are {{`{{`}} $value {{`}}`}}s on etcd instance {{`{{`}} $labels.instance {{`}}`}}.' + summary: etcd cluster 99th percentile fsync durations are too high. + expr: |- + histogram_quantile(0.99, rate(etcd_disk_wal_fsync_duration_seconds_bucket{job=~".*etcd.*"}[5m])) + > 1 + for: 10m + labels: + severity: critical +{{- if .Values.defaultRules.additionalRuleLabels }} +{{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} +{{- end }} +{{- end }} +{{- if not (.Values.defaultRules.disabled.etcdHighCommitDurations | default false) }} - alert: etcdHighCommitDurations annotations: - message: 'etcd cluster "{{`{{`}} $labels.job {{`}}`}}": 99th percentile commit durations {{`{{`}} $value {{`}}`}}s on etcd instance {{`{{`}} $labels.instance {{`}}`}}.' +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} + description: 'etcd cluster "{{`{{`}} $labels.job {{`}}`}}": 99th percentile commit durations {{`{{`}} $value {{`}}`}}s on etcd instance {{`{{`}} $labels.instance {{`}}`}}.' + summary: etcd cluster 99th percentile commit durations are too high. expr: |- histogram_quantile(0.99, rate(etcd_disk_backend_commit_duration_seconds_bucket{job=~".*etcd.*"}[5m])) > 0.25 @@ -141,36 +242,49 @@ spec: {{- if .Values.defaultRules.additionalRuleLabels }} {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} {{- end }} - - alert: etcdHighNumberOfFailedHTTPRequests +{{- end }} +{{- if not (.Values.defaultRules.disabled.etcdDatabaseQuotaLowSpace | default false) }} + - alert: etcdDatabaseQuotaLowSpace annotations: - message: '{{`{{`}} $value {{`}}`}}% of requests for {{`{{`}} $labels.method {{`}}`}} failed on etcd instance {{`{{`}} $labels.instance {{`}}`}}' - expr: |- - sum(rate(etcd_http_failed_total{job=~".*etcd.*", code!="404"}[5m])) BY (method) / sum(rate(etcd_http_received_total{job=~".*etcd.*"}[5m])) - BY (method) > 0.01 +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} + description: 'etcd cluster "{{`{{`}} $labels.job {{`}}`}}": database size exceeds the defined quota on etcd instance {{`{{`}} $labels.instance {{`}}`}}, please defrag or increase the quota as the writes to etcd will be disabled when it is full.' + summary: etcd cluster database is running full. + expr: (last_over_time(etcd_mvcc_db_total_size_in_bytes[5m]) / last_over_time(etcd_server_quota_backend_bytes[5m]))*100 > 95 for: 10m labels: - severity: warning + severity: critical {{- if .Values.defaultRules.additionalRuleLabels }} {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} {{- end }} - - alert: etcdHighNumberOfFailedHTTPRequests +{{- end }} +{{- if not (.Values.defaultRules.disabled.etcdExcessiveDatabaseGrowth | default false) }} + - alert: etcdExcessiveDatabaseGrowth annotations: - message: '{{`{{`}} $value {{`}}`}}% of requests for {{`{{`}} $labels.method {{`}}`}} failed on etcd instance {{`{{`}} $labels.instance {{`}}`}}.' - expr: |- - sum(rate(etcd_http_failed_total{job=~".*etcd.*", code!="404"}[5m])) BY (method) / sum(rate(etcd_http_received_total{job=~".*etcd.*"}[5m])) - BY (method) > 0.05 +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} + description: 'etcd cluster "{{`{{`}} $labels.job {{`}}`}}": Predicting running out of disk space in the next four hours, based on write observations within the past four hours on etcd instance {{`{{`}} $labels.instance {{`}}`}}, please check as it might be disruptive.' + summary: etcd cluster database growing very fast. + expr: predict_linear(etcd_mvcc_db_total_size_in_bytes[4h], 4*60*60) > etcd_server_quota_backend_bytes for: 10m labels: - severity: critical + severity: warning {{- if .Values.defaultRules.additionalRuleLabels }} {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} {{- end }} - - alert: etcdHTTPRequestsSlow +{{- end }} +{{- if not (.Values.defaultRules.disabled.etcdDatabaseHighFragmentationRatio | default false) }} + - alert: etcdDatabaseHighFragmentationRatio annotations: - message: etcd instance {{`{{`}} $labels.instance {{`}}`}} HTTP requests to {{`{{`}} $labels.method {{`}}`}} are slow. - expr: |- - histogram_quantile(0.99, rate(etcd_http_successful_duration_seconds_bucket[5m])) - > 0.15 +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} + description: 'etcd cluster "{{`{{`}} $labels.job {{`}}`}}": database size in use on instance {{`{{`}} $labels.instance {{`}}`}} is {{`{{`}} $value | humanizePercentage {{`}}`}} of the actual allocated disk space, please run defragmentation (e.g. etcdctl defrag) to retrieve the unused fragmented disk space.' + runbook_url: https://etcd.io/docs/v3.5/op-guide/maintenance/#defragmentation + summary: etcd database size in use is less than 50% of the actual allocated storage. + expr: (last_over_time(etcd_mvcc_db_total_size_in_use_in_bytes[5m]) / last_over_time(etcd_mvcc_db_total_size_in_bytes[5m])) < 0.5 for: 10m labels: severity: warning @@ -178,4 +292,5 @@ spec: {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} {{- end }} {{- end }} +{{- end }} {{- end }} \ No newline at end of file diff --git a/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/rules-1.14/k8s.rules.yaml b/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/rules-1.14/k8s.rules.yaml index 4e23b736..c3e97b66 100644 --- a/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/rules-1.14/k8s.rules.yaml +++ b/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/rules-1.14/k8s.rules.yaml @@ -1,5 +1,5 @@ {{- /* -Generated from 'k8s.rules' group from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/kubernetes-prometheusRule.yaml +Generated from 'k8s.rules' group from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/kubernetesControlPlane-prometheusRule.yaml Do not change in-place! In order to change this file first read following link: https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack */ -}} @@ -57,7 +57,7 @@ spec: record: node_namespace_pod_container:container_memory_swap - expr: |- kube_pod_container_resource_requests{resource="memory",job="kube-state-metrics"} * on (namespace, pod, cluster) - group_left() max by (namespace, pod) ( + group_left() max by (namespace, pod, cluster) ( (kube_pod_status_phase{phase=~"Pending|Running"} == 1) ) record: cluster:namespace:pod_memory:active:kube_pod_container_resource_requests @@ -66,7 +66,7 @@ spec: sum by (namespace, pod, cluster) ( max by (namespace, pod, container, cluster) ( kube_pod_container_resource_requests{resource="memory",job="kube-state-metrics"} - ) * on(namespace, pod, cluster) group_left() max by (namespace, pod) ( + ) * on(namespace, pod, cluster) group_left() max by (namespace, pod, cluster) ( kube_pod_status_phase{phase=~"Pending|Running"} == 1 ) ) @@ -74,7 +74,7 @@ spec: record: namespace_memory:kube_pod_container_resource_requests:sum - expr: |- kube_pod_container_resource_requests{resource="cpu",job="kube-state-metrics"} * on (namespace, pod, cluster) - group_left() max by (namespace, pod) ( + group_left() max by (namespace, pod, cluster) ( (kube_pod_status_phase{phase=~"Pending|Running"} == 1) ) record: cluster:namespace:pod_cpu:active:kube_pod_container_resource_requests @@ -83,7 +83,7 @@ spec: sum by (namespace, pod, cluster) ( max by (namespace, pod, container, cluster) ( kube_pod_container_resource_requests{resource="cpu",job="kube-state-metrics"} - ) * on(namespace, pod, cluster) group_left() max by (namespace, pod) ( + ) * on(namespace, pod, cluster) group_left() max by (namespace, pod, cluster) ( kube_pod_status_phase{phase=~"Pending|Running"} == 1 ) ) @@ -91,7 +91,7 @@ spec: record: namespace_cpu:kube_pod_container_resource_requests:sum - expr: |- kube_pod_container_resource_limits{resource="memory",job="kube-state-metrics"} * on (namespace, pod, cluster) - group_left() max by (namespace, pod) ( + group_left() max by (namespace, pod, cluster) ( (kube_pod_status_phase{phase=~"Pending|Running"} == 1) ) record: cluster:namespace:pod_memory:active:kube_pod_container_resource_limits @@ -100,7 +100,7 @@ spec: sum by (namespace, pod, cluster) ( max by (namespace, pod, container, cluster) ( kube_pod_container_resource_limits{resource="memory",job="kube-state-metrics"} - ) * on(namespace, pod, cluster) group_left() max by (namespace, pod) ( + ) * on(namespace, pod, cluster) group_left() max by (namespace, pod, cluster) ( kube_pod_status_phase{phase=~"Pending|Running"} == 1 ) ) @@ -108,7 +108,7 @@ spec: record: namespace_memory:kube_pod_container_resource_limits:sum - expr: |- kube_pod_container_resource_limits{resource="cpu",job="kube-state-metrics"} * on (namespace, pod, cluster) - group_left() max by (namespace, pod) ( + group_left() max by (namespace, pod, cluster) ( (kube_pod_status_phase{phase=~"Pending|Running"} == 1) ) record: cluster:namespace:pod_cpu:active:kube_pod_container_resource_limits @@ -117,7 +117,7 @@ spec: sum by (namespace, pod, cluster) ( max by (namespace, pod, container, cluster) ( kube_pod_container_resource_limits{resource="cpu",job="kube-state-metrics"} - ) * on(namespace, pod, cluster) group_left() max by (namespace, pod) ( + ) * on(namespace, pod, cluster) group_left() max by (namespace, pod, cluster) ( kube_pod_status_phase{phase=~"Pending|Running"} == 1 ) ) @@ -160,4 +160,14 @@ spec: labels: workload_type: statefulset record: namespace_workload_pod:kube_pod_owner:relabel + - expr: |- + max by (cluster, namespace, workload, pod) ( + label_replace( + kube_pod_owner{job="kube-state-metrics", owner_kind="Job"}, + "workload", "$1", "owner_name", "(.*)" + ) + ) + labels: + workload_type: job + record: namespace_workload_pod:kube_pod_owner:relabel {{- end }} \ No newline at end of file diff --git a/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/rules-1.14/kube-apiserver-availability.rules.yaml b/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/rules-1.14/kube-apiserver-availability.rules.yaml index 9de49f17..aa648b43 100644 --- a/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/rules-1.14/kube-apiserver-availability.rules.yaml +++ b/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/rules-1.14/kube-apiserver-availability.rules.yaml @@ -1,5 +1,5 @@ {{- /* -Generated from 'kube-apiserver-availability.rules' group from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/kubernetes-prometheusRule.yaml +Generated from 'kube-apiserver-availability.rules' group from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/kubernetesControlPlane-prometheusRule.yaml Do not change in-place! In order to change this file first read following link: https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack */ -}} @@ -35,28 +35,36 @@ spec: labels: verb: write record: code:apiserver_request_total:increase30d + - expr: sum by (cluster, verb, scope) (increase(apiserver_request{{ if (semverCompare ">=1.23.0-0" $kubeTargetVersion) }}_slo{{ end }}_duration_seconds_count[1h])) + record: cluster_verb_scope:apiserver_request{{ if (semverCompare ">=1.23.0-0" $kubeTargetVersion) }}_slo{{ end }}_duration_seconds_count:increase1h + - expr: sum by (cluster, verb, scope) (avg_over_time(cluster_verb_scope:apiserver_request{{ if (semverCompare ">=1.23.0-0" $kubeTargetVersion) }}_slo{{ end }}_duration_seconds_count:increase1h[30d]) * 24 * 30) + record: cluster_verb_scope:apiserver_request{{ if (semverCompare ">=1.23.0-0" $kubeTargetVersion) }}_slo{{ end }}_duration_seconds_count:increase30d + - expr: sum by (cluster, verb, scope, le) (increase(apiserver_request{{ if (semverCompare ">=1.23.0-0" $kubeTargetVersion) }}_slo{{ end }}_duration_seconds_bucket[1h])) + record: cluster_verb_scope_le:apiserver_request{{ if (semverCompare ">=1.23.0-0" $kubeTargetVersion) }}_slo{{ end }}_duration_seconds_bucket:increase1h + - expr: sum by (cluster, verb, scope, le) (avg_over_time(cluster_verb_scope_le:apiserver_request{{ if (semverCompare ">=1.23.0-0" $kubeTargetVersion) }}_slo{{ end }}_duration_seconds_bucket:increase1h[30d]) * 24 * 30) + record: cluster_verb_scope_le:apiserver_request{{ if (semverCompare ">=1.23.0-0" $kubeTargetVersion) }}_slo{{ end }}_duration_seconds_bucket:increase30d - expr: |- 1 - ( ( # write too slow - sum by (cluster) (increase(apiserver_request_duration_seconds_count{verb=~"POST|PUT|PATCH|DELETE"}[30d])) + sum by (cluster) (cluster_verb_scope:apiserver_request{{ if (semverCompare ">=1.23.0-0" $kubeTargetVersion) }}_slo{{ end }}_duration_seconds_count:increase30d{verb=~"POST|PUT|PATCH|DELETE"}) - - sum by (cluster) (increase(apiserver_request_duration_seconds_bucket{verb=~"POST|PUT|PATCH|DELETE",le="1"}[30d])) + sum by (cluster) (cluster_verb_scope_le:apiserver_request{{ if (semverCompare ">=1.23.0-0" $kubeTargetVersion) }}_slo{{ end }}_duration_seconds_bucket:increase30d{verb=~"POST|PUT|PATCH|DELETE",le="1"}) ) + ( # read too slow - sum by (cluster) (increase(apiserver_request_duration_seconds_count{verb=~"LIST|GET"}[30d])) + sum by (cluster) (cluster_verb_scope:apiserver_request{{ if (semverCompare ">=1.23.0-0" $kubeTargetVersion) }}_slo{{ end }}_duration_seconds_count:increase30d{verb=~"LIST|GET"}) - ( ( - sum by (cluster) (increase(apiserver_request_duration_seconds_bucket{verb=~"LIST|GET",scope=~"resource|",le="1"}[30d])) + sum by (cluster) (cluster_verb_scope_le:apiserver_request{{ if (semverCompare ">=1.23.0-0" $kubeTargetVersion) }}_slo{{ end }}_duration_seconds_bucket:increase30d{verb=~"LIST|GET",scope=~"resource|",le="1"}) or vector(0) ) + - sum by (cluster) (increase(apiserver_request_duration_seconds_bucket{verb=~"LIST|GET",scope="namespace",le="5"}[30d])) + sum by (cluster) (cluster_verb_scope_le:apiserver_request{{ if (semverCompare ">=1.23.0-0" $kubeTargetVersion) }}_slo{{ end }}_duration_seconds_bucket:increase30d{verb=~"LIST|GET",scope="namespace",le="5"}) + - sum by (cluster) (increase(apiserver_request_duration_seconds_bucket{verb=~"LIST|GET",scope="cluster",le="40"}[30d])) + sum by (cluster) (cluster_verb_scope_le:apiserver_request{{ if (semverCompare ">=1.23.0-0" $kubeTargetVersion) }}_slo{{ end }}_duration_seconds_bucket:increase30d{verb=~"LIST|GET",scope="cluster",le="30"}) ) ) + # errors @@ -69,19 +77,19 @@ spec: record: apiserver_request:availability30d - expr: |- 1 - ( - sum by (cluster) (increase(apiserver_request_duration_seconds_count{job="apiserver",verb=~"LIST|GET"}[30d])) + sum by (cluster) (cluster_verb_scope:apiserver_request{{ if (semverCompare ">=1.23.0-0" $kubeTargetVersion) }}_slo{{ end }}_duration_seconds_count:increase30d{verb=~"LIST|GET"}) - ( # too slow ( - sum by (cluster) (increase(apiserver_request_duration_seconds_bucket{job="apiserver",verb=~"LIST|GET",scope=~"resource|",le="1"}[30d])) + sum by (cluster) (cluster_verb_scope_le:apiserver_request{{ if (semverCompare ">=1.23.0-0" $kubeTargetVersion) }}_slo{{ end }}_duration_seconds_bucket:increase30d{verb=~"LIST|GET",scope=~"resource|",le="1"}) or vector(0) ) + - sum by (cluster) (increase(apiserver_request_duration_seconds_bucket{job="apiserver",verb=~"LIST|GET",scope="namespace",le="5"}[30d])) + sum by (cluster) (cluster_verb_scope_le:apiserver_request{{ if (semverCompare ">=1.23.0-0" $kubeTargetVersion) }}_slo{{ end }}_duration_seconds_bucket:increase30d{verb=~"LIST|GET",scope="namespace",le="5"}) + - sum by (cluster) (increase(apiserver_request_duration_seconds_bucket{job="apiserver",verb=~"LIST|GET",scope="cluster",le="40"}[30d])) + sum by (cluster) (cluster_verb_scope_le:apiserver_request{{ if (semverCompare ">=1.23.0-0" $kubeTargetVersion) }}_slo{{ end }}_duration_seconds_bucket:increase30d{verb=~"LIST|GET",scope="cluster",le="30"}) ) + # errors @@ -96,9 +104,9 @@ spec: 1 - ( ( # too slow - sum by (cluster) (increase(apiserver_request_duration_seconds_count{verb=~"POST|PUT|PATCH|DELETE"}[30d])) + sum by (cluster) (cluster_verb_scope:apiserver_request{{ if (semverCompare ">=1.23.0-0" $kubeTargetVersion) }}_slo{{ end }}_duration_seconds_count:increase30d{verb=~"POST|PUT|PATCH|DELETE"}) - - sum by (cluster) (increase(apiserver_request_duration_seconds_bucket{verb=~"POST|PUT|PATCH|DELETE",le="1"}[30d])) + sum by (cluster) (cluster_verb_scope_le:apiserver_request{{ if (semverCompare ">=1.23.0-0" $kubeTargetVersion) }}_slo{{ end }}_duration_seconds_bucket:increase30d{verb=~"POST|PUT|PATCH|DELETE",le="1"}) ) + # errors diff --git a/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/rules-1.14/kube-apiserver-burnrate.rules.yaml b/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/rules-1.14/kube-apiserver-burnrate.rules.yaml index f2b8563b..1cac2da6 100644 --- a/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/rules-1.14/kube-apiserver-burnrate.rules.yaml +++ b/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/rules-1.14/kube-apiserver-burnrate.rules.yaml @@ -1,10 +1,10 @@ {{- /* -Generated from 'kube-apiserver-burnrate.rules' group from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/kubernetes-prometheusRule.yaml +Generated from 'kube-apiserver-burnrate.rules' group from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/kubernetesControlPlane-prometheusRule.yaml Do not change in-place! In order to change this file first read following link: https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack */ -}} {{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} -{{- if and (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.defaultRules.create }} +{{- if and (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.defaultRules.create .Values.kubeApiServer.enabled .Values.defaultRules.rules.kubeApiserverBurnrate }} apiVersion: monitoring.coreos.com/v1 kind: PrometheusRule metadata: @@ -28,18 +28,18 @@ spec: ( ( # too slow - sum by (cluster) (rate(apiserver_request_duration_seconds_count{job="apiserver",verb=~"LIST|GET"}[1d])) + sum by (cluster) (rate(apiserver_request{{ if (semverCompare ">=1.23.0-0" $kubeTargetVersion) }}_slo{{ end }}_duration_seconds_count{job="apiserver",verb=~"LIST|GET",subresource!~"proxy|attach|log|exec|portforward"}[1d])) - ( ( - sum by (cluster) (rate(apiserver_request_duration_seconds_bucket{job="apiserver",verb=~"LIST|GET",scope=~"resource|",le="1"}[1d])) + sum by (cluster) (rate(apiserver_request{{ if (semverCompare ">=1.23.0-0" $kubeTargetVersion) }}_slo{{ end }}_duration_seconds_bucket{job="apiserver",verb=~"LIST|GET",subresource!~"proxy|attach|log|exec|portforward",scope=~"resource|",le="1"}[1d])) or vector(0) ) + - sum by (cluster) (rate(apiserver_request_duration_seconds_bucket{job="apiserver",verb=~"LIST|GET",scope="namespace",le="5"}[1d])) + sum by (cluster) (rate(apiserver_request{{ if (semverCompare ">=1.23.0-0" $kubeTargetVersion) }}_slo{{ end }}_duration_seconds_bucket{job="apiserver",verb=~"LIST|GET",subresource!~"proxy|attach|log|exec|portforward",scope="namespace",le="5"}[1d])) + - sum by (cluster) (rate(apiserver_request_duration_seconds_bucket{job="apiserver",verb=~"LIST|GET",scope="cluster",le="40"}[1d])) + sum by (cluster) (rate(apiserver_request{{ if (semverCompare ">=1.23.0-0" $kubeTargetVersion) }}_slo{{ end }}_duration_seconds_bucket{job="apiserver",verb=~"LIST|GET",subresource!~"proxy|attach|log|exec|portforward",scope="cluster",le="30"}[1d])) ) ) + @@ -55,18 +55,18 @@ spec: ( ( # too slow - sum by (cluster) (rate(apiserver_request_duration_seconds_count{job="apiserver",verb=~"LIST|GET"}[1h])) + sum by (cluster) (rate(apiserver_request{{ if (semverCompare ">=1.23.0-0" $kubeTargetVersion) }}_slo{{ end }}_duration_seconds_count{job="apiserver",verb=~"LIST|GET",subresource!~"proxy|attach|log|exec|portforward"}[1h])) - ( ( - sum by (cluster) (rate(apiserver_request_duration_seconds_bucket{job="apiserver",verb=~"LIST|GET",scope=~"resource|",le="1"}[1h])) + sum by (cluster) (rate(apiserver_request{{ if (semverCompare ">=1.23.0-0" $kubeTargetVersion) }}_slo{{ end }}_duration_seconds_bucket{job="apiserver",verb=~"LIST|GET",subresource!~"proxy|attach|log|exec|portforward",scope=~"resource|",le="1"}[1h])) or vector(0) ) + - sum by (cluster) (rate(apiserver_request_duration_seconds_bucket{job="apiserver",verb=~"LIST|GET",scope="namespace",le="5"}[1h])) + sum by (cluster) (rate(apiserver_request{{ if (semverCompare ">=1.23.0-0" $kubeTargetVersion) }}_slo{{ end }}_duration_seconds_bucket{job="apiserver",verb=~"LIST|GET",subresource!~"proxy|attach|log|exec|portforward",scope="namespace",le="5"}[1h])) + - sum by (cluster) (rate(apiserver_request_duration_seconds_bucket{job="apiserver",verb=~"LIST|GET",scope="cluster",le="40"}[1h])) + sum by (cluster) (rate(apiserver_request{{ if (semverCompare ">=1.23.0-0" $kubeTargetVersion) }}_slo{{ end }}_duration_seconds_bucket{job="apiserver",verb=~"LIST|GET",subresource!~"proxy|attach|log|exec|portforward",scope="cluster",le="30"}[1h])) ) ) + @@ -82,18 +82,18 @@ spec: ( ( # too slow - sum by (cluster) (rate(apiserver_request_duration_seconds_count{job="apiserver",verb=~"LIST|GET"}[2h])) + sum by (cluster) (rate(apiserver_request{{ if (semverCompare ">=1.23.0-0" $kubeTargetVersion) }}_slo{{ end }}_duration_seconds_count{job="apiserver",verb=~"LIST|GET",subresource!~"proxy|attach|log|exec|portforward"}[2h])) - ( ( - sum by (cluster) (rate(apiserver_request_duration_seconds_bucket{job="apiserver",verb=~"LIST|GET",scope=~"resource|",le="1"}[2h])) + sum by (cluster) (rate(apiserver_request{{ if (semverCompare ">=1.23.0-0" $kubeTargetVersion) }}_slo{{ end }}_duration_seconds_bucket{job="apiserver",verb=~"LIST|GET",subresource!~"proxy|attach|log|exec|portforward",scope=~"resource|",le="1"}[2h])) or vector(0) ) + - sum by (cluster) (rate(apiserver_request_duration_seconds_bucket{job="apiserver",verb=~"LIST|GET",scope="namespace",le="5"}[2h])) + sum by (cluster) (rate(apiserver_request{{ if (semverCompare ">=1.23.0-0" $kubeTargetVersion) }}_slo{{ end }}_duration_seconds_bucket{job="apiserver",verb=~"LIST|GET",subresource!~"proxy|attach|log|exec|portforward",scope="namespace",le="5"}[2h])) + - sum by (cluster) (rate(apiserver_request_duration_seconds_bucket{job="apiserver",verb=~"LIST|GET",scope="cluster",le="40"}[2h])) + sum by (cluster) (rate(apiserver_request{{ if (semverCompare ">=1.23.0-0" $kubeTargetVersion) }}_slo{{ end }}_duration_seconds_bucket{job="apiserver",verb=~"LIST|GET",subresource!~"proxy|attach|log|exec|portforward",scope="cluster",le="30"}[2h])) ) ) + @@ -109,18 +109,18 @@ spec: ( ( # too slow - sum by (cluster) (rate(apiserver_request_duration_seconds_count{job="apiserver",verb=~"LIST|GET"}[30m])) + sum by (cluster) (rate(apiserver_request{{ if (semverCompare ">=1.23.0-0" $kubeTargetVersion) }}_slo{{ end }}_duration_seconds_count{job="apiserver",verb=~"LIST|GET",subresource!~"proxy|attach|log|exec|portforward"}[30m])) - ( ( - sum by (cluster) (rate(apiserver_request_duration_seconds_bucket{job="apiserver",verb=~"LIST|GET",scope=~"resource|",le="1"}[30m])) + sum by (cluster) (rate(apiserver_request{{ if (semverCompare ">=1.23.0-0" $kubeTargetVersion) }}_slo{{ end }}_duration_seconds_bucket{job="apiserver",verb=~"LIST|GET",subresource!~"proxy|attach|log|exec|portforward",scope=~"resource|",le="1"}[30m])) or vector(0) ) + - sum by (cluster) (rate(apiserver_request_duration_seconds_bucket{job="apiserver",verb=~"LIST|GET",scope="namespace",le="5"}[30m])) + sum by (cluster) (rate(apiserver_request{{ if (semverCompare ">=1.23.0-0" $kubeTargetVersion) }}_slo{{ end }}_duration_seconds_bucket{job="apiserver",verb=~"LIST|GET",subresource!~"proxy|attach|log|exec|portforward",scope="namespace",le="5"}[30m])) + - sum by (cluster) (rate(apiserver_request_duration_seconds_bucket{job="apiserver",verb=~"LIST|GET",scope="cluster",le="40"}[30m])) + sum by (cluster) (rate(apiserver_request{{ if (semverCompare ">=1.23.0-0" $kubeTargetVersion) }}_slo{{ end }}_duration_seconds_bucket{job="apiserver",verb=~"LIST|GET",subresource!~"proxy|attach|log|exec|portforward",scope="cluster",le="30"}[30m])) ) ) + @@ -136,18 +136,18 @@ spec: ( ( # too slow - sum by (cluster) (rate(apiserver_request_duration_seconds_count{job="apiserver",verb=~"LIST|GET"}[3d])) + sum by (cluster) (rate(apiserver_request{{ if (semverCompare ">=1.23.0-0" $kubeTargetVersion) }}_slo{{ end }}_duration_seconds_count{job="apiserver",verb=~"LIST|GET",subresource!~"proxy|attach|log|exec|portforward"}[3d])) - ( ( - sum by (cluster) (rate(apiserver_request_duration_seconds_bucket{job="apiserver",verb=~"LIST|GET",scope=~"resource|",le="1"}[3d])) + sum by (cluster) (rate(apiserver_request{{ if (semverCompare ">=1.23.0-0" $kubeTargetVersion) }}_slo{{ end }}_duration_seconds_bucket{job="apiserver",verb=~"LIST|GET",subresource!~"proxy|attach|log|exec|portforward",scope=~"resource|",le="1"}[3d])) or vector(0) ) + - sum by (cluster) (rate(apiserver_request_duration_seconds_bucket{job="apiserver",verb=~"LIST|GET",scope="namespace",le="5"}[3d])) + sum by (cluster) (rate(apiserver_request{{ if (semverCompare ">=1.23.0-0" $kubeTargetVersion) }}_slo{{ end }}_duration_seconds_bucket{job="apiserver",verb=~"LIST|GET",subresource!~"proxy|attach|log|exec|portforward",scope="namespace",le="5"}[3d])) + - sum by (cluster) (rate(apiserver_request_duration_seconds_bucket{job="apiserver",verb=~"LIST|GET",scope="cluster",le="40"}[3d])) + sum by (cluster) (rate(apiserver_request{{ if (semverCompare ">=1.23.0-0" $kubeTargetVersion) }}_slo{{ end }}_duration_seconds_bucket{job="apiserver",verb=~"LIST|GET",subresource!~"proxy|attach|log|exec|portforward",scope="cluster",le="30"}[3d])) ) ) + @@ -163,18 +163,18 @@ spec: ( ( # too slow - sum by (cluster) (rate(apiserver_request_duration_seconds_count{job="apiserver",verb=~"LIST|GET"}[5m])) + sum by (cluster) (rate(apiserver_request{{ if (semverCompare ">=1.23.0-0" $kubeTargetVersion) }}_slo{{ end }}_duration_seconds_count{job="apiserver",verb=~"LIST|GET",subresource!~"proxy|attach|log|exec|portforward"}[5m])) - ( ( - sum by (cluster) (rate(apiserver_request_duration_seconds_bucket{job="apiserver",verb=~"LIST|GET",scope=~"resource|",le="1"}[5m])) + sum by (cluster) (rate(apiserver_request{{ if (semverCompare ">=1.23.0-0" $kubeTargetVersion) }}_slo{{ end }}_duration_seconds_bucket{job="apiserver",verb=~"LIST|GET",subresource!~"proxy|attach|log|exec|portforward",scope=~"resource|",le="1"}[5m])) or vector(0) ) + - sum by (cluster) (rate(apiserver_request_duration_seconds_bucket{job="apiserver",verb=~"LIST|GET",scope="namespace",le="5"}[5m])) + sum by (cluster) (rate(apiserver_request{{ if (semverCompare ">=1.23.0-0" $kubeTargetVersion) }}_slo{{ end }}_duration_seconds_bucket{job="apiserver",verb=~"LIST|GET",subresource!~"proxy|attach|log|exec|portforward",scope="namespace",le="5"}[5m])) + - sum by (cluster) (rate(apiserver_request_duration_seconds_bucket{job="apiserver",verb=~"LIST|GET",scope="cluster",le="40"}[5m])) + sum by (cluster) (rate(apiserver_request{{ if (semverCompare ">=1.23.0-0" $kubeTargetVersion) }}_slo{{ end }}_duration_seconds_bucket{job="apiserver",verb=~"LIST|GET",subresource!~"proxy|attach|log|exec|portforward",scope="cluster",le="30"}[5m])) ) ) + @@ -190,18 +190,18 @@ spec: ( ( # too slow - sum by (cluster) (rate(apiserver_request_duration_seconds_count{job="apiserver",verb=~"LIST|GET"}[6h])) + sum by (cluster) (rate(apiserver_request{{ if (semverCompare ">=1.23.0-0" $kubeTargetVersion) }}_slo{{ end }}_duration_seconds_count{job="apiserver",verb=~"LIST|GET",subresource!~"proxy|attach|log|exec|portforward"}[6h])) - ( ( - sum by (cluster) (rate(apiserver_request_duration_seconds_bucket{job="apiserver",verb=~"LIST|GET",scope=~"resource|",le="1"}[6h])) + sum by (cluster) (rate(apiserver_request{{ if (semverCompare ">=1.23.0-0" $kubeTargetVersion) }}_slo{{ end }}_duration_seconds_bucket{job="apiserver",verb=~"LIST|GET",subresource!~"proxy|attach|log|exec|portforward",scope=~"resource|",le="1"}[6h])) or vector(0) ) + - sum by (cluster) (rate(apiserver_request_duration_seconds_bucket{job="apiserver",verb=~"LIST|GET",scope="namespace",le="5"}[6h])) + sum by (cluster) (rate(apiserver_request{{ if (semverCompare ">=1.23.0-0" $kubeTargetVersion) }}_slo{{ end }}_duration_seconds_bucket{job="apiserver",verb=~"LIST|GET",subresource!~"proxy|attach|log|exec|portforward",scope="namespace",le="5"}[6h])) + - sum by (cluster) (rate(apiserver_request_duration_seconds_bucket{job="apiserver",verb=~"LIST|GET",scope="cluster",le="40"}[6h])) + sum by (cluster) (rate(apiserver_request{{ if (semverCompare ">=1.23.0-0" $kubeTargetVersion) }}_slo{{ end }}_duration_seconds_bucket{job="apiserver",verb=~"LIST|GET",subresource!~"proxy|attach|log|exec|portforward",scope="cluster",le="30"}[6h])) ) ) + @@ -217,9 +217,9 @@ spec: ( ( # too slow - sum by (cluster) (rate(apiserver_request_duration_seconds_count{job="apiserver",verb=~"POST|PUT|PATCH|DELETE"}[1d])) + sum by (cluster) (rate(apiserver_request{{ if (semverCompare ">=1.23.0-0" $kubeTargetVersion) }}_slo{{ end }}_duration_seconds_count{job="apiserver",verb=~"POST|PUT|PATCH|DELETE",subresource!~"proxy|attach|log|exec|portforward"}[1d])) - - sum by (cluster) (rate(apiserver_request_duration_seconds_bucket{job="apiserver",verb=~"POST|PUT|PATCH|DELETE",le="1"}[1d])) + sum by (cluster) (rate(apiserver_request{{ if (semverCompare ">=1.23.0-0" $kubeTargetVersion) }}_slo{{ end }}_duration_seconds_bucket{job="apiserver",verb=~"POST|PUT|PATCH|DELETE",subresource!~"proxy|attach|log|exec|portforward",le="1"}[1d])) ) + sum by (cluster) (rate(apiserver_request_total{job="apiserver",verb=~"POST|PUT|PATCH|DELETE",code=~"5.."}[1d])) @@ -233,9 +233,9 @@ spec: ( ( # too slow - sum by (cluster) (rate(apiserver_request_duration_seconds_count{job="apiserver",verb=~"POST|PUT|PATCH|DELETE"}[1h])) + sum by (cluster) (rate(apiserver_request{{ if (semverCompare ">=1.23.0-0" $kubeTargetVersion) }}_slo{{ end }}_duration_seconds_count{job="apiserver",verb=~"POST|PUT|PATCH|DELETE",subresource!~"proxy|attach|log|exec|portforward"}[1h])) - - sum by (cluster) (rate(apiserver_request_duration_seconds_bucket{job="apiserver",verb=~"POST|PUT|PATCH|DELETE",le="1"}[1h])) + sum by (cluster) (rate(apiserver_request{{ if (semverCompare ">=1.23.0-0" $kubeTargetVersion) }}_slo{{ end }}_duration_seconds_bucket{job="apiserver",verb=~"POST|PUT|PATCH|DELETE",subresource!~"proxy|attach|log|exec|portforward",le="1"}[1h])) ) + sum by (cluster) (rate(apiserver_request_total{job="apiserver",verb=~"POST|PUT|PATCH|DELETE",code=~"5.."}[1h])) @@ -249,9 +249,9 @@ spec: ( ( # too slow - sum by (cluster) (rate(apiserver_request_duration_seconds_count{job="apiserver",verb=~"POST|PUT|PATCH|DELETE"}[2h])) + sum by (cluster) (rate(apiserver_request{{ if (semverCompare ">=1.23.0-0" $kubeTargetVersion) }}_slo{{ end }}_duration_seconds_count{job="apiserver",verb=~"POST|PUT|PATCH|DELETE",subresource!~"proxy|attach|log|exec|portforward"}[2h])) - - sum by (cluster) (rate(apiserver_request_duration_seconds_bucket{job="apiserver",verb=~"POST|PUT|PATCH|DELETE",le="1"}[2h])) + sum by (cluster) (rate(apiserver_request{{ if (semverCompare ">=1.23.0-0" $kubeTargetVersion) }}_slo{{ end }}_duration_seconds_bucket{job="apiserver",verb=~"POST|PUT|PATCH|DELETE",subresource!~"proxy|attach|log|exec|portforward",le="1"}[2h])) ) + sum by (cluster) (rate(apiserver_request_total{job="apiserver",verb=~"POST|PUT|PATCH|DELETE",code=~"5.."}[2h])) @@ -265,9 +265,9 @@ spec: ( ( # too slow - sum by (cluster) (rate(apiserver_request_duration_seconds_count{job="apiserver",verb=~"POST|PUT|PATCH|DELETE"}[30m])) + sum by (cluster) (rate(apiserver_request{{ if (semverCompare ">=1.23.0-0" $kubeTargetVersion) }}_slo{{ end }}_duration_seconds_count{job="apiserver",verb=~"POST|PUT|PATCH|DELETE",subresource!~"proxy|attach|log|exec|portforward"}[30m])) - - sum by (cluster) (rate(apiserver_request_duration_seconds_bucket{job="apiserver",verb=~"POST|PUT|PATCH|DELETE",le="1"}[30m])) + sum by (cluster) (rate(apiserver_request{{ if (semverCompare ">=1.23.0-0" $kubeTargetVersion) }}_slo{{ end }}_duration_seconds_bucket{job="apiserver",verb=~"POST|PUT|PATCH|DELETE",subresource!~"proxy|attach|log|exec|portforward",le="1"}[30m])) ) + sum by (cluster) (rate(apiserver_request_total{job="apiserver",verb=~"POST|PUT|PATCH|DELETE",code=~"5.."}[30m])) @@ -281,9 +281,9 @@ spec: ( ( # too slow - sum by (cluster) (rate(apiserver_request_duration_seconds_count{job="apiserver",verb=~"POST|PUT|PATCH|DELETE"}[3d])) + sum by (cluster) (rate(apiserver_request{{ if (semverCompare ">=1.23.0-0" $kubeTargetVersion) }}_slo{{ end }}_duration_seconds_count{job="apiserver",verb=~"POST|PUT|PATCH|DELETE",subresource!~"proxy|attach|log|exec|portforward"}[3d])) - - sum by (cluster) (rate(apiserver_request_duration_seconds_bucket{job="apiserver",verb=~"POST|PUT|PATCH|DELETE",le="1"}[3d])) + sum by (cluster) (rate(apiserver_request{{ if (semverCompare ">=1.23.0-0" $kubeTargetVersion) }}_slo{{ end }}_duration_seconds_bucket{job="apiserver",verb=~"POST|PUT|PATCH|DELETE",subresource!~"proxy|attach|log|exec|portforward",le="1"}[3d])) ) + sum by (cluster) (rate(apiserver_request_total{job="apiserver",verb=~"POST|PUT|PATCH|DELETE",code=~"5.."}[3d])) @@ -297,9 +297,9 @@ spec: ( ( # too slow - sum by (cluster) (rate(apiserver_request_duration_seconds_count{job="apiserver",verb=~"POST|PUT|PATCH|DELETE"}[5m])) + sum by (cluster) (rate(apiserver_request{{ if (semverCompare ">=1.23.0-0" $kubeTargetVersion) }}_slo{{ end }}_duration_seconds_count{job="apiserver",verb=~"POST|PUT|PATCH|DELETE",subresource!~"proxy|attach|log|exec|portforward"}[5m])) - - sum by (cluster) (rate(apiserver_request_duration_seconds_bucket{job="apiserver",verb=~"POST|PUT|PATCH|DELETE",le="1"}[5m])) + sum by (cluster) (rate(apiserver_request{{ if (semverCompare ">=1.23.0-0" $kubeTargetVersion) }}_slo{{ end }}_duration_seconds_bucket{job="apiserver",verb=~"POST|PUT|PATCH|DELETE",subresource!~"proxy|attach|log|exec|portforward",le="1"}[5m])) ) + sum by (cluster) (rate(apiserver_request_total{job="apiserver",verb=~"POST|PUT|PATCH|DELETE",code=~"5.."}[5m])) @@ -313,9 +313,9 @@ spec: ( ( # too slow - sum by (cluster) (rate(apiserver_request_duration_seconds_count{job="apiserver",verb=~"POST|PUT|PATCH|DELETE"}[6h])) + sum by (cluster) (rate(apiserver_request{{ if (semverCompare ">=1.23.0-0" $kubeTargetVersion) }}_slo{{ end }}_duration_seconds_count{job="apiserver",verb=~"POST|PUT|PATCH|DELETE",subresource!~"proxy|attach|log|exec|portforward"}[6h])) - - sum by (cluster) (rate(apiserver_request_duration_seconds_bucket{job="apiserver",verb=~"POST|PUT|PATCH|DELETE",le="1"}[6h])) + sum by (cluster) (rate(apiserver_request{{ if (semverCompare ">=1.23.0-0" $kubeTargetVersion) }}_slo{{ end }}_duration_seconds_bucket{job="apiserver",verb=~"POST|PUT|PATCH|DELETE",subresource!~"proxy|attach|log|exec|portforward",le="1"}[6h])) ) + sum by (cluster) (rate(apiserver_request_total{job="apiserver",verb=~"POST|PUT|PATCH|DELETE",code=~"5.."}[6h])) diff --git a/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/rules-1.14/kube-apiserver-histogram.rules.yaml b/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/rules-1.14/kube-apiserver-histogram.rules.yaml index f5886a15..9d2ea4d1 100644 --- a/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/rules-1.14/kube-apiserver-histogram.rules.yaml +++ b/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/rules-1.14/kube-apiserver-histogram.rules.yaml @@ -1,10 +1,10 @@ {{- /* -Generated from 'kube-apiserver-histogram.rules' group from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/kubernetes-prometheusRule.yaml +Generated from 'kube-apiserver-histogram.rules' group from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/kubernetesControlPlane-prometheusRule.yaml Do not change in-place! In order to change this file first read following link: https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack */ -}} {{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} -{{- if and (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.defaultRules.create }} +{{- if and (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.defaultRules.create .Values.kubeApiServer.enabled .Values.defaultRules.rules.kubeApiserverHistogram }} apiVersion: monitoring.coreos.com/v1 kind: PrometheusRule metadata: @@ -24,26 +24,14 @@ spec: groups: - name: kube-apiserver-histogram.rules rules: - - expr: histogram_quantile(0.99, sum by (cluster, le, resource) (rate(apiserver_request_duration_seconds_bucket{job="apiserver",verb=~"LIST|GET"}[5m]))) > 0 + - expr: histogram_quantile(0.99, sum by (cluster, le, resource) (rate(apiserver_request{{ if (semverCompare ">=1.23.0-0" $kubeTargetVersion) }}_slo{{ end }}_duration_seconds_bucket{job="apiserver",verb=~"LIST|GET",subresource!~"proxy|attach|log|exec|portforward"}[5m]))) > 0 labels: quantile: '0.99' verb: read - record: cluster_quantile:apiserver_request_duration_seconds:histogram_quantile - - expr: histogram_quantile(0.99, sum by (cluster, le, resource) (rate(apiserver_request_duration_seconds_bucket{job="apiserver",verb=~"POST|PUT|PATCH|DELETE"}[5m]))) > 0 + record: cluster_quantile:apiserver_request{{ if (semverCompare ">=1.23.0-0" $kubeTargetVersion) }}_slo{{ end }}_duration_seconds:histogram_quantile + - expr: histogram_quantile(0.99, sum by (cluster, le, resource) (rate(apiserver_request{{ if (semverCompare ">=1.23.0-0" $kubeTargetVersion) }}_slo{{ end }}_duration_seconds_bucket{job="apiserver",verb=~"POST|PUT|PATCH|DELETE",subresource!~"proxy|attach|log|exec|portforward"}[5m]))) > 0 labels: quantile: '0.99' verb: write - record: cluster_quantile:apiserver_request_duration_seconds:histogram_quantile - - expr: histogram_quantile(0.99, sum(rate(apiserver_request_duration_seconds_bucket{job="apiserver",subresource!="log",verb!~"LIST|WATCH|WATCHLIST|DELETECOLLECTION|PROXY|CONNECT"}[5m])) without(instance, pod)) - labels: - quantile: '0.99' - record: cluster_quantile:apiserver_request_duration_seconds:histogram_quantile - - expr: histogram_quantile(0.9, sum(rate(apiserver_request_duration_seconds_bucket{job="apiserver",subresource!="log",verb!~"LIST|WATCH|WATCHLIST|DELETECOLLECTION|PROXY|CONNECT"}[5m])) without(instance, pod)) - labels: - quantile: '0.9' - record: cluster_quantile:apiserver_request_duration_seconds:histogram_quantile - - expr: histogram_quantile(0.5, sum(rate(apiserver_request_duration_seconds_bucket{job="apiserver",subresource!="log",verb!~"LIST|WATCH|WATCHLIST|DELETECOLLECTION|PROXY|CONNECT"}[5m])) without(instance, pod)) - labels: - quantile: '0.5' - record: cluster_quantile:apiserver_request_duration_seconds:histogram_quantile + record: cluster_quantile:apiserver_request{{ if (semverCompare ">=1.23.0-0" $kubeTargetVersion) }}_slo{{ end }}_duration_seconds:histogram_quantile {{- end }} \ No newline at end of file diff --git a/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/rules-1.14/kube-apiserver-slos.yaml b/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/rules-1.14/kube-apiserver-slos.yaml index 22ede051..867fe20d 100644 --- a/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/rules-1.14/kube-apiserver-slos.yaml +++ b/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/rules-1.14/kube-apiserver-slos.yaml @@ -1,5 +1,5 @@ {{- /* -Generated from 'kube-apiserver-slos' group from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/kubernetes-prometheusRule.yaml +Generated from 'kube-apiserver-slos' group from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/kubernetesControlPlane-prometheusRule.yaml Do not change in-place! In order to change this file first read following link: https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack */ -}} @@ -24,10 +24,14 @@ spec: groups: - name: kube-apiserver-slos rules: +{{- if not (.Values.defaultRules.disabled.KubeAPIErrorBudgetBurn | default false) }} - alert: KubeAPIErrorBudgetBurn annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} description: The API server is burning too much error budget. - runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubeapierrorbudgetburn + runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubeapierrorbudgetburn summary: The API server is burning too much error budget. expr: |- sum(apiserver_request:burnrate1h) > (14.40 * 0.01000) @@ -41,10 +45,15 @@ spec: {{- if .Values.defaultRules.additionalRuleLabels }} {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} {{- end }} +{{- end }} +{{- if not (.Values.defaultRules.disabled.KubeAPIErrorBudgetBurn | default false) }} - alert: KubeAPIErrorBudgetBurn annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} description: The API server is burning too much error budget. - runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubeapierrorbudgetburn + runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubeapierrorbudgetburn summary: The API server is burning too much error budget. expr: |- sum(apiserver_request:burnrate6h) > (6.00 * 0.01000) @@ -58,10 +67,15 @@ spec: {{- if .Values.defaultRules.additionalRuleLabels }} {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} {{- end }} +{{- end }} +{{- if not (.Values.defaultRules.disabled.KubeAPIErrorBudgetBurn | default false) }} - alert: KubeAPIErrorBudgetBurn annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} description: The API server is burning too much error budget. - runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubeapierrorbudgetburn + runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubeapierrorbudgetburn summary: The API server is burning too much error budget. expr: |- sum(apiserver_request:burnrate1d) > (3.00 * 0.01000) @@ -75,10 +89,15 @@ spec: {{- if .Values.defaultRules.additionalRuleLabels }} {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} {{- end }} +{{- end }} +{{- if not (.Values.defaultRules.disabled.KubeAPIErrorBudgetBurn | default false) }} - alert: KubeAPIErrorBudgetBurn annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} description: The API server is burning too much error budget. - runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubeapierrorbudgetburn + runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubeapierrorbudgetburn summary: The API server is burning too much error budget. expr: |- sum(apiserver_request:burnrate3d) > (1.00 * 0.01000) @@ -92,4 +111,5 @@ spec: {{- if .Values.defaultRules.additionalRuleLabels }} {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} {{- end }} +{{- end }} {{- end }} \ No newline at end of file diff --git a/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/rules-1.14/kube-apiserver.rules.yaml b/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/rules-1.14/kube-apiserver.rules.yaml deleted file mode 100644 index 4bb373d6..00000000 --- a/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/rules-1.14/kube-apiserver.rules.yaml +++ /dev/null @@ -1,358 +0,0 @@ -{{- /* -Generated from 'kube-apiserver.rules' group from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/kubernetes-prometheusRule.yaml -Do not change in-place! In order to change this file first read following link: -https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack -*/ -}} -{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} -{{- if and (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.defaultRules.create .Values.kubeApiServer.enabled .Values.defaultRules.rules.kubeApiserver }} -apiVersion: monitoring.coreos.com/v1 -kind: PrometheusRule -metadata: - name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" .) "kube-apiserver.rules" | trunc 63 | trimSuffix "-" }} - namespace: {{ template "kube-prometheus-stack.namespace" . }} - labels: - app: {{ template "kube-prometheus-stack.name" . }} -{{ include "kube-prometheus-stack.labels" . | indent 4 }} -{{- if .Values.defaultRules.labels }} -{{ toYaml .Values.defaultRules.labels | indent 4 }} -{{- end }} -{{- if .Values.defaultRules.annotations }} - annotations: -{{ toYaml .Values.defaultRules.annotations | indent 4 }} -{{- end }} -spec: - groups: - - name: kube-apiserver.rules - rules: - - expr: |- - ( - ( - # too slow - sum by (cluster) (rate(apiserver_request_duration_seconds_count{job="apiserver",verb=~"LIST|GET"}[1d])) - - - ( - ( - sum by (cluster) (rate(apiserver_request_duration_seconds_bucket{job="apiserver",verb=~"LIST|GET",scope=~"resource|",le="0.1"}[1d])) - or - vector(0) - ) - + - sum by (cluster) (rate(apiserver_request_duration_seconds_bucket{job="apiserver",verb=~"LIST|GET",scope="namespace",le="0.5"}[1d])) - + - sum by (cluster) (rate(apiserver_request_duration_seconds_bucket{job="apiserver",verb=~"LIST|GET",scope="cluster",le="5"}[1d])) - ) - ) - + - # errors - sum by (cluster) (rate(apiserver_request_total{job="apiserver",verb=~"LIST|GET",code=~"5.."}[1d])) - ) - / - sum by (cluster) (rate(apiserver_request_total{job="apiserver",verb=~"LIST|GET"}[1d])) - labels: - verb: read - record: apiserver_request:burnrate1d - - expr: |- - ( - ( - # too slow - sum by (cluster) (rate(apiserver_request_duration_seconds_count{job="apiserver",verb=~"LIST|GET"}[1h])) - - - ( - ( - sum by (cluster) (rate(apiserver_request_duration_seconds_bucket{job="apiserver",verb=~"LIST|GET",scope=~"resource|",le="0.1"}[1h])) - or - vector(0) - ) - + - sum by (cluster) (rate(apiserver_request_duration_seconds_bucket{job="apiserver",verb=~"LIST|GET",scope="namespace",le="0.5"}[1h])) - + - sum by (cluster) (rate(apiserver_request_duration_seconds_bucket{job="apiserver",verb=~"LIST|GET",scope="cluster",le="5"}[1h])) - ) - ) - + - # errors - sum by (cluster) (rate(apiserver_request_total{job="apiserver",verb=~"LIST|GET",code=~"5.."}[1h])) - ) - / - sum by (cluster) (rate(apiserver_request_total{job="apiserver",verb=~"LIST|GET"}[1h])) - labels: - verb: read - record: apiserver_request:burnrate1h - - expr: |- - ( - ( - # too slow - sum by (cluster) (rate(apiserver_request_duration_seconds_count{job="apiserver",verb=~"LIST|GET"}[2h])) - - - ( - ( - sum by (cluster) (rate(apiserver_request_duration_seconds_bucket{job="apiserver",verb=~"LIST|GET",scope=~"resource|",le="0.1"}[2h])) - or - vector(0) - ) - + - sum by (cluster) (rate(apiserver_request_duration_seconds_bucket{job="apiserver",verb=~"LIST|GET",scope="namespace",le="0.5"}[2h])) - + - sum by (cluster) (rate(apiserver_request_duration_seconds_bucket{job="apiserver",verb=~"LIST|GET",scope="cluster",le="5"}[2h])) - ) - ) - + - # errors - sum by (cluster) (rate(apiserver_request_total{job="apiserver",verb=~"LIST|GET",code=~"5.."}[2h])) - ) - / - sum by (cluster) (rate(apiserver_request_total{job="apiserver",verb=~"LIST|GET"}[2h])) - labels: - verb: read - record: apiserver_request:burnrate2h - - expr: |- - ( - ( - # too slow - sum by (cluster) (rate(apiserver_request_duration_seconds_count{job="apiserver",verb=~"LIST|GET"}[30m])) - - - ( - ( - sum by (cluster) (rate(apiserver_request_duration_seconds_bucket{job="apiserver",verb=~"LIST|GET",scope=~"resource|",le="0.1"}[30m])) - or - vector(0) - ) - + - sum by (cluster) (rate(apiserver_request_duration_seconds_bucket{job="apiserver",verb=~"LIST|GET",scope="namespace",le="0.5"}[30m])) - + - sum by (cluster) (rate(apiserver_request_duration_seconds_bucket{job="apiserver",verb=~"LIST|GET",scope="cluster",le="5"}[30m])) - ) - ) - + - # errors - sum by (cluster) (rate(apiserver_request_total{job="apiserver",verb=~"LIST|GET",code=~"5.."}[30m])) - ) - / - sum by (cluster) (rate(apiserver_request_total{job="apiserver",verb=~"LIST|GET"}[30m])) - labels: - verb: read - record: apiserver_request:burnrate30m - - expr: |- - ( - ( - # too slow - sum by (cluster) (rate(apiserver_request_duration_seconds_count{job="apiserver",verb=~"LIST|GET"}[3d])) - - - ( - ( - sum by (cluster) (rate(apiserver_request_duration_seconds_bucket{job="apiserver",verb=~"LIST|GET",scope=~"resource|",le="0.1"}[3d])) - or - vector(0) - ) - + - sum by (cluster) (rate(apiserver_request_duration_seconds_bucket{job="apiserver",verb=~"LIST|GET",scope="namespace",le="0.5"}[3d])) - + - sum by (cluster) (rate(apiserver_request_duration_seconds_bucket{job="apiserver",verb=~"LIST|GET",scope="cluster",le="5"}[3d])) - ) - ) - + - # errors - sum by (cluster) (rate(apiserver_request_total{job="apiserver",verb=~"LIST|GET",code=~"5.."}[3d])) - ) - / - sum by (cluster) (rate(apiserver_request_total{job="apiserver",verb=~"LIST|GET"}[3d])) - labels: - verb: read - record: apiserver_request:burnrate3d - - expr: |- - ( - ( - # too slow - sum by (cluster) (rate(apiserver_request_duration_seconds_count{job="apiserver",verb=~"LIST|GET"}[5m])) - - - ( - ( - sum by (cluster) (rate(apiserver_request_duration_seconds_bucket{job="apiserver",verb=~"LIST|GET",scope=~"resource|",le="0.1"}[5m])) - or - vector(0) - ) - + - sum by (cluster) (rate(apiserver_request_duration_seconds_bucket{job="apiserver",verb=~"LIST|GET",scope="namespace",le="0.5"}[5m])) - + - sum by (cluster) (rate(apiserver_request_duration_seconds_bucket{job="apiserver",verb=~"LIST|GET",scope="cluster",le="5"}[5m])) - ) - ) - + - # errors - sum by (cluster) (rate(apiserver_request_total{job="apiserver",verb=~"LIST|GET",code=~"5.."}[5m])) - ) - / - sum by (cluster) (rate(apiserver_request_total{job="apiserver",verb=~"LIST|GET"}[5m])) - labels: - verb: read - record: apiserver_request:burnrate5m - - expr: |- - ( - ( - # too slow - sum by (cluster) (rate(apiserver_request_duration_seconds_count{job="apiserver",verb=~"LIST|GET"}[6h])) - - - ( - ( - sum by (cluster) (rate(apiserver_request_duration_seconds_bucket{job="apiserver",verb=~"LIST|GET",scope=~"resource|",le="0.1"}[6h])) - or - vector(0) - ) - + - sum by (cluster) (rate(apiserver_request_duration_seconds_bucket{job="apiserver",verb=~"LIST|GET",scope="namespace",le="0.5"}[6h])) - + - sum by (cluster) (rate(apiserver_request_duration_seconds_bucket{job="apiserver",verb=~"LIST|GET",scope="cluster",le="5"}[6h])) - ) - ) - + - # errors - sum by (cluster) (rate(apiserver_request_total{job="apiserver",verb=~"LIST|GET",code=~"5.."}[6h])) - ) - / - sum by (cluster) (rate(apiserver_request_total{job="apiserver",verb=~"LIST|GET"}[6h])) - labels: - verb: read - record: apiserver_request:burnrate6h - - expr: |- - ( - ( - # too slow - sum by (cluster) (rate(apiserver_request_duration_seconds_count{job="apiserver",verb=~"POST|PUT|PATCH|DELETE"}[1d])) - - - sum by (cluster) (rate(apiserver_request_duration_seconds_bucket{job="apiserver",verb=~"POST|PUT|PATCH|DELETE",le="1"}[1d])) - ) - + - sum by (cluster) (rate(apiserver_request_total{job="apiserver",verb=~"POST|PUT|PATCH|DELETE",code=~"5.."}[1d])) - ) - / - sum by (cluster) (rate(apiserver_request_total{job="apiserver",verb=~"POST|PUT|PATCH|DELETE"}[1d])) - labels: - verb: write - record: apiserver_request:burnrate1d - - expr: |- - ( - ( - # too slow - sum by (cluster) (rate(apiserver_request_duration_seconds_count{job="apiserver",verb=~"POST|PUT|PATCH|DELETE"}[1h])) - - - sum by (cluster) (rate(apiserver_request_duration_seconds_bucket{job="apiserver",verb=~"POST|PUT|PATCH|DELETE",le="1"}[1h])) - ) - + - sum by (cluster) (rate(apiserver_request_total{job="apiserver",verb=~"POST|PUT|PATCH|DELETE",code=~"5.."}[1h])) - ) - / - sum by (cluster) (rate(apiserver_request_total{job="apiserver",verb=~"POST|PUT|PATCH|DELETE"}[1h])) - labels: - verb: write - record: apiserver_request:burnrate1h - - expr: |- - ( - ( - # too slow - sum by (cluster) (rate(apiserver_request_duration_seconds_count{job="apiserver",verb=~"POST|PUT|PATCH|DELETE"}[2h])) - - - sum by (cluster) (rate(apiserver_request_duration_seconds_bucket{job="apiserver",verb=~"POST|PUT|PATCH|DELETE",le="1"}[2h])) - ) - + - sum by (cluster) (rate(apiserver_request_total{job="apiserver",verb=~"POST|PUT|PATCH|DELETE",code=~"5.."}[2h])) - ) - / - sum by (cluster) (rate(apiserver_request_total{job="apiserver",verb=~"POST|PUT|PATCH|DELETE"}[2h])) - labels: - verb: write - record: apiserver_request:burnrate2h - - expr: |- - ( - ( - # too slow - sum by (cluster) (rate(apiserver_request_duration_seconds_count{job="apiserver",verb=~"POST|PUT|PATCH|DELETE"}[30m])) - - - sum by (cluster) (rate(apiserver_request_duration_seconds_bucket{job="apiserver",verb=~"POST|PUT|PATCH|DELETE",le="1"}[30m])) - ) - + - sum by (cluster) (rate(apiserver_request_total{job="apiserver",verb=~"POST|PUT|PATCH|DELETE",code=~"5.."}[30m])) - ) - / - sum by (cluster) (rate(apiserver_request_total{job="apiserver",verb=~"POST|PUT|PATCH|DELETE"}[30m])) - labels: - verb: write - record: apiserver_request:burnrate30m - - expr: |- - ( - ( - # too slow - sum by (cluster) (rate(apiserver_request_duration_seconds_count{job="apiserver",verb=~"POST|PUT|PATCH|DELETE"}[3d])) - - - sum by (cluster) (rate(apiserver_request_duration_seconds_bucket{job="apiserver",verb=~"POST|PUT|PATCH|DELETE",le="1"}[3d])) - ) - + - sum by (cluster) (rate(apiserver_request_total{job="apiserver",verb=~"POST|PUT|PATCH|DELETE",code=~"5.."}[3d])) - ) - / - sum by (cluster) (rate(apiserver_request_total{job="apiserver",verb=~"POST|PUT|PATCH|DELETE"}[3d])) - labels: - verb: write - record: apiserver_request:burnrate3d - - expr: |- - ( - ( - # too slow - sum by (cluster) (rate(apiserver_request_duration_seconds_count{job="apiserver",verb=~"POST|PUT|PATCH|DELETE"}[5m])) - - - sum by (cluster) (rate(apiserver_request_duration_seconds_bucket{job="apiserver",verb=~"POST|PUT|PATCH|DELETE",le="1"}[5m])) - ) - + - sum by (cluster) (rate(apiserver_request_total{job="apiserver",verb=~"POST|PUT|PATCH|DELETE",code=~"5.."}[5m])) - ) - / - sum by (cluster) (rate(apiserver_request_total{job="apiserver",verb=~"POST|PUT|PATCH|DELETE"}[5m])) - labels: - verb: write - record: apiserver_request:burnrate5m - - expr: |- - ( - ( - # too slow - sum by (cluster) (rate(apiserver_request_duration_seconds_count{job="apiserver",verb=~"POST|PUT|PATCH|DELETE"}[6h])) - - - sum by (cluster) (rate(apiserver_request_duration_seconds_bucket{job="apiserver",verb=~"POST|PUT|PATCH|DELETE",le="1"}[6h])) - ) - + - sum by (cluster) (rate(apiserver_request_total{job="apiserver",verb=~"POST|PUT|PATCH|DELETE",code=~"5.."}[6h])) - ) - / - sum by (cluster) (rate(apiserver_request_total{job="apiserver",verb=~"POST|PUT|PATCH|DELETE"}[6h])) - labels: - verb: write - record: apiserver_request:burnrate6h - - expr: sum by (cluster,code,resource) (rate(apiserver_request_total{job="apiserver",verb=~"LIST|GET"}[5m])) - labels: - verb: read - record: code_resource:apiserver_request_total:rate5m - - expr: sum by (cluster,code,resource) (rate(apiserver_request_total{job="apiserver",verb=~"POST|PUT|PATCH|DELETE"}[5m])) - labels: - verb: write - record: code_resource:apiserver_request_total:rate5m - - expr: histogram_quantile(0.99, sum by (cluster, le, resource) (rate(apiserver_request_duration_seconds_bucket{job="apiserver",verb=~"LIST|GET"}[5m]))) > 0 - labels: - quantile: '0.99' - verb: read - record: cluster_quantile:apiserver_request_duration_seconds:histogram_quantile - - expr: histogram_quantile(0.99, sum by (cluster, le, resource) (rate(apiserver_request_duration_seconds_bucket{job="apiserver",verb=~"POST|PUT|PATCH|DELETE"}[5m]))) > 0 - labels: - quantile: '0.99' - verb: write - record: cluster_quantile:apiserver_request_duration_seconds:histogram_quantile - - expr: histogram_quantile(0.99, sum(rate(apiserver_request_duration_seconds_bucket{job="apiserver",subresource!="log",verb!~"LIST|WATCH|WATCHLIST|DELETECOLLECTION|PROXY|CONNECT"}[5m])) without(instance, pod)) - labels: - quantile: '0.99' - record: cluster_quantile:apiserver_request_duration_seconds:histogram_quantile - - expr: histogram_quantile(0.9, sum(rate(apiserver_request_duration_seconds_bucket{job="apiserver",subresource!="log",verb!~"LIST|WATCH|WATCHLIST|DELETECOLLECTION|PROXY|CONNECT"}[5m])) without(instance, pod)) - labels: - quantile: '0.9' - record: cluster_quantile:apiserver_request_duration_seconds:histogram_quantile - - expr: histogram_quantile(0.5, sum(rate(apiserver_request_duration_seconds_bucket{job="apiserver",subresource!="log",verb!~"LIST|WATCH|WATCHLIST|DELETECOLLECTION|PROXY|CONNECT"}[5m])) without(instance, pod)) - labels: - quantile: '0.5' - record: cluster_quantile:apiserver_request_duration_seconds:histogram_quantile -{{- end }} \ No newline at end of file diff --git a/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/rules-1.14/kube-prometheus-general.rules.yaml b/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/rules-1.14/kube-prometheus-general.rules.yaml index 1b95d214..78a3db1c 100644 --- a/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/rules-1.14/kube-prometheus-general.rules.yaml +++ b/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/rules-1.14/kube-prometheus-general.rules.yaml @@ -1,5 +1,5 @@ {{- /* -Generated from 'kube-prometheus-general.rules' group from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/kube-prometheus-prometheusRule.yaml +Generated from 'kube-prometheus-general.rules' group from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/kubePrometheus-prometheusRule.yaml Do not change in-place! In order to change this file first read following link: https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack */ -}} diff --git a/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/rules-1.14/kube-prometheus-node-recording.rules.yaml b/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/rules-1.14/kube-prometheus-node-recording.rules.yaml index 2d38ef86..0cd0ba5b 100644 --- a/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/rules-1.14/kube-prometheus-node-recording.rules.yaml +++ b/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/rules-1.14/kube-prometheus-node-recording.rules.yaml @@ -1,5 +1,5 @@ {{- /* -Generated from 'kube-prometheus-node-recording.rules' group from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/kube-prometheus-prometheusRule.yaml +Generated from 'kube-prometheus-node-recording.rules' group from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/kubePrometheus-prometheusRule.yaml Do not change in-place! In order to change this file first read following link: https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack */ -}} @@ -34,6 +34,6 @@ spec: record: instance:node_cpu:ratio - expr: sum(rate(node_cpu_seconds_total{mode!="idle",mode!="iowait",mode!="steal"}[5m])) record: cluster:node_cpu:sum_rate5m - - expr: cluster:node_cpu_seconds_total:rate5m / count(sum(node_cpu_seconds_total) BY (instance, cpu)) + - expr: cluster:node_cpu:sum_rate5m / count(sum(node_cpu_seconds_total) BY (instance, cpu)) record: cluster:node_cpu:ratio {{- end }} \ No newline at end of file diff --git a/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/rules-1.14/kube-scheduler.rules.yaml b/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/rules-1.14/kube-scheduler.rules.yaml index bfd70ff1..efa1593d 100644 --- a/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/rules-1.14/kube-scheduler.rules.yaml +++ b/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/rules-1.14/kube-scheduler.rules.yaml @@ -1,5 +1,5 @@ {{- /* -Generated from 'kube-scheduler.rules' group from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/kubernetes-prometheusRule.yaml +Generated from 'kube-scheduler.rules' group from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/kubernetesControlPlane-prometheusRule.yaml Do not change in-place! In order to change this file first read following link: https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack */ -}} diff --git a/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/rules-1.14/kube-state-metrics.yaml b/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/rules-1.14/kube-state-metrics.yaml index f7e0c439..7547436a 100644 --- a/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/rules-1.14/kube-state-metrics.yaml +++ b/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/rules-1.14/kube-state-metrics.yaml @@ -1,5 +1,5 @@ {{- /* -Generated from 'kube-state-metrics' group from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/kube-state-metrics-prometheusRule.yaml +Generated from 'kube-state-metrics' group from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/kubeStateMetrics-prometheusRule.yaml Do not change in-place! In order to change this file first read following link: https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack */ -}} @@ -24,10 +24,14 @@ spec: groups: - name: kube-state-metrics rules: +{{- if not (.Values.defaultRules.disabled.KubeStateMetricsListErrors | default false) }} - alert: KubeStateMetricsListErrors annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} description: kube-state-metrics is experiencing errors at an elevated rate in list operations. This is likely causing it to not be able to expose metrics about Kubernetes objects correctly or at all. - runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubestatemetricslisterrors + runbook_url: {{ .Values.defaultRules.runbookUrl }}/kube-state-metrics/kubestatemetricslisterrors summary: kube-state-metrics is experiencing errors in list operations. expr: |- (sum(rate(kube_state_metrics_list_total{job="kube-state-metrics",result="error"}[5m])) @@ -40,10 +44,15 @@ spec: {{- if .Values.defaultRules.additionalRuleLabels }} {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} {{- end }} +{{- end }} +{{- if not (.Values.defaultRules.disabled.KubeStateMetricsWatchErrors | default false) }} - alert: KubeStateMetricsWatchErrors annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} description: kube-state-metrics is experiencing errors at an elevated rate in watch operations. This is likely causing it to not be able to expose metrics about Kubernetes objects correctly or at all. - runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubestatemetricswatcherrors + runbook_url: {{ .Values.defaultRules.runbookUrl }}/kube-state-metrics/kubestatemetricswatcherrors summary: kube-state-metrics is experiencing errors in watch operations. expr: |- (sum(rate(kube_state_metrics_watch_total{job="kube-state-metrics",result="error"}[5m])) @@ -56,10 +65,15 @@ spec: {{- if .Values.defaultRules.additionalRuleLabels }} {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} {{- end }} +{{- end }} +{{- if not (.Values.defaultRules.disabled.KubeStateMetricsShardingMismatch | default false) }} - alert: KubeStateMetricsShardingMismatch annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} description: kube-state-metrics pods are running with different --total-shards configuration, some Kubernetes objects may be exposed multiple times or not exposed at all. - runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubestatemetricsshardingmismatch + runbook_url: {{ .Values.defaultRules.runbookUrl }}/kube-state-metrics/kubestatemetricsshardingmismatch summary: kube-state-metrics sharding is misconfigured. expr: stdvar (kube_state_metrics_total_shards{job="kube-state-metrics"}) != 0 for: 15m @@ -68,10 +82,15 @@ spec: {{- if .Values.defaultRules.additionalRuleLabels }} {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} {{- end }} +{{- end }} +{{- if not (.Values.defaultRules.disabled.KubeStateMetricsShardsMissing | default false) }} - alert: KubeStateMetricsShardsMissing annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} description: kube-state-metrics shards are missing, some Kubernetes objects are not being exposed. - runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubestatemetricsshardsmissing + runbook_url: {{ .Values.defaultRules.runbookUrl }}/kube-state-metrics/kubestatemetricsshardsmissing summary: kube-state-metrics shards are missing. expr: |- 2^max(kube_state_metrics_total_shards{job="kube-state-metrics"}) - 1 @@ -84,4 +103,5 @@ spec: {{- if .Values.defaultRules.additionalRuleLabels }} {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} {{- end }} +{{- end }} {{- end }} \ No newline at end of file diff --git a/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/rules-1.14/kubelet.rules.yaml b/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/rules-1.14/kubelet.rules.yaml index eae11af6..613c68c9 100644 --- a/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/rules-1.14/kubelet.rules.yaml +++ b/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/rules-1.14/kubelet.rules.yaml @@ -1,11 +1,11 @@ {{- /* -Generated from 'kubelet.rules' group from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/kubernetes-prometheusRule.yaml +Generated from 'kubelet.rules' group from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/kubernetesControlPlane-prometheusRule.yaml Do not change in-place! In order to change this file first read following link: https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack */ -}} {{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} {{- if and (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.defaultRules.create .Values.defaultRules.rules.kubelet }} -{{- if (include "exporter.kubelet.enabled" .) }} +{{- if (include "exporter.kubelet.enabled" .)}} apiVersion: monitoring.coreos.com/v1 kind: PrometheusRule metadata: @@ -25,15 +25,15 @@ spec: groups: - name: kubelet.rules rules: - - expr: histogram_quantile(0.99, sum(rate(kubelet_pleg_relist_duration_seconds_bucket[5m])) by (instance, le) * on(instance) group_left(node) kubelet_node_name{job="{{ include "exporter.kubelet.jobName" . }}", metrics_path="/metrics"}) + - expr: histogram_quantile(0.99, sum(rate(kubelet_pleg_relist_duration_seconds_bucket[5m])) by (cluster, instance, le) * on(cluster, instance) group_left(node) kubelet_node_name{job="{{ include "exporter.kubelet.jobName" . }}", metrics_path="/metrics"}) labels: quantile: '0.99' record: node_quantile:kubelet_pleg_relist_duration_seconds:histogram_quantile - - expr: histogram_quantile(0.9, sum(rate(kubelet_pleg_relist_duration_seconds_bucket[5m])) by (instance, le) * on(instance) group_left(node) kubelet_node_name{job="{{ include "exporter.kubelet.jobName" . }}", metrics_path="/metrics"}) + - expr: histogram_quantile(0.9, sum(rate(kubelet_pleg_relist_duration_seconds_bucket[5m])) by (cluster, instance, le) * on(cluster, instance) group_left(node) kubelet_node_name{job="{{ include "exporter.kubelet.jobName" . }}", metrics_path="/metrics"}) labels: quantile: '0.9' record: node_quantile:kubelet_pleg_relist_duration_seconds:histogram_quantile - - expr: histogram_quantile(0.5, sum(rate(kubelet_pleg_relist_duration_seconds_bucket[5m])) by (instance, le) * on(instance) group_left(node) kubelet_node_name{job="{{ include "exporter.kubelet.jobName" . }}", metrics_path="/metrics"}) + - expr: histogram_quantile(0.5, sum(rate(kubelet_pleg_relist_duration_seconds_bucket[5m])) by (cluster, instance, le) * on(cluster, instance) group_left(node) kubelet_node_name{job="{{ include "exporter.kubelet.jobName" . }}", metrics_path="/metrics"}) labels: quantile: '0.5' record: node_quantile:kubelet_pleg_relist_duration_seconds:histogram_quantile diff --git a/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/rules-1.14/kubernetes-resources.yaml b/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/rules-1.14/kubernetes-resources.yaml index 7a2ecbc3..5fab8d7a 100644 --- a/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/rules-1.14/kubernetes-resources.yaml +++ b/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/rules-1.14/kubernetes-resources.yaml @@ -1,5 +1,5 @@ {{- /* -Generated from 'kubernetes-resources' group from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/kubernetes-prometheusRule.yaml +Generated from 'kubernetes-resources' group from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/kubernetesControlPlane-prometheusRule.yaml Do not change in-place! In order to change this file first read following link: https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack */ -}} @@ -24,51 +24,59 @@ spec: groups: - name: kubernetes-resources rules: +{{- if not (.Values.defaultRules.disabled.KubeCPUOvercommit | default false) }} - alert: KubeCPUOvercommit annotations: - description: Cluster has overcommitted CPU resource requests for Pods and cannot tolerate node failure. - runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubecpuovercommit +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} + description: Cluster has overcommitted CPU resource requests for Pods by {{`{{`}} $value {{`}}`}} CPU shares and cannot tolerate node failure. + runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubecpuovercommit summary: Cluster has overcommitted CPU resource requests. expr: |- - sum(namespace_cpu:kube_pod_container_resource_requests:sum{}) - / - sum(kube_node_status_allocatable{resource="cpu"}) - > - ((count(kube_node_status_allocatable{resource="cpu"}) > 1) - 1) / count(kube_node_status_allocatable{resource="cpu"}) - for: 5m + sum(namespace_cpu:kube_pod_container_resource_requests:sum{}) - (sum(kube_node_status_allocatable{resource="cpu"}) - max(kube_node_status_allocatable{resource="cpu"})) > 0 + and + (sum(kube_node_status_allocatable{resource="cpu"}) - max(kube_node_status_allocatable{resource="cpu"})) > 0 + for: 10m labels: severity: warning {{- if .Values.defaultRules.additionalRuleLabels }} {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} {{- end }} +{{- end }} +{{- if not (.Values.defaultRules.disabled.KubeMemoryOvercommit | default false) }} - alert: KubeMemoryOvercommit annotations: - description: Cluster has overcommitted memory resource requests for Pods and cannot tolerate node failure. - runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubememoryovercommit +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} + description: Cluster has overcommitted memory resource requests for Pods by {{`{{`}} $value | humanize {{`}}`}} bytes and cannot tolerate node failure. + runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubememoryovercommit summary: Cluster has overcommitted memory resource requests. expr: |- - sum(namespace_memory:kube_pod_container_resource_requests:sum{}) - / - sum(kube_node_status_allocatable{resource="memory"}) - > - ((count(kube_node_status_allocatable{resource="memory"}) > 1) - 1) - / - count(kube_node_status_allocatable{resource="memory"}) - for: 5m + sum(namespace_memory:kube_pod_container_resource_requests:sum{}) - (sum(kube_node_status_allocatable{resource="memory"}) - max(kube_node_status_allocatable{resource="memory"})) > 0 + and + (sum(kube_node_status_allocatable{resource="memory"}) - max(kube_node_status_allocatable{resource="memory"})) > 0 + for: 10m labels: severity: warning {{- if .Values.defaultRules.additionalRuleLabels }} {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} {{- end }} +{{- end }} +{{- if not (.Values.defaultRules.disabled.KubeCPUQuotaOvercommit | default false) }} - alert: KubeCPUQuotaOvercommit annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} description: Cluster has overcommitted CPU resource requests for Namespaces. - runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubecpuquotaovercommit + runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubecpuquotaovercommit summary: Cluster has overcommitted CPU resource requests. expr: |- - sum(kube_resourcequota{job="kube-state-metrics", type="hard", resource="cpu"}) + sum(min without(resource) (kube_resourcequota{job="kube-state-metrics", type="hard", resource=~"(cpu|requests.cpu)"})) / - sum(kube_node_status_allocatable{resource="cpu"}) + sum(kube_node_status_allocatable{resource="cpu", job="kube-state-metrics"}) > 1.5 for: 5m labels: @@ -76,15 +84,20 @@ spec: {{- if .Values.defaultRules.additionalRuleLabels }} {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} {{- end }} +{{- end }} +{{- if not (.Values.defaultRules.disabled.KubeMemoryQuotaOvercommit | default false) }} - alert: KubeMemoryQuotaOvercommit annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} description: Cluster has overcommitted memory resource requests for Namespaces. - runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubememoryquotaovercommit + runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubememoryquotaovercommit summary: Cluster has overcommitted memory resource requests. expr: |- - sum(kube_resourcequota{job="kube-state-metrics", type="hard", resource="memory"}) + sum(min without(resource) (kube_resourcequota{job="kube-state-metrics", type="hard", resource=~"(memory|requests.memory)"})) / - sum(kube_node_status_allocatable{resource="memory",job="kube-state-metrics"}) + sum(kube_node_status_allocatable{resource="memory", job="kube-state-metrics"}) > 1.5 for: 5m labels: @@ -92,10 +105,15 @@ spec: {{- if .Values.defaultRules.additionalRuleLabels }} {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} {{- end }} +{{- end }} +{{- if not (.Values.defaultRules.disabled.KubeQuotaAlmostFull | default false) }} - alert: KubeQuotaAlmostFull annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} description: Namespace {{`{{`}} $labels.namespace {{`}}`}} is using {{`{{`}} $value | humanizePercentage {{`}}`}} of its {{`{{`}} $labels.resource {{`}}`}} quota. - runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubequotaalmostfull + runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubequotaalmostfull summary: Namespace quota is going to be full. expr: |- kube_resourcequota{job="kube-state-metrics", type="used"} @@ -108,10 +126,15 @@ spec: {{- if .Values.defaultRules.additionalRuleLabels }} {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} {{- end }} +{{- end }} +{{- if not (.Values.defaultRules.disabled.KubeQuotaFullyUsed | default false) }} - alert: KubeQuotaFullyUsed annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} description: Namespace {{`{{`}} $labels.namespace {{`}}`}} is using {{`{{`}} $value | humanizePercentage {{`}}`}} of its {{`{{`}} $labels.resource {{`}}`}} quota. - runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubequotafullyused + runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubequotafullyused summary: Namespace quota is fully used. expr: |- kube_resourcequota{job="kube-state-metrics", type="used"} @@ -124,10 +147,15 @@ spec: {{- if .Values.defaultRules.additionalRuleLabels }} {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} {{- end }} +{{- end }} +{{- if not (.Values.defaultRules.disabled.KubeQuotaExceeded | default false) }} - alert: KubeQuotaExceeded annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} description: Namespace {{`{{`}} $labels.namespace {{`}}`}} is using {{`{{`}} $value | humanizePercentage {{`}}`}} of its {{`{{`}} $labels.resource {{`}}`}} quota. - runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubequotaexceeded + runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubequotaexceeded summary: Namespace quota has exceeded the limits. expr: |- kube_resourcequota{job="kube-state-metrics", type="used"} @@ -140,10 +168,15 @@ spec: {{- if .Values.defaultRules.additionalRuleLabels }} {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} {{- end }} +{{- end }} +{{- if not (.Values.defaultRules.disabled.CPUThrottlingHigh | default false) }} - alert: CPUThrottlingHigh annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} description: '{{`{{`}} $value | humanizePercentage {{`}}`}} throttling of CPU in namespace {{`{{`}} $labels.namespace {{`}}`}} for container {{`{{`}} $labels.container {{`}}`}} in pod {{`{{`}} $labels.pod {{`}}`}}.' - runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-cputhrottlinghigh + runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/cputhrottlinghigh summary: Processes experience elevated CPU throttling. expr: |- sum(increase(container_cpu_cfs_throttled_periods_total{container!="", }[5m])) by (container, pod, namespace) @@ -156,4 +189,5 @@ spec: {{- if .Values.defaultRules.additionalRuleLabels }} {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} {{- end }} +{{- end }} {{- end }} \ No newline at end of file diff --git a/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/rules-1.14/kubernetes-system-apiserver.yaml b/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/rules-1.14/kubernetes-system-apiserver.yaml index c08baede..aff07d6a 100644 --- a/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/rules-1.14/kubernetes-system-apiserver.yaml +++ b/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/rules-1.14/kubernetes-system-apiserver.yaml @@ -1,5 +1,5 @@ {{- /* -Generated from 'kubernetes-system-apiserver' group from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/kubernetes-prometheusRule.yaml +Generated from 'kubernetes-system-apiserver' group from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/kubernetesControlPlane-prometheusRule.yaml Do not change in-place! In order to change this file first read following link: https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack */ -}} @@ -24,10 +24,14 @@ spec: groups: - name: kubernetes-system-apiserver rules: +{{- if not (.Values.defaultRules.disabled.KubeClientCertificateExpiration | default false) }} - alert: KubeClientCertificateExpiration annotations: - description: A client certificate used to authenticate to the apiserver is expiring in less than 7.0 days. - runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubeclientcertificateexpiration +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} + description: A client certificate used to authenticate to kubernetes apiserver is expiring in less than 7.0 days. + runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubeclientcertificateexpiration summary: Client certificate is about to expire. expr: apiserver_client_certificate_expiration_seconds_count{job="apiserver"} > 0 and on(job) histogram_quantile(0.01, sum by (job, le) (rate(apiserver_client_certificate_expiration_seconds_bucket{job="apiserver"}[5m]))) < 604800 labels: @@ -35,10 +39,15 @@ spec: {{- if .Values.defaultRules.additionalRuleLabels }} {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} {{- end }} +{{- end }} +{{- if not (.Values.defaultRules.disabled.KubeClientCertificateExpiration | default false) }} - alert: KubeClientCertificateExpiration annotations: - description: A client certificate used to authenticate to the apiserver is expiring in less than 24.0 hours. - runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubeclientcertificateexpiration +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} + description: A client certificate used to authenticate to kubernetes apiserver is expiring in less than 24.0 hours. + runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubeclientcertificateexpiration summary: Client certificate is about to expire. expr: apiserver_client_certificate_expiration_seconds_count{job="apiserver"} > 0 and on(job) histogram_quantile(0.01, sum by (job, le) (rate(apiserver_client_certificate_expiration_seconds_bucket{job="apiserver"}[5m]))) < 86400 labels: @@ -46,24 +55,33 @@ spec: {{- if .Values.defaultRules.additionalRuleLabels }} {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} {{- end }} - - alert: AggregatedAPIErrors +{{- end }} +{{- if not (.Values.defaultRules.disabled.KubeAggregatedAPIErrors | default false) }} + - alert: KubeAggregatedAPIErrors annotations: - description: An aggregated API {{`{{`}} $labels.name {{`}}`}}/{{`{{`}} $labels.namespace {{`}}`}} has reported errors. It has appeared unavailable {{`{{`}} $value | humanize {{`}}`}} times averaged over the past 10m. - runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-aggregatedapierrors - summary: An aggregated API has reported errors. - expr: sum by(name, namespace)(increase(aggregator_unavailable_apiservice_total[10m])) > 4 +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} + description: Kubernetes aggregated API {{`{{`}} $labels.name {{`}}`}}/{{`{{`}} $labels.namespace {{`}}`}} has reported errors. It has appeared unavailable {{`{{`}} $value | humanize {{`}}`}} times averaged over the past 10m. + runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubeaggregatedapierrors + summary: Kubernetes aggregated API has reported errors. + expr: sum by(name, namespace, cluster)(increase(aggregator_unavailable_apiservice_total[10m])) > 4 labels: severity: warning {{- if .Values.defaultRules.additionalRuleLabels }} {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} {{- end }} -{{- if semverCompare ">=1.18.0-0" $kubeTargetVersion }} - - alert: AggregatedAPIDown +{{- end }} +{{- if not (.Values.defaultRules.disabled.KubeAggregatedAPIDown | default false) }} + - alert: KubeAggregatedAPIDown annotations: - description: An aggregated API {{`{{`}} $labels.name {{`}}`}}/{{`{{`}} $labels.namespace {{`}}`}} has been only {{`{{`}} $value | humanize {{`}}`}}% available over the last 10m. - runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-aggregatedapidown - summary: An aggregated API is down. - expr: (1 - max by(name, namespace)(avg_over_time(aggregator_unavailable_apiservice[10m]))) * 100 < 85 +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} + description: Kubernetes aggregated API {{`{{`}} $labels.name {{`}}`}}/{{`{{`}} $labels.namespace {{`}}`}} has been only {{`{{`}} $value | humanize {{`}}`}}% available over the last 10m. + runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubeaggregatedapidown + summary: Kubernetes aggregated API is down. + expr: (1 - max by(name, namespace, cluster)(avg_over_time(aggregator_unavailable_apiservice[10m]))) * 100 < 85 for: 5m labels: severity: warning @@ -72,10 +90,14 @@ spec: {{- end }} {{- end }} {{- if .Values.kubeApiServer.enabled }} +{{- if not (.Values.defaultRules.disabled.KubeAPIDown | default false) }} - alert: KubeAPIDown annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} description: KubeAPI has disappeared from Prometheus target discovery. - runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubeapidown + runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubeapidown summary: Target disappeared from Prometheus target discovery. expr: absent(up{job="apiserver"} == 1) for: 15m @@ -85,11 +107,16 @@ spec: {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} {{- end }} {{- end }} +{{- end }} +{{- if not (.Values.defaultRules.disabled.KubeAPITerminatedRequests | default false) }} - alert: KubeAPITerminatedRequests annotations: - description: The apiserver has terminated {{`{{`}} $value | humanizePercentage {{`}}`}} of its incoming requests. - runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubeapiterminatedrequests - summary: The apiserver has terminated {{`{{`}} $value | humanizePercentage {{`}}`}} of its incoming requests. +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} + description: The kubernetes apiserver has terminated {{`{{`}} $value | humanizePercentage {{`}}`}} of its incoming requests. + runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubeapiterminatedrequests + summary: The kubernetes apiserver has terminated {{`{{`}} $value | humanizePercentage {{`}}`}} of its incoming requests. expr: sum(rate(apiserver_request_terminations_total{job="apiserver"}[10m])) / ( sum(rate(apiserver_request_total{job="apiserver"}[10m])) + sum(rate(apiserver_request_terminations_total{job="apiserver"}[10m])) ) > 0.20 for: 5m labels: @@ -97,4 +124,5 @@ spec: {{- if .Values.defaultRules.additionalRuleLabels }} {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} {{- end }} +{{- end }} {{- end }} \ No newline at end of file diff --git a/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/rules-1.14/kubernetes-system-controller-manager.yaml b/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/rules-1.14/kubernetes-system-controller-manager.yaml index a5597719..0639ef0e 100644 --- a/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/rules-1.14/kubernetes-system-controller-manager.yaml +++ b/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/rules-1.14/kubernetes-system-controller-manager.yaml @@ -1,10 +1,10 @@ {{- /* -Generated from 'kubernetes-system-controller-manager' group from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/kubernetes-prometheusRule.yaml +Generated from 'kubernetes-system-controller-manager' group from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/kubernetesControlPlane-prometheusRule.yaml Do not change in-place! In order to change this file first read following link: https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack */ -}} {{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} -{{- if and (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.defaultRules.create }} +{{- if and (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.defaultRules.create .Values.defaultRules.rules.kubeControllerManager }} {{- if (include "exporter.kubeControllerManager.enabled" .)}} apiVersion: monitoring.coreos.com/v1 kind: PrometheusRule @@ -25,11 +25,14 @@ spec: groups: - name: kubernetes-system-controller-manager rules: -{{- if (include "exporter.kubeControllerManager.enabled" .)}} +{{- if not (.Values.defaultRules.disabled.KubeControllerManagerDown | default false) }} - alert: KubeControllerManagerDown annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} description: KubeControllerManager has disappeared from Prometheus target discovery. - runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubecontrollermanagerdown + runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubecontrollermanagerdown summary: Target disappeared from Prometheus target discovery. expr: absent(up{job="{{ include "exporter.kubeControllerManager.jobName" . }}"} == 1) for: 15m @@ -40,4 +43,5 @@ spec: {{- end }} {{- end }} {{- end }} -{{- end }} \ No newline at end of file +{{- end }} + diff --git a/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/rules-1.14/kubernetes-system-kube-proxy.yaml b/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/rules-1.14/kubernetes-system-kube-proxy.yaml new file mode 100644 index 00000000..9b644556 --- /dev/null +++ b/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/rules-1.14/kubernetes-system-kube-proxy.yaml @@ -0,0 +1,46 @@ +{{- /* +Generated from 'kubernetes-system-kube-proxy' group from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/kubernetesControlPlane-prometheusRule.yaml +Do not change in-place! In order to change this file first read following link: +https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack +*/ -}} +{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} +{{- if and (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.defaultRules.create .Values.defaultRules.rules.kubeProxy }} +{{- if (include "exporter.kubeProxy.enabled" .)}} +apiVersion: monitoring.coreos.com/v1 +kind: PrometheusRule +metadata: + name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" .) "kubernetes-system-kube-proxy" | trunc 63 | trimSuffix "-" }} + namespace: {{ template "kube-prometheus-stack.namespace" . }} + labels: + app: {{ template "kube-prometheus-stack.name" . }} +{{ include "kube-prometheus-stack.labels" . | indent 4 }} +{{- if .Values.defaultRules.labels }} +{{ toYaml .Values.defaultRules.labels | indent 4 }} +{{- end }} +{{- if .Values.defaultRules.annotations }} + annotations: +{{ toYaml .Values.defaultRules.annotations | indent 4 }} +{{- end }} +spec: + groups: + - name: kubernetes-system-kube-proxy + rules: +{{- if not (.Values.defaultRules.disabled.KubeProxyDown | default false) }} + - alert: KubeProxyDown + annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} + description: KubeProxy has disappeared from Prometheus target discovery. + runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubeproxydown + summary: Target disappeared from Prometheus target discovery. + expr: absent(up{job="{{ include "exporter.kubeProxy.jobName" . }}"} == 1) + for: 15m + labels: + severity: critical +{{- if .Values.defaultRules.additionalRuleLabels }} +{{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} +{{- end }} +{{- end }} +{{- end }} +{{- end }} diff --git a/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/rules-1.14/kubernetes-system-kubelet.yaml b/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/rules-1.14/kubernetes-system-kubelet.yaml index 47f1eebe..b9036c6a 100644 --- a/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/rules-1.14/kubernetes-system-kubelet.yaml +++ b/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/rules-1.14/kubernetes-system-kubelet.yaml @@ -1,5 +1,5 @@ {{- /* -Generated from 'kubernetes-system-kubelet' group from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/kubernetes-prometheusRule.yaml +Generated from 'kubernetes-system-kubelet' group from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/kubernetesControlPlane-prometheusRule.yaml Do not change in-place! In order to change this file first read following link: https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack */ -}} @@ -24,10 +24,14 @@ spec: groups: - name: kubernetes-system-kubelet rules: +{{- if not (.Values.defaultRules.disabled.KubeNodeNotReady | default false) }} - alert: KubeNodeNotReady annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} description: '{{`{{`}} $labels.node {{`}}`}} has been unready for more than 15 minutes.' - runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubenodenotready + runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubenodenotready summary: Node is not ready. expr: kube_node_status_condition{job="kube-state-metrics",condition="Ready",status="true"} == 0 for: 15m @@ -36,10 +40,15 @@ spec: {{- if .Values.defaultRules.additionalRuleLabels }} {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} {{- end }} +{{- end }} +{{- if not (.Values.defaultRules.disabled.KubeNodeUnreachable | default false) }} - alert: KubeNodeUnreachable annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} description: '{{`{{`}} $labels.node {{`}}`}} is unreachable and some workloads may be rescheduled.' - runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubenodeunreachable + runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubenodeunreachable summary: Node is unreachable. expr: (kube_node_spec_taint{job="kube-state-metrics",key="node.kubernetes.io/unreachable",effect="NoSchedule"} unless ignoring(key,value) kube_node_spec_taint{job="kube-state-metrics",key=~"ToBeDeletedByClusterAutoscaler|cloud.google.com/impending-node-termination|aws-node-termination-handler/spot-itn"}) == 1 for: 15m @@ -48,41 +57,56 @@ spec: {{- if .Values.defaultRules.additionalRuleLabels }} {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} {{- end }} +{{- end }} +{{- if not (.Values.defaultRules.disabled.KubeletTooManyPods | default false) }} - alert: KubeletTooManyPods annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} description: Kubelet '{{`{{`}} $labels.node {{`}}`}}' is running at {{`{{`}} $value | humanizePercentage {{`}}`}} of its Pod capacity. - runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubelettoomanypods + runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubelettoomanypods summary: Kubelet is running at capacity. expr: |- - count by(node) ( + count by(cluster, node) ( (kube_pod_status_phase{job="kube-state-metrics",phase="Running"} == 1) * on(instance,pod,namespace,cluster) group_left(node) topk by(instance,pod,namespace,cluster) (1, kube_pod_info{job="kube-state-metrics"}) ) / - max by(node) ( + max by(cluster, node) ( kube_node_status_capacity{job="kube-state-metrics",resource="pods"} != 1 ) > 0.95 for: 15m labels: - severity: warning + severity: info {{- if .Values.defaultRules.additionalRuleLabels }} {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} {{- end }} +{{- end }} +{{- if not (.Values.defaultRules.disabled.KubeNodeReadinessFlapping | default false) }} - alert: KubeNodeReadinessFlapping annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} description: The readiness status of node {{`{{`}} $labels.node {{`}}`}} has changed {{`{{`}} $value {{`}}`}} times in the last 15 minutes. - runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubenodereadinessflapping + runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubenodereadinessflapping summary: Node readiness status is flapping. - expr: sum(changes(kube_node_status_condition{status="true",condition="Ready"}[15m])) by (node) > 2 + expr: sum(changes(kube_node_status_condition{status="true",condition="Ready"}[15m])) by (cluster, node) > 2 for: 15m labels: severity: warning {{- if .Values.defaultRules.additionalRuleLabels }} {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} {{- end }} +{{- end }} +{{- if not (.Values.defaultRules.disabled.KubeletPlegDurationHigh | default false) }} - alert: KubeletPlegDurationHigh annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} description: The Kubelet Pod Lifecycle Event Generator has a 99th percentile duration of {{`{{`}} $value {{`}}`}} seconds on node {{`{{`}} $labels.node {{`}}`}}. - runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubeletplegdurationhigh + runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubeletplegdurationhigh summary: Kubelet Pod Lifecycle Event Generator is taking too long to relist. expr: node_quantile:kubelet_pleg_relist_duration_seconds:histogram_quantile{quantile="0.99"} >= 10 for: 5m @@ -91,22 +115,32 @@ spec: {{- if .Values.defaultRules.additionalRuleLabels }} {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} {{- end }} +{{- end }} +{{- if not (.Values.defaultRules.disabled.KubeletPodStartUpLatencyHigh | default false) }} - alert: KubeletPodStartUpLatencyHigh annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} description: Kubelet Pod startup 99th percentile latency is {{`{{`}} $value {{`}}`}} seconds on node {{`{{`}} $labels.node {{`}}`}}. - runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubeletpodstartuplatencyhigh + runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubeletpodstartuplatencyhigh summary: Kubelet Pod startup latency is too high. - expr: histogram_quantile(0.99, sum(rate(kubelet_pod_worker_duration_seconds_bucket{job="{{ include "exporter.kubelet.jobName" . }}", metrics_path="/metrics"}[5m])) by (instance, le)) * on(instance) group_left(node) kubelet_node_name{job="{{ include "exporter.kubelet.jobName" . }}", metrics_path="/metrics"} > 60 + expr: histogram_quantile(0.99, sum(rate(kubelet_pod_worker_duration_seconds_bucket{job="{{ include "exporter.kubelet.jobName" . }}", metrics_path="/metrics"}[5m])) by (cluster, instance, le)) * on(cluster, instance) group_left(node) kubelet_node_name{job="{{ include "exporter.kubelet.jobName" . }}", metrics_path="/metrics"} > 60 for: 15m labels: severity: warning {{- if .Values.defaultRules.additionalRuleLabels }} {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} {{- end }} +{{- end }} +{{- if not (.Values.defaultRules.disabled.KubeletClientCertificateExpiration | default false) }} - alert: KubeletClientCertificateExpiration annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} description: Client certificate for Kubelet on node {{`{{`}} $labels.node {{`}}`}} expires in {{`{{`}} $value | humanizeDuration {{`}}`}}. - runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubeletclientcertificateexpiration + runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubeletclientcertificateexpiration summary: Kubelet client certificate is about to expire. expr: kubelet_certificate_manager_client_ttl_seconds < 604800 labels: @@ -114,10 +148,15 @@ spec: {{- if .Values.defaultRules.additionalRuleLabels }} {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} {{- end }} +{{- end }} +{{- if not (.Values.defaultRules.disabled.KubeletClientCertificateExpiration | default false) }} - alert: KubeletClientCertificateExpiration annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} description: Client certificate for Kubelet on node {{`{{`}} $labels.node {{`}}`}} expires in {{`{{`}} $value | humanizeDuration {{`}}`}}. - runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubeletclientcertificateexpiration + runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubeletclientcertificateexpiration summary: Kubelet client certificate is about to expire. expr: kubelet_certificate_manager_client_ttl_seconds < 86400 labels: @@ -125,10 +164,15 @@ spec: {{- if .Values.defaultRules.additionalRuleLabels }} {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} {{- end }} +{{- end }} +{{- if not (.Values.defaultRules.disabled.KubeletServerCertificateExpiration | default false) }} - alert: KubeletServerCertificateExpiration annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} description: Server certificate for Kubelet on node {{`{{`}} $labels.node {{`}}`}} expires in {{`{{`}} $value | humanizeDuration {{`}}`}}. - runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubeletservercertificateexpiration + runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubeletservercertificateexpiration summary: Kubelet server certificate is about to expire. expr: kubelet_certificate_manager_server_ttl_seconds < 604800 labels: @@ -136,10 +180,15 @@ spec: {{- if .Values.defaultRules.additionalRuleLabels }} {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} {{- end }} +{{- end }} +{{- if not (.Values.defaultRules.disabled.KubeletServerCertificateExpiration | default false) }} - alert: KubeletServerCertificateExpiration annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} description: Server certificate for Kubelet on node {{`{{`}} $labels.node {{`}}`}} expires in {{`{{`}} $value | humanizeDuration {{`}}`}}. - runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubeletservercertificateexpiration + runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubeletservercertificateexpiration summary: Kubelet server certificate is about to expire. expr: kubelet_certificate_manager_server_ttl_seconds < 86400 labels: @@ -147,10 +196,15 @@ spec: {{- if .Values.defaultRules.additionalRuleLabels }} {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} {{- end }} +{{- end }} +{{- if not (.Values.defaultRules.disabled.KubeletClientCertificateRenewalErrors | default false) }} - alert: KubeletClientCertificateRenewalErrors annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} description: Kubelet on node {{`{{`}} $labels.node {{`}}`}} has failed to renew its client certificate ({{`{{`}} $value | humanize {{`}}`}} errors in the last 5 minutes). - runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubeletclientcertificaterenewalerrors + runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubeletclientcertificaterenewalerrors summary: Kubelet has failed to renew its client certificate. expr: increase(kubelet_certificate_manager_client_expiration_renew_errors[5m]) > 0 for: 15m @@ -159,10 +213,15 @@ spec: {{- if .Values.defaultRules.additionalRuleLabels }} {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} {{- end }} +{{- end }} +{{- if not (.Values.defaultRules.disabled.KubeletServerCertificateRenewalErrors | default false) }} - alert: KubeletServerCertificateRenewalErrors annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} description: Kubelet on node {{`{{`}} $labels.node {{`}}`}} has failed to renew its server certificate ({{`{{`}} $value | humanize {{`}}`}} errors in the last 5 minutes). - runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubeletservercertificaterenewalerrors + runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubeletservercertificaterenewalerrors summary: Kubelet has failed to renew its server certificate. expr: increase(kubelet_server_expiration_renew_errors[5m]) > 0 for: 15m @@ -171,11 +230,16 @@ spec: {{- if .Values.defaultRules.additionalRuleLabels }} {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} {{- end }} -{{- if (include "exporter.kubeletService.enabled" .) }} +{{- end }} +{{- if (include "exporter.kubelet.enabled" .)}} +{{- if not (.Values.defaultRules.disabled.KubeletDown | default false) }} - alert: KubeletDown annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} description: Kubelet has disappeared from Prometheus target discovery. - runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubeletdown + runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubeletdown summary: Target disappeared from Prometheus target discovery. expr: absent(up{job="{{ include "exporter.kubelet.jobName" . }}", metrics_path="/metrics"} == 1) for: 15m @@ -185,4 +249,5 @@ spec: {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} {{- end }} {{- end }} +{{- end }} {{- end }} \ No newline at end of file diff --git a/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/rules-1.14/kubernetes-system-scheduler.yaml b/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/rules-1.14/kubernetes-system-scheduler.yaml index d92cd0bf..283429cf 100644 --- a/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/rules-1.14/kubernetes-system-scheduler.yaml +++ b/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/rules-1.14/kubernetes-system-scheduler.yaml @@ -1,5 +1,5 @@ {{- /* -Generated from 'kubernetes-system-scheduler' group from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/kubernetes-prometheusRule.yaml +Generated from 'kubernetes-system-scheduler' group from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/kubernetesControlPlane-prometheusRule.yaml Do not change in-place! In order to change this file first read following link: https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack */ -}} @@ -25,11 +25,14 @@ spec: groups: - name: kubernetes-system-scheduler rules: -{{- if (include "exporter.kubeScheduler.enabled" .)}} +{{- if not (.Values.defaultRules.disabled.KubeSchedulerDown | default false) }} - alert: KubeSchedulerDown annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} description: KubeScheduler has disappeared from Prometheus target discovery. - runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubeschedulerdown + runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubeschedulerdown summary: Target disappeared from Prometheus target discovery. expr: absent(up{job="{{ include "exporter.kubeScheduler.jobName" . }}"} == 1) for: 15m diff --git a/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/rules-1.14/kubernetes-system.yaml b/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/rules-1.14/kubernetes-system.yaml index 657e5c23..32605926 100644 --- a/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/rules-1.14/kubernetes-system.yaml +++ b/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/rules-1.14/kubernetes-system.yaml @@ -1,5 +1,5 @@ {{- /* -Generated from 'kubernetes-system' group from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/kubernetes-prometheusRule.yaml +Generated from 'kubernetes-system' group from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/kubernetesControlPlane-prometheusRule.yaml Do not change in-place! In order to change this file first read following link: https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack */ -}} @@ -24,27 +24,36 @@ spec: groups: - name: kubernetes-system rules: +{{- if not (.Values.defaultRules.disabled.KubeVersionMismatch | default false) }} - alert: KubeVersionMismatch annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} description: There are {{`{{`}} $value {{`}}`}} different semantic versions of Kubernetes components running. - runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubeversionmismatch + runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubeversionmismatch summary: Different semantic versions of Kubernetes components running. - expr: count(count by (git_version) (label_replace(kubernetes_build_info{job!~"kube-dns|coredns"},"git_version","$1","git_version","(v[0-9]*.[0-9]*).*"))) > 1 + expr: count by (cluster) (count by (git_version, cluster) (label_replace(kubernetes_build_info{job!~"kube-dns|coredns"},"git_version","$1","git_version","(v[0-9]*.[0-9]*).*"))) > 1 for: 15m labels: severity: warning {{- if .Values.defaultRules.additionalRuleLabels }} {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} {{- end }} +{{- end }} +{{- if not (.Values.defaultRules.disabled.KubeClientErrors | default false) }} - alert: KubeClientErrors annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} description: Kubernetes API server client '{{`{{`}} $labels.job {{`}}`}}/{{`{{`}} $labels.instance {{`}}`}}' is experiencing {{`{{`}} $value | humanizePercentage {{`}}`}} errors.' - runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubeclienterrors + runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubeclienterrors summary: Kubernetes API server client is experiencing errors. expr: |- - (sum(rate(rest_client_requests_total{code=~"5.."}[5m])) by (instance, job) + (sum(rate(rest_client_requests_total{code=~"5.."}[5m])) by (cluster, instance, job, namespace) / - sum(rate(rest_client_requests_total[5m])) by (instance, job)) + sum(rate(rest_client_requests_total[5m])) by (cluster, instance, job, namespace)) > 0.01 for: 15m labels: @@ -52,4 +61,5 @@ spec: {{- if .Values.defaultRules.additionalRuleLabels }} {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} {{- end }} +{{- end }} {{- end }} \ No newline at end of file diff --git a/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/rules-1.14/node-exporter.rules.yaml b/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/rules-1.14/node-exporter.rules.yaml index f734e8dc..c3cfe36c 100644 --- a/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/rules-1.14/node-exporter.rules.yaml +++ b/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/rules-1.14/node-exporter.rules.yaml @@ -1,10 +1,10 @@ {{- /* -Generated from 'node-exporter.rules' group from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/node-exporter-prometheusRule.yaml +Generated from 'node-exporter.rules' group from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/nodeExporter-prometheusRule.yaml Do not change in-place! In order to change this file first read following link: https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack */ -}} {{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} -{{- if and (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.defaultRules.create .Values.defaultRules.rules.node }} +{{- if and (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.defaultRules.create .Values.defaultRules.rules.nodeExporterRecording }} apiVersion: monitoring.coreos.com/v1 kind: PrometheusRule metadata: @@ -25,15 +25,13 @@ spec: - name: node-exporter.rules rules: - expr: |- - count without (cpu) ( - count without (mode) ( - node_cpu_seconds_total{job="node-exporter"} - ) + count without (cpu, mode) ( + node_cpu_seconds_total{job="node-exporter",mode="idle"} ) record: instance:node_num_cpu:sum - expr: |- - 1 - avg without (cpu, mode) ( - rate(node_cpu_seconds_total{job="node-exporter", mode="idle"}[5m]) + 1 - avg without (cpu) ( + sum without (mode) (rate(node_cpu_seconds_total{job="node-exporter", mode=~"idle|iowait|steal"}[5m])) ) record: instance:node_cpu_utilisation:rate5m - expr: |- @@ -45,16 +43,28 @@ spec: record: instance:node_load1_per_cpu:ratio - expr: |- 1 - ( - node_memory_MemAvailable_bytes{job="node-exporter"} + ( + node_memory_MemAvailable_bytes{job="node-exporter"} + or + ( + node_memory_Buffers_bytes{job="node-exporter"} + + + node_memory_Cached_bytes{job="node-exporter"} + + + node_memory_MemFree_bytes{job="node-exporter"} + + + node_memory_Slab_bytes{job="node-exporter"} + ) + ) / node_memory_MemTotal_bytes{job="node-exporter"} ) record: instance:node_memory_utilisation:ratio - expr: rate(node_vmstat_pgmajfault{job="node-exporter"}[5m]) record: instance:node_vmstat_pgmajfault:rate5m - - expr: rate(node_disk_io_time_seconds_total{job="node-exporter", device=~"mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+"}[5m]) + - expr: rate(node_disk_io_time_seconds_total{job="node-exporter", device=~"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)"}[5m]) record: instance_device:node_disk_io_time_seconds:rate5m - - expr: rate(node_disk_io_time_weighted_seconds_total{job="node-exporter", device=~"mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+"}[5m]) + - expr: rate(node_disk_io_time_weighted_seconds_total{job="node-exporter", device=~"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)"}[5m]) record: instance_device:node_disk_io_time_weighted_seconds:rate5m - expr: |- sum without (device) ( diff --git a/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/rules-1.14/node-exporter.yaml b/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/rules-1.14/node-exporter.yaml index eb2e9f7f..2fa7e28d 100644 --- a/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/rules-1.14/node-exporter.yaml +++ b/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/rules-1.14/node-exporter.yaml @@ -1,10 +1,10 @@ {{- /* -Generated from 'node-exporter' group from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/node-exporter-prometheusRule.yaml +Generated from 'node-exporter' group from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/nodeExporter-prometheusRule.yaml Do not change in-place! In order to change this file first read following link: https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack */ -}} {{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} -{{- if and (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.defaultRules.create .Values.defaultRules.rules.node }} +{{- if and (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.defaultRules.create .Values.defaultRules.rules.nodeExporterAlerting }} apiVersion: monitoring.coreos.com/v1 kind: PrometheusRule metadata: @@ -24,14 +24,18 @@ spec: groups: - name: node-exporter rules: +{{- if not (.Values.defaultRules.disabled.NodeFilesystemSpaceFillingUp | default false) }} - alert: NodeFilesystemSpaceFillingUp annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} description: Filesystem on {{`{{`}} $labels.device {{`}}`}} at {{`{{`}} $labels.instance {{`}}`}} has only {{`{{`}} printf "%.2f" $value {{`}}`}}% available space left and is filling up. - runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-nodefilesystemspacefillingup + runbook_url: {{ .Values.defaultRules.runbookUrl }}/node/nodefilesystemspacefillingup summary: Filesystem is predicted to run out of space within the next 24 hours. expr: |- ( - node_filesystem_avail_bytes{job="node-exporter",fstype!=""} / node_filesystem_size_bytes{job="node-exporter",fstype!=""} * 100 < 40 + node_filesystem_avail_bytes{job="node-exporter",fstype!=""} / node_filesystem_size_bytes{job="node-exporter",fstype!=""} * 100 < 15 and predict_linear(node_filesystem_avail_bytes{job="node-exporter",fstype!=""}[6h], 24*60*60) < 0 and @@ -43,14 +47,19 @@ spec: {{- if .Values.defaultRules.additionalRuleLabels }} {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} {{- end }} +{{- end }} +{{- if not (.Values.defaultRules.disabled.NodeFilesystemSpaceFillingUp | default false) }} - alert: NodeFilesystemSpaceFillingUp annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} description: Filesystem on {{`{{`}} $labels.device {{`}}`}} at {{`{{`}} $labels.instance {{`}}`}} has only {{`{{`}} printf "%.2f" $value {{`}}`}}% available space left and is filling up fast. - runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-nodefilesystemspacefillingup + runbook_url: {{ .Values.defaultRules.runbookUrl }}/node/nodefilesystemspacefillingup summary: Filesystem is predicted to run out of space within the next 4 hours. expr: |- ( - node_filesystem_avail_bytes{job="node-exporter",fstype!=""} / node_filesystem_size_bytes{job="node-exporter",fstype!=""} * 100 < 15 + node_filesystem_avail_bytes{job="node-exporter",fstype!=""} / node_filesystem_size_bytes{job="node-exporter",fstype!=""} * 100 < 10 and predict_linear(node_filesystem_avail_bytes{job="node-exporter",fstype!=""}[6h], 4*60*60) < 0 and @@ -62,10 +71,15 @@ spec: {{- if .Values.defaultRules.additionalRuleLabels }} {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} {{- end }} +{{- end }} +{{- if not (.Values.defaultRules.disabled.NodeFilesystemAlmostOutOfSpace | default false) }} - alert: NodeFilesystemAlmostOutOfSpace annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} description: Filesystem on {{`{{`}} $labels.device {{`}}`}} at {{`{{`}} $labels.instance {{`}}`}} has only {{`{{`}} printf "%.2f" $value {{`}}`}}% available space left. - runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-nodefilesystemalmostoutofspace + runbook_url: {{ .Values.defaultRules.runbookUrl }}/node/nodefilesystemalmostoutofspace summary: Filesystem has less than 5% space left. expr: |- ( @@ -73,16 +87,21 @@ spec: and node_filesystem_readonly{job="node-exporter",fstype!=""} == 0 ) - for: 1h + for: 30m labels: severity: warning {{- if .Values.defaultRules.additionalRuleLabels }} {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} {{- end }} +{{- end }} +{{- if not (.Values.defaultRules.disabled.NodeFilesystemAlmostOutOfSpace | default false) }} - alert: NodeFilesystemAlmostOutOfSpace annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} description: Filesystem on {{`{{`}} $labels.device {{`}}`}} at {{`{{`}} $labels.instance {{`}}`}} has only {{`{{`}} printf "%.2f" $value {{`}}`}}% available space left. - runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-nodefilesystemalmostoutofspace + runbook_url: {{ .Values.defaultRules.runbookUrl }}/node/nodefilesystemalmostoutofspace summary: Filesystem has less than 3% space left. expr: |- ( @@ -90,16 +109,21 @@ spec: and node_filesystem_readonly{job="node-exporter",fstype!=""} == 0 ) - for: 1h + for: 30m labels: severity: critical {{- if .Values.defaultRules.additionalRuleLabels }} {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} {{- end }} +{{- end }} +{{- if not (.Values.defaultRules.disabled.NodeFilesystemFilesFillingUp | default false) }} - alert: NodeFilesystemFilesFillingUp annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} description: Filesystem on {{`{{`}} $labels.device {{`}}`}} at {{`{{`}} $labels.instance {{`}}`}} has only {{`{{`}} printf "%.2f" $value {{`}}`}}% available inodes left and is filling up. - runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-nodefilesystemfilesfillingup + runbook_url: {{ .Values.defaultRules.runbookUrl }}/node/nodefilesystemfilesfillingup summary: Filesystem is predicted to run out of inodes within the next 24 hours. expr: |- ( @@ -115,10 +139,15 @@ spec: {{- if .Values.defaultRules.additionalRuleLabels }} {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} {{- end }} +{{- end }} +{{- if not (.Values.defaultRules.disabled.NodeFilesystemFilesFillingUp | default false) }} - alert: NodeFilesystemFilesFillingUp annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} description: Filesystem on {{`{{`}} $labels.device {{`}}`}} at {{`{{`}} $labels.instance {{`}}`}} has only {{`{{`}} printf "%.2f" $value {{`}}`}}% available inodes left and is filling up fast. - runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-nodefilesystemfilesfillingup + runbook_url: {{ .Values.defaultRules.runbookUrl }}/node/nodefilesystemfilesfillingup summary: Filesystem is predicted to run out of inodes within the next 4 hours. expr: |- ( @@ -134,10 +163,15 @@ spec: {{- if .Values.defaultRules.additionalRuleLabels }} {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} {{- end }} +{{- end }} +{{- if not (.Values.defaultRules.disabled.NodeFilesystemAlmostOutOfFiles | default false) }} - alert: NodeFilesystemAlmostOutOfFiles annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} description: Filesystem on {{`{{`}} $labels.device {{`}}`}} at {{`{{`}} $labels.instance {{`}}`}} has only {{`{{`}} printf "%.2f" $value {{`}}`}}% available inodes left. - runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-nodefilesystemalmostoutoffiles + runbook_url: {{ .Values.defaultRules.runbookUrl }}/node/nodefilesystemalmostoutoffiles summary: Filesystem has less than 5% inodes left. expr: |- ( @@ -151,10 +185,15 @@ spec: {{- if .Values.defaultRules.additionalRuleLabels }} {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} {{- end }} +{{- end }} +{{- if not (.Values.defaultRules.disabled.NodeFilesystemAlmostOutOfFiles | default false) }} - alert: NodeFilesystemAlmostOutOfFiles annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} description: Filesystem on {{`{{`}} $labels.device {{`}}`}} at {{`{{`}} $labels.instance {{`}}`}} has only {{`{{`}} printf "%.2f" $value {{`}}`}}% available inodes left. - runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-nodefilesystemalmostoutoffiles + runbook_url: {{ .Values.defaultRules.runbookUrl }}/node/nodefilesystemalmostoutoffiles summary: Filesystem has less than 3% inodes left. expr: |- ( @@ -168,10 +207,15 @@ spec: {{- if .Values.defaultRules.additionalRuleLabels }} {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} {{- end }} +{{- end }} +{{- if not (.Values.defaultRules.disabled.NodeNetworkReceiveErrs | default false) }} - alert: NodeNetworkReceiveErrs annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} description: '{{`{{`}} $labels.instance {{`}}`}} interface {{`{{`}} $labels.device {{`}}`}} has encountered {{`{{`}} printf "%.0f" $value {{`}}`}} receive errors in the last two minutes.' - runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-nodenetworkreceiveerrs + runbook_url: {{ .Values.defaultRules.runbookUrl }}/node/nodenetworkreceiveerrs summary: Network interface is reporting many receive errors. expr: rate(node_network_receive_errs_total[2m]) / rate(node_network_receive_packets_total[2m]) > 0.01 for: 1h @@ -180,10 +224,15 @@ spec: {{- if .Values.defaultRules.additionalRuleLabels }} {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} {{- end }} +{{- end }} +{{- if not (.Values.defaultRules.disabled.NodeNetworkTransmitErrs | default false) }} - alert: NodeNetworkTransmitErrs annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} description: '{{`{{`}} $labels.instance {{`}}`}} interface {{`{{`}} $labels.device {{`}}`}} has encountered {{`{{`}} printf "%.0f" $value {{`}}`}} transmit errors in the last two minutes.' - runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-nodenetworktransmiterrs + runbook_url: {{ .Values.defaultRules.runbookUrl }}/node/nodenetworktransmiterrs summary: Network interface is reporting many transmit errors. expr: rate(node_network_transmit_errs_total[2m]) / rate(node_network_transmit_packets_total[2m]) > 0.01 for: 1h @@ -192,10 +241,15 @@ spec: {{- if .Values.defaultRules.additionalRuleLabels }} {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} {{- end }} +{{- end }} +{{- if not (.Values.defaultRules.disabled.NodeHighNumberConntrackEntriesUsed | default false) }} - alert: NodeHighNumberConntrackEntriesUsed annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} description: '{{`{{`}} $value | humanizePercentage {{`}}`}} of conntrack entries are used.' - runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-nodehighnumberconntrackentriesused + runbook_url: {{ .Values.defaultRules.runbookUrl }}/node/nodehighnumberconntrackentriesused summary: Number of conntrack are getting close to the limit. expr: (node_nf_conntrack_entries / node_nf_conntrack_entries_limit) > 0.75 labels: @@ -203,10 +257,15 @@ spec: {{- if .Values.defaultRules.additionalRuleLabels }} {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} {{- end }} +{{- end }} +{{- if not (.Values.defaultRules.disabled.NodeTextFileCollectorScrapeError | default false) }} - alert: NodeTextFileCollectorScrapeError annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} description: Node Exporter text file collector failed to scrape. - runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-nodetextfilecollectorscrapeerror + runbook_url: {{ .Values.defaultRules.runbookUrl }}/node/nodetextfilecollectorscrapeerror summary: Node Exporter text file collector failed to scrape. expr: node_textfile_scrape_error{job="node-exporter"} == 1 labels: @@ -214,22 +273,27 @@ spec: {{- if .Values.defaultRules.additionalRuleLabels }} {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} {{- end }} +{{- end }} +{{- if not (.Values.defaultRules.disabled.NodeClockSkewDetected | default false) }} - alert: NodeClockSkewDetected annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} description: Clock on {{`{{`}} $labels.instance {{`}}`}} is out of sync by more than 300s. Ensure NTP is configured correctly on this host. - runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-nodeclockskewdetected + runbook_url: {{ .Values.defaultRules.runbookUrl }}/node/nodeclockskewdetected summary: Clock skew detected. expr: |- ( - node_timex_offset_seconds > 0.05 + node_timex_offset_seconds{job="node-exporter"} > 0.05 and - deriv(node_timex_offset_seconds[5m]) >= 0 + deriv(node_timex_offset_seconds{job="node-exporter"}[5m]) >= 0 ) or ( - node_timex_offset_seconds < -0.05 + node_timex_offset_seconds{job="node-exporter"} < -0.05 and - deriv(node_timex_offset_seconds[5m]) <= 0 + deriv(node_timex_offset_seconds{job="node-exporter"}[5m]) <= 0 ) for: 10m labels: @@ -237,48 +301,68 @@ spec: {{- if .Values.defaultRules.additionalRuleLabels }} {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} {{- end }} +{{- end }} +{{- if not (.Values.defaultRules.disabled.NodeClockNotSynchronising | default false) }} - alert: NodeClockNotSynchronising annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} description: Clock on {{`{{`}} $labels.instance {{`}}`}} is not synchronising. Ensure NTP is configured on this host. - runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-nodeclocknotsynchronising + runbook_url: {{ .Values.defaultRules.runbookUrl }}/node/nodeclocknotsynchronising summary: Clock not synchronising. expr: |- - min_over_time(node_timex_sync_status[5m]) == 0 + min_over_time(node_timex_sync_status{job="node-exporter"}[5m]) == 0 and - node_timex_maxerror_seconds >= 16 + node_timex_maxerror_seconds{job="node-exporter"} >= 16 for: 10m labels: severity: warning {{- if .Values.defaultRules.additionalRuleLabels }} {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} {{- end }} +{{- end }} +{{- if not (.Values.defaultRules.disabled.NodeRAIDDegraded | default false) }} - alert: NodeRAIDDegraded annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} description: RAID array '{{`{{`}} $labels.device {{`}}`}}' on {{`{{`}} $labels.instance {{`}}`}} is in degraded state due to one or more disks failures. Number of spare drives is insufficient to fix issue automatically. - runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-noderaiddegraded + runbook_url: {{ .Values.defaultRules.runbookUrl }}/node/noderaiddegraded summary: RAID Array is degraded - expr: node_md_disks_required - ignoring (state) (node_md_disks{state="active"}) > 0 + expr: node_md_disks_required{job="node-exporter",device=~"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)"} - ignoring (state) (node_md_disks{state="active",job="node-exporter",device=~"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)"}) > 0 for: 15m labels: severity: critical {{- if .Values.defaultRules.additionalRuleLabels }} {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} {{- end }} +{{- end }} +{{- if not (.Values.defaultRules.disabled.NodeRAIDDiskFailure | default false) }} - alert: NodeRAIDDiskFailure annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} description: At least one device in RAID array on {{`{{`}} $labels.instance {{`}}`}} failed. Array '{{`{{`}} $labels.device {{`}}`}}' needs attention and possibly a disk swap. - runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-noderaiddiskfailure + runbook_url: {{ .Values.defaultRules.runbookUrl }}/node/noderaiddiskfailure summary: Failed device in RAID array - expr: node_md_disks{state="failed"} > 0 + expr: node_md_disks{state="failed",job="node-exporter",device=~"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)"} > 0 labels: severity: warning {{- if .Values.defaultRules.additionalRuleLabels }} {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} {{- end }} +{{- end }} +{{- if not (.Values.defaultRules.disabled.NodeFileDescriptorLimit | default false) }} - alert: NodeFileDescriptorLimit annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} description: File descriptors limit at {{`{{`}} $labels.instance {{`}}`}} is currently at {{`{{`}} printf "%.2f" $value {{`}}`}}%. - runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-nodefiledescriptorlimit + runbook_url: {{ .Values.defaultRules.runbookUrl }}/node/nodefiledescriptorlimit summary: Kernel is predicted to exhaust file descriptors limit soon. expr: |- ( @@ -290,10 +374,15 @@ spec: {{- if .Values.defaultRules.additionalRuleLabels }} {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} {{- end }} +{{- end }} +{{- if not (.Values.defaultRules.disabled.NodeFileDescriptorLimit | default false) }} - alert: NodeFileDescriptorLimit annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} description: File descriptors limit at {{`{{`}} $labels.instance {{`}}`}} is currently at {{`{{`}} printf "%.2f" $value {{`}}`}}%. - runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-nodefiledescriptorlimit + runbook_url: {{ .Values.defaultRules.runbookUrl }}/node/nodefiledescriptorlimit summary: Kernel is predicted to exhaust file descriptors limit soon. expr: |- ( @@ -305,4 +394,5 @@ spec: {{- if .Values.defaultRules.additionalRuleLabels }} {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} {{- end }} +{{- end }} {{- end }} \ No newline at end of file diff --git a/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/rules-1.14/node-network.yaml b/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/rules-1.14/node-network.yaml index a9033a9f..93209734 100644 --- a/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/rules-1.14/node-network.yaml +++ b/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/rules-1.14/node-network.yaml @@ -1,5 +1,5 @@ {{- /* -Generated from 'node-network' group from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/kube-prometheus-prometheusRule.yaml +Generated from 'node-network' group from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/kubePrometheus-prometheusRule.yaml Do not change in-place! In order to change this file first read following link: https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack */ -}} @@ -24,11 +24,15 @@ spec: groups: - name: node-network rules: +{{- if not (.Values.defaultRules.disabled.NodeNetworkInterfaceFlapping | default false) }} - alert: NodeNetworkInterfaceFlapping annotations: - description: Network interface "{{`{{`}} $labels.device {{`}}`}}" changing it's up status often on node-exporter {{`{{`}} $labels.namespace {{`}}`}}/{{`{{`}} $labels.pod {{`}}`}} - runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-nodenetworkinterfaceflapping - summary: Network interface is often changin it's status +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} + description: Network interface "{{`{{`}} $labels.device {{`}}`}}" changing its up status often on node-exporter {{`{{`}} $labels.namespace {{`}}`}}/{{`{{`}} $labels.pod {{`}}`}} + runbook_url: {{ .Values.defaultRules.runbookUrl }}/general/nodenetworkinterfaceflapping + summary: Network interface is often changing its status expr: changes(node_network_up{job="node-exporter",device!~"veth.+"}[2m]) > 2 for: 2m labels: @@ -36,4 +40,5 @@ spec: {{- if .Values.defaultRules.additionalRuleLabels }} {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} {{- end }} +{{- end }} {{- end }} \ No newline at end of file diff --git a/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/rules-1.14/node.rules.yaml b/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/rules-1.14/node.rules.yaml index c6dd9e18..4f8da294 100644 --- a/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/rules-1.14/node.rules.yaml +++ b/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/rules-1.14/node.rules.yaml @@ -1,5 +1,5 @@ {{- /* -Generated from 'node.rules' group from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/kubernetes-prometheusRule.yaml +Generated from 'node.rules' group from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/kubernetesControlPlane-prometheusRule.yaml Do not change in-place! In order to change this file first read following link: https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack */ -}} @@ -25,8 +25,8 @@ spec: - name: node.rules rules: - expr: |- - topk by(namespace, pod) (1, - max by (node, namespace, pod) ( + topk by(cluster, namespace, pod) (1, + max by (cluster, node, namespace, pod) ( label_replace(kube_pod_info{job="kube-state-metrics",node!=""}, "pod", "$1", "pod", "(.*)") )) record: 'node_namespace_pod:kube_pod_info:' @@ -48,4 +48,8 @@ spec: ) ) by (cluster) record: :node_memory_MemAvailable_bytes:sum + - expr: |- + sum(rate(node_cpu_seconds_total{job="node-exporter",mode!="idle",mode!="iowait",mode!="steal"}[5m])) / + count(sum(node_cpu_seconds_total{job="node-exporter"}) by (cluster, instance, cpu)) + record: cluster:node_cpu:ratio_rate5m {{- end }} \ No newline at end of file diff --git a/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/rules-1.14/prometheus-operator.yaml b/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/rules-1.14/prometheus-operator.yaml index d3010bcd..1c6b5c5d 100644 --- a/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/rules-1.14/prometheus-operator.yaml +++ b/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/rules-1.14/prometheus-operator.yaml @@ -1,5 +1,5 @@ {{- /* -Generated from 'prometheus-operator' group from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/prometheus-operator-prometheusRule.yaml +Generated from 'prometheus-operator' group from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/prometheusOperator-prometheusRule.yaml Do not change in-place! In order to change this file first read following link: https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack */ -}} @@ -26,10 +26,14 @@ spec: groups: - name: prometheus-operator rules: +{{- if not (.Values.defaultRules.disabled.PrometheusOperatorListErrors | default false) }} - alert: PrometheusOperatorListErrors annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} description: Errors while performing List operations in controller {{`{{`}}$labels.controller{{`}}`}} in {{`{{`}}$labels.namespace{{`}}`}} namespace. - runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-prometheusoperatorlisterrors + runbook_url: {{ .Values.defaultRules.runbookUrl }}/prometheus-operator/prometheusoperatorlisterrors summary: Errors while performing list operations in controller. expr: (sum by (controller,namespace) (rate(prometheus_operator_list_operations_failed_total{job="{{ $operatorJob }}",namespace="{{ $namespace }}"}[10m])) / sum by (controller,namespace) (rate(prometheus_operator_list_operations_total{job="{{ $operatorJob }}",namespace="{{ $namespace }}"}[10m]))) > 0.4 for: 15m @@ -38,22 +42,32 @@ spec: {{- if .Values.defaultRules.additionalRuleLabels }} {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} {{- end }} +{{- end }} +{{- if not (.Values.defaultRules.disabled.PrometheusOperatorWatchErrors | default false) }} - alert: PrometheusOperatorWatchErrors annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} description: Errors while performing watch operations in controller {{`{{`}}$labels.controller{{`}}`}} in {{`{{`}}$labels.namespace{{`}}`}} namespace. - runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-prometheusoperatorwatcherrors + runbook_url: {{ .Values.defaultRules.runbookUrl }}/prometheus-operator/prometheusoperatorwatcherrors summary: Errors while performing watch operations in controller. - expr: (sum by (controller,namespace) (rate(prometheus_operator_watch_operations_failed_total{job="{{ $operatorJob }}",namespace="{{ $namespace }}"}[10m])) / sum by (controller,namespace) (rate(prometheus_operator_watch_operations_total{job="{{ $operatorJob }}",namespace="{{ $namespace }}"}[10m]))) > 0.4 + expr: (sum by (controller,namespace) (rate(prometheus_operator_watch_operations_failed_total{job="{{ $operatorJob }}",namespace="{{ $namespace }}"}[5m])) / sum by (controller,namespace) (rate(prometheus_operator_watch_operations_total{job="{{ $operatorJob }}",namespace="{{ $namespace }}"}[5m]))) > 0.4 for: 15m labels: severity: warning {{- if .Values.defaultRules.additionalRuleLabels }} {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} {{- end }} +{{- end }} +{{- if not (.Values.defaultRules.disabled.PrometheusOperatorSyncFailed | default false) }} - alert: PrometheusOperatorSyncFailed annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} description: Controller {{`{{`}} $labels.controller {{`}}`}} in {{`{{`}} $labels.namespace {{`}}`}} namespace fails to reconcile {{`{{`}} $value {{`}}`}} objects. - runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-prometheusoperatorsyncfailed + runbook_url: {{ .Values.defaultRules.runbookUrl }}/prometheus-operator/prometheusoperatorsyncfailed summary: Last controller reconciliation failed expr: min_over_time(prometheus_operator_syncs{status="failed",job="{{ $operatorJob }}",namespace="{{ $namespace }}"}[5m]) > 0 for: 10m @@ -62,10 +76,15 @@ spec: {{- if .Values.defaultRules.additionalRuleLabels }} {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} {{- end }} +{{- end }} +{{- if not (.Values.defaultRules.disabled.PrometheusOperatorReconcileErrors | default false) }} - alert: PrometheusOperatorReconcileErrors annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} description: '{{`{{`}} $value | humanizePercentage {{`}}`}} of reconciling operations failed for {{`{{`}} $labels.controller {{`}}`}} controller in {{`{{`}} $labels.namespace {{`}}`}} namespace.' - runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-prometheusoperatorreconcileerrors + runbook_url: {{ .Values.defaultRules.runbookUrl }}/prometheus-operator/prometheusoperatorreconcileerrors summary: Errors while reconciling controller. expr: (sum by (controller,namespace) (rate(prometheus_operator_reconcile_errors_total{job="{{ $operatorJob }}",namespace="{{ $namespace }}"}[5m]))) / (sum by (controller,namespace) (rate(prometheus_operator_reconcile_operations_total{job="{{ $operatorJob }}",namespace="{{ $namespace }}"}[5m]))) > 0.1 for: 10m @@ -74,10 +93,15 @@ spec: {{- if .Values.defaultRules.additionalRuleLabels }} {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} {{- end }} +{{- end }} +{{- if not (.Values.defaultRules.disabled.PrometheusOperatorNodeLookupErrors | default false) }} - alert: PrometheusOperatorNodeLookupErrors annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} description: Errors while reconciling Prometheus in {{`{{`}} $labels.namespace {{`}}`}} Namespace. - runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-prometheusoperatornodelookuperrors + runbook_url: {{ .Values.defaultRules.runbookUrl }}/prometheus-operator/prometheusoperatornodelookuperrors summary: Errors while reconciling Prometheus. expr: rate(prometheus_operator_node_address_lookup_errors_total{job="{{ $operatorJob }}",namespace="{{ $namespace }}"}[5m]) > 0.1 for: 10m @@ -86,22 +110,32 @@ spec: {{- if .Values.defaultRules.additionalRuleLabels }} {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} {{- end }} +{{- end }} +{{- if not (.Values.defaultRules.disabled.PrometheusOperatorNotReady | default false) }} - alert: PrometheusOperatorNotReady annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} description: Prometheus operator in {{`{{`}} $labels.namespace {{`}}`}} namespace isn't ready to reconcile {{`{{`}} $labels.controller {{`}}`}} resources. - runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-prometheusoperatornotready + runbook_url: {{ .Values.defaultRules.runbookUrl }}/prometheus-operator/prometheusoperatornotready summary: Prometheus operator not ready - expr: min by(namespace, controller) (max_over_time(prometheus_operator_ready{job="{{ $operatorJob }}",namespace="{{ $namespace }}"}[5m]) == 0) + expr: min by (controller,namespace) (max_over_time(prometheus_operator_ready{job="{{ $operatorJob }}",namespace="{{ $namespace }}"}[5m]) == 0) for: 5m labels: severity: warning {{- if .Values.defaultRules.additionalRuleLabels }} {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} {{- end }} +{{- end }} +{{- if not (.Values.defaultRules.disabled.PrometheusOperatorRejectedResources | default false) }} - alert: PrometheusOperatorRejectedResources annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} description: Prometheus operator in {{`{{`}} $labels.namespace {{`}}`}} namespace rejected {{`{{`}} printf "%0.0f" $value {{`}}`}} {{`{{`}} $labels.controller {{`}}`}}/{{`{{`}} $labels.resource {{`}}`}} resources. - runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-prometheusoperatorrejectedresources + runbook_url: {{ .Values.defaultRules.runbookUrl }}/prometheus-operator/prometheusoperatorrejectedresources summary: Resources rejected by Prometheus operator expr: min_over_time(prometheus_operator_managed_resources{state="rejected",job="{{ $operatorJob }}",namespace="{{ $namespace }}"}[5m]) > 0 for: 5m @@ -110,4 +144,5 @@ spec: {{- if .Values.defaultRules.additionalRuleLabels }} {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} {{- end }} +{{- end }} {{- end }} \ No newline at end of file diff --git a/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/serviceThanosSidecar.yaml b/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/serviceThanosSidecar.yaml index 906e5c39..2b80e774 100644 --- a/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/serviceThanosSidecar.yaml +++ b/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/serviceThanosSidecar.yaml @@ -17,6 +17,9 @@ metadata: spec: type: {{ .Values.prometheus.thanosService.type }} clusterIP: {{ .Values.prometheus.thanosService.clusterIP }} +{{- if ne .Values.prometheus.thanosService.type "ClusterIP" }} + externalTrafficPolicy: {{ .Values.prometheus.thanosService.externalTrafficPolicy }} +{{- end }} ports: - name: {{ .Values.prometheus.thanosService.portName }} port: {{ .Values.prometheus.thanosService.port }} @@ -32,5 +35,5 @@ spec: {{- end }} selector: app.kubernetes.io/name: prometheus - prometheus: {{ template "kube-prometheus-stack.fullname" . }}-prometheus + prometheus: {{ template "kube-prometheus-stack.prometheus.crname" . }} {{- end }} diff --git a/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/serviceThanosSidecarExternal.yaml b/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/serviceThanosSidecarExternal.yaml index bcf5687c..fa45934d 100644 --- a/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/serviceThanosSidecarExternal.yaml +++ b/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/serviceThanosSidecarExternal.yaml @@ -23,6 +23,9 @@ spec: {{- range $cidr := .Values.prometheus.thanosServiceExternal.loadBalancerSourceRanges }} - {{ $cidr }} {{- end }} +{{- end }} +{{- if ne .Values.prometheus.thanosServiceExternal.type "ClusterIP" }} + externalTrafficPolicy: {{ .Values.prometheus.thanosServiceExternal.externalTrafficPolicy }} {{- end }} ports: - name: {{ .Values.prometheus.thanosServiceExternal.portName }} @@ -39,5 +42,5 @@ spec: {{- end }} selector: app.kubernetes.io/name: prometheus - prometheus: {{ template "kube-prometheus-stack.fullname" . }}-prometheus + prometheus: {{ template "kube-prometheus-stack.prometheus.crname" . }} {{- end }} diff --git a/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/servicemonitorThanosSidecar.yaml b/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/servicemonitorThanosSidecar.yaml index 58014255..f2644d98 100644 --- a/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/servicemonitorThanosSidecar.yaml +++ b/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/servicemonitorThanosSidecar.yaml @@ -2,10 +2,10 @@ apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: - name: {{ template "kube-prometheus-stack.fullname" . }}-thanos-discovery + name: {{ template "kube-prometheus-stack.fullname" . }}-thanos-sidecar namespace: {{ template "kube-prometheus-stack.namespace" . }} labels: - app: {{ template "kube-prometheus-stack.name" . }}-thanos-discovery + app: {{ template "kube-prometheus-stack.name" . }}-thanos-sidecar {{ include "kube-prometheus-stack.labels" . | indent 4 }} spec: selector: diff --git a/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/serviceperreplica.yaml b/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/serviceperreplica.yaml index 470ce79f..8d2fdc33 100644 --- a/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/serviceperreplica.yaml +++ b/packages/rancher-project-monitoring/generated-changes/exclude/templates/prometheus/serviceperreplica.yaml @@ -1,6 +1,6 @@ {{- if and .Values.prometheus.enabled .Values.prometheus.servicePerReplica.enabled }} {{- $count := .Values.prometheus.prometheusSpec.replicas | int -}} -{{- $serviceValues := .Values.prometheus.servicePerReplica -}} +{{- $serviceValues := .Values.prometheus.servicePerReplica -}} apiVersion: v1 kind: List metadata: @@ -30,6 +30,9 @@ items: - {{ $cidr }} {{- end }} {{- end }} + {{- if ne $serviceValues.type "ClusterIP" }} + externalTrafficPolicy: {{ $serviceValues.externalTrafficPolicy }} + {{- end }} ports: - name: {{ $.Values.prometheus.prometheusSpec.portName }} {{- if eq $serviceValues.type "NodePort" }} @@ -39,8 +42,8 @@ items: targetPort: {{ $serviceValues.targetPort }} selector: app.kubernetes.io/name: prometheus - prometheus: {{ include "kube-prometheus-stack.fullname" $ }}-prometheus - statefulset.kubernetes.io/pod-name: prometheus-{{ include "kube-prometheus-stack.fullname" $ }}-prometheus-{{ $i }} + prometheus: {{ include "kube-prometheus-stack.prometheus.crname" $ }} + statefulset.kubernetes.io/pod-name: prometheus-{{ include "kube-prometheus-stack.prometheus.crname" $ }}-{{ $i }} type: "{{ $serviceValues.type }}" {{- end }} {{- end }} diff --git a/packages/rancher-project-monitoring/generated-changes/exclude/templates/rancher-monitoring/clusterrole.yaml b/packages/rancher-project-monitoring/generated-changes/exclude/templates/rancher-monitoring/clusterrole.yaml index be556cb4..b2c880ad 100644 --- a/packages/rancher-project-monitoring/generated-changes/exclude/templates/rancher-monitoring/clusterrole.yaml +++ b/packages/rancher-project-monitoring/generated-changes/exclude/templates/rancher-monitoring/clusterrole.yaml @@ -113,8 +113,10 @@ rules: - "https:{{ template "kube-prometheus-stack.fullname" . }}-prometheus:{{ .Values.prometheus.service.port }}" - "http:{{ template "kube-prometheus-stack.fullname" . }}-alertmanager:{{ .Values.alertmanager.service.port }}" - "https:{{ template "kube-prometheus-stack.fullname" . }}-alertmanager:{{ .Values.alertmanager.service.port }}" +{{- if .Values.grafana.enabled }} - "http:{{ include "call-nested" (list . "grafana" "grafana.fullname") }}:{{ .Values.grafana.service.port }}" - "https:{{ include "call-nested" (list . "grafana" "grafana.fullname") }}:{{ .Values.grafana.service.port }}" +{{- end }} verbs: - 'get' - apiGroups: @@ -122,7 +124,9 @@ rules: resourceNames: - {{ template "kube-prometheus-stack.fullname" . }}-prometheus - {{ template "kube-prometheus-stack.fullname" . }}-alertmanager +{{- if .Values.grafana.enabled }} - {{ include "call-nested" (list . "grafana" "grafana.fullname") }} +{{- end }} resources: - endpoints verbs: diff --git a/packages/rancher-project-monitoring/generated-changes/exclude/templates/rancher-monitoring/dashboards/rancher/k8s-dashboards.yaml b/packages/rancher-project-monitoring/generated-changes/exclude/templates/rancher-monitoring/dashboards/rancher/k8s-dashboards.yaml index 37afc649..2afae10e 100644 --- a/packages/rancher-project-monitoring/generated-changes/exclude/templates/rancher-monitoring/dashboards/rancher/k8s-dashboards.yaml +++ b/packages/rancher-project-monitoring/generated-changes/exclude/templates/rancher-monitoring/dashboards/rancher/k8s-dashboards.yaml @@ -1,3 +1,17 @@ +{{- $files := (.Files.Glob "files/rancher/k8s/*").AsConfig }} +{{- $filesDict := (fromYaml $files) }} +{{- if not (include "exporter.kubeEtcd.enabled" .) }} +{{- $filesDict = (unset $filesDict "rancher-etcd-nodes.json") -}} +{{- $filesDict = (unset $filesDict "rancher-etcd.json") -}} +{{- end }} +{{- if not (include "exporter.kubeControllerManager.enabled" .) }} +{{- $filesDict = (unset $filesDict "rancher-k8s-components-nodes.json") -}} +{{- $filesDict = (unset $filesDict "rancher-k8s-components.json") -}} +{{- else }} +{{- $_ := (set $filesDict "rancher-k8s-components-nodes.json" (get $filesDict "rancher-k8s-components-nodes.json" | replace "kube-controller-manager" (include "exporter.kubeControllerManager.jobName" .))) -}} +{{- $_ := (set $filesDict "rancher-k8s-components.json" (get $filesDict "rancher-k8s-components.json" | replace "kube-controller-manager" (include "exporter.kubeControllerManager.jobName" .))) -}} +{{- end }} +{{ $files = (toYaml $filesDict) }} {{- if and .Values.grafana.enabled .Values.grafana.defaultDashboardsEnabled }} apiVersion: v1 kind: ConfigMap @@ -13,5 +27,5 @@ metadata: app: {{ template "kube-prometheus-stack.name" $ }}-grafana {{ include "kube-prometheus-stack.labels" $ | indent 4 }} data: -{{ (.Files.Glob "files/rancher/k8s/*").AsConfig | indent 2 }} +{{ $files | indent 2 }} {{- end }} diff --git a/packages/rancher-project-monitoring/generated-changes/exclude/templates/rancher-monitoring/upgrade/configmap.yaml b/packages/rancher-project-monitoring/generated-changes/exclude/templates/rancher-monitoring/upgrade/configmap.yaml new file mode 100644 index 00000000..53cb8982 --- /dev/null +++ b/packages/rancher-project-monitoring/generated-changes/exclude/templates/rancher-monitoring/upgrade/configmap.yaml @@ -0,0 +1,13 @@ +{{- if .Values.upgrade.enabled }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ template "kube-prometheus-stack.fullname" . }}-upgrade + namespace: {{ template "kube-prometheus-stack.namespace" . }} + annotations: + "helm.sh/hook": pre-upgrade, pre-rollback + "helm.sh/hook-delete-policy": before-hook-creation, hook-succeeded, hook-failed + "helm.sh/hook-weight": "0" +data: +{{ (.Files.Glob "files/upgrade/scripts/*").AsConfig | indent 2 }} +{{- end }} \ No newline at end of file diff --git a/packages/rancher-project-monitoring/generated-changes/exclude/templates/rancher-monitoring/upgrade/job.yaml b/packages/rancher-project-monitoring/generated-changes/exclude/templates/rancher-monitoring/upgrade/job.yaml new file mode 100644 index 00000000..8f277174 --- /dev/null +++ b/packages/rancher-project-monitoring/generated-changes/exclude/templates/rancher-monitoring/upgrade/job.yaml @@ -0,0 +1,46 @@ +{{- if .Values.upgrade.enabled }} +apiVersion: batch/v1 +kind: Job +metadata: + name: {{ template "kube-prometheus-stack.fullname" . }}-upgrade + namespace: {{ template "kube-prometheus-stack.namespace" . }} + labels: + app: {{ template "kube-prometheus-stack.fullname" . }}-upgrade + annotations: + "helm.sh/hook": pre-upgrade, pre-rollback + "helm.sh/hook-delete-policy": before-hook-creation, hook-succeeded, hook-failed + "helm.sh/hook-weight": "2" +spec: + template: + metadata: + name: {{ template "kube-prometheus-stack.fullname" . }}-upgrade + labels: + app: {{ template "kube-prometheus-stack.fullname" . }}-upgrade + spec: + serviceAccountName: {{ template "kube-prometheus-stack.fullname" . }}-upgrade + securityContext: + runAsNonRoot: false + runAsUser: 0 + restartPolicy: Never + nodeSelector: {{ include "linux-node-selector" . | nindent 8 }} + tolerations: {{ include "linux-node-tolerations" . | nindent 8 }} + containers: + - name: run-scripts + image: {{ template "system_default_registry" . }}{{ .Values.upgrade.image.repository }}:{{ .Values.upgrade.image.tag }} + imagePullPolicy: {{ $.Values.global.kubectl.pullPolicy }} + command: + - /bin/sh + - -c + - > + for s in $(find /etc/scripts -type f); do + echo "Running $s..."; + cat $s | bash + done; + volumeMounts: + - name: upgrade + mountPath: /etc/scripts + volumes: + - name: upgrade + configMap: + name: {{ template "kube-prometheus-stack.fullname" . }}-upgrade +{{- end }} \ No newline at end of file diff --git a/packages/rancher-project-monitoring/generated-changes/exclude/templates/rancher-monitoring/upgrade/rbac.yaml b/packages/rancher-project-monitoring/generated-changes/exclude/templates/rancher-monitoring/upgrade/rbac.yaml new file mode 100644 index 00000000..abd7eef6 --- /dev/null +++ b/packages/rancher-project-monitoring/generated-changes/exclude/templates/rancher-monitoring/upgrade/rbac.yaml @@ -0,0 +1,127 @@ +{{- if .Values.upgrade.enabled }} +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: {{ template "kube-prometheus-stack.fullname" . }}-upgrade + namespace: {{ template "kube-prometheus-stack.namespace" . }} + labels: + app: {{ template "kube-prometheus-stack.fullname" . }}-upgrade + annotations: + "helm.sh/hook": pre-upgrade, pre-rollback + "helm.sh/hook-delete-policy": before-hook-creation, hook-succeeded + "helm.sh/hook-weight": "1" +rules: +- apiGroups: + - apps + resources: + - deployments + - daemonsets + - statefulsets + verbs: + - 'list' + - 'delete' +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: {{ template "kube-prometheus-stack.fullname" . }}-upgrade + namespace: {{ template "kube-prometheus-stack.namespace" . }} + labels: + app: {{ template "kube-prometheus-stack.fullname" . }}-upgrade + annotations: + "helm.sh/hook": pre-upgrade, pre-rollback + "helm.sh/hook-delete-policy": before-hook-creation, hook-succeeded, hook-failed + "helm.sh/hook-weight": "1" +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: {{ template "kube-prometheus-stack.fullname" . }}-upgrade +subjects: +- kind: ServiceAccount + name: {{ template "kube-prometheus-stack.fullname" . }}-upgrade + namespace: {{ template "kube-prometheus-stack.namespace" . }} +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: {{ template "kube-prometheus-stack.fullname" . }}-upgrade + labels: + app: {{ template "kube-prometheus-stack.fullname" . }}-upgrade + annotations: + "helm.sh/hook": pre-upgrade, pre-rollback + "helm.sh/hook-delete-policy": before-hook-creation, hook-succeeded, hook-failed + "helm.sh/hook-weight": "1" +rules: +- apiGroups: ['policy'] + resources: ['podsecuritypolicies'] + verbs: ['use'] + resourceNames: + - {{ template "kube-prometheus-stack.fullname" . }}-upgrade +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: {{ template "kube-prometheus-stack.fullname" . }}-upgrade + labels: + app: {{ template "kube-prometheus-stack.fullname" . }}-upgrade + annotations: + "helm.sh/hook": pre-upgrade, pre-rollback + "helm.sh/hook-delete-policy": before-hook-creation, hook-succeeded, hook-failed + "helm.sh/hook-weight": "1" +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: {{ template "kube-prometheus-stack.fullname" . }}-upgrade +subjects: +- kind: ServiceAccount + name: {{ template "kube-prometheus-stack.fullname" . }}-upgrade + namespace: {{ template "kube-prometheus-stack.namespace" . }} +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ template "kube-prometheus-stack.fullname" . }}-upgrade + namespace: {{ template "kube-prometheus-stack.namespace" . }} + labels: + app: {{ template "kube-prometheus-stack.fullname" . }}-upgrade + annotations: + "helm.sh/hook": pre-upgrade, pre-rollback + "helm.sh/hook-delete-policy": before-hook-creation, hook-succeeded, hook-failed + "helm.sh/hook-weight": "1" +--- +apiVersion: policy/v1beta1 +kind: PodSecurityPolicy +metadata: + name: {{ template "kube-prometheus-stack.fullname" . }}-upgrade + namespace: {{ template "kube-prometheus-stack.namespace" . }} + labels: + app: {{ template "kube-prometheus-stack.fullname" . }}-upgrade + annotations: + "helm.sh/hook": pre-upgrade, pre-rollback + "helm.sh/hook-delete-policy": before-hook-creation, hook-succeeded, hook-failed + "helm.sh/hook-weight": "1" +spec: + privileged: false + allowPrivilegeEscalation: false + hostNetwork: false + hostIPC: false + hostPID: false + runAsUser: + rule: 'RunAsAny' + seLinux: + rule: 'RunAsAny' + supplementalGroups: + rule: 'MustRunAs' + ranges: + - min: 1 + max: 65535 + fsGroup: + rule: 'MustRunAs' + ranges: + - min: 1 + max: 65535 + readOnlyRootFilesystem: false + volumes: + - 'configMap' + - 'secret' +{{- end }} \ No newline at end of file diff --git a/packages/rancher-project-monitoring/generated-changes/exclude/templates/thanos-ruler/extrasecret.yaml b/packages/rancher-project-monitoring/generated-changes/exclude/templates/thanos-ruler/extrasecret.yaml new file mode 100644 index 00000000..fe2ea5be --- /dev/null +++ b/packages/rancher-project-monitoring/generated-changes/exclude/templates/thanos-ruler/extrasecret.yaml @@ -0,0 +1,20 @@ +{{- if .Values.thanosRuler.extraSecret.data -}} +{{- $secretName := printf "thanos-ruler-%s-extra" (include "kube-prometheus-stack.fullname" . ) -}} +apiVersion: v1 +kind: Secret +metadata: + name: {{ default $secretName .Values.thanosRuler.extraSecret.name }} + namespace: {{ template "kube-prometheus-stack.namespace" . }} +{{- if .Values.thanosRuler.extraSecret.annotations }} + annotations: +{{ toYaml .Values.thanosRuler.extraSecret.annotations | indent 4 }} +{{- end }} + labels: + app: {{ template "kube-prometheus-stack.name" . }}-thanos-ruler + app.kubernetes.io/component: thanos-ruler +{{ include "kube-prometheus-stack.labels" . | indent 4 }} +data: +{{- range $key, $val := .Values.thanosRuler.extraSecret.data }} + {{ $key }}: {{ $val | b64enc | quote }} +{{- end }} +{{- end }} diff --git a/packages/rancher-project-monitoring/generated-changes/exclude/templates/thanos-ruler/ingress.yaml b/packages/rancher-project-monitoring/generated-changes/exclude/templates/thanos-ruler/ingress.yaml new file mode 100644 index 00000000..2760805c --- /dev/null +++ b/packages/rancher-project-monitoring/generated-changes/exclude/templates/thanos-ruler/ingress.yaml @@ -0,0 +1,77 @@ +{{- if and .Values.thanosRuler.enabled .Values.thanosRuler.ingress.enabled }} +{{- $pathType := .Values.thanosRuler.ingress.pathType | default "ImplementationSpecific" }} +{{- $serviceName := printf "%s-%s" (include "kube-prometheus-stack.fullname" .) "thanos-ruler" }} +{{- $servicePort := .Values.thanosRuler.service.port -}} +{{- $routePrefix := list .Values.thanosRuler.thanosRulerSpec.routePrefix }} +{{- $paths := .Values.thanosRuler.ingress.paths | default $routePrefix -}} +{{- $apiIsStable := eq (include "kube-prometheus-stack.ingress.isStable" .) "true" -}} +{{- $ingressSupportsPathType := eq (include "kube-prometheus-stack.ingress.supportsPathType" .) "true" -}} +apiVersion: {{ include "kube-prometheus-stack.ingress.apiVersion" . }} +kind: Ingress +metadata: + name: {{ $serviceName }} + namespace: {{ template "kube-prometheus-stack.namespace" . }} +{{- if .Values.thanosRuler.ingress.annotations }} + annotations: +{{ toYaml .Values.thanosRuler.ingress.annotations | indent 4 }} +{{- end }} + labels: + app: {{ template "kube-prometheus-stack.name" . }}-thanos-ruler +{{- if .Values.thanosRuler.ingress.labels }} +{{ toYaml .Values.thanosRuler.ingress.labels | indent 4 }} +{{- end }} +{{ include "kube-prometheus-stack.labels" . | indent 4 }} +spec: + {{- if $apiIsStable }} + {{- if .Values.thanosRuler.ingress.ingressClassName }} + ingressClassName: {{ .Values.thanosRuler.ingress.ingressClassName }} + {{- end }} + {{- end }} + rules: + {{- if .Values.thanosRuler.ingress.hosts }} + {{- range $host := .Values.thanosRuler.ingress.hosts }} + - host: {{ tpl $host $ }} + http: + paths: + {{- range $p := $paths }} + - path: {{ tpl $p $ }} + {{- if and $pathType $ingressSupportsPathType }} + pathType: {{ $pathType }} + {{- end }} + backend: + {{- if $apiIsStable }} + service: + name: {{ $serviceName }} + port: + number: {{ $servicePort }} + {{- else }} + serviceName: {{ $serviceName }} + servicePort: {{ $servicePort }} + {{- end }} + {{- end -}} + {{- end -}} + {{- else }} + - http: + paths: + {{- range $p := $paths }} + - path: {{ tpl $p $ }} + {{- if and $pathType $ingressSupportsPathType }} + pathType: {{ $pathType }} + {{- end }} + backend: + {{- if $apiIsStable }} + service: + name: {{ $serviceName }} + port: + number: {{ $servicePort }} + {{- else }} + serviceName: {{ $serviceName }} + servicePort: {{ $servicePort }} + {{- end }} + {{- end -}} + {{- end -}} + {{- if .Values.thanosRuler.ingress.tls }} + tls: +{{ tpl (toYaml .Values.thanosRuler.ingress.tls | indent 4) . }} + {{- end -}} +{{- end -}} diff --git a/packages/rancher-project-monitoring/generated-changes/exclude/templates/thanos-ruler/podDisruptionBudget.yaml b/packages/rancher-project-monitoring/generated-changes/exclude/templates/thanos-ruler/podDisruptionBudget.yaml new file mode 100644 index 00000000..d3d378d6 --- /dev/null +++ b/packages/rancher-project-monitoring/generated-changes/exclude/templates/thanos-ruler/podDisruptionBudget.yaml @@ -0,0 +1,21 @@ +{{- if and .Values.thanosRuler.enabled .Values.thanosRuler.podDisruptionBudget.enabled }} +apiVersion: {{ include "kube-prometheus-stack.pdb.apiVersion" . }} +kind: PodDisruptionBudget +metadata: + name: {{ template "kube-prometheus-stack.fullname" . }}-thanos-ruler + namespace: {{ template "kube-prometheus-stack.namespace" . }} + labels: + app: {{ template "kube-prometheus-stack.name" . }}-thanos-ruler +{{ include "kube-prometheus-stack.labels" . | indent 4 }} +spec: + {{- if .Values.thanosRuler.podDisruptionBudget.minAvailable }} + minAvailable: {{ .Values.thanosRuler.podDisruptionBudget.minAvailable }} + {{- end }} + {{- if .Values.thanosRuler.podDisruptionBudget.maxUnavailable }} + maxUnavailable: {{ .Values.thanosRuler.podDisruptionBudget.maxUnavailable }} + {{- end }} + selector: + matchLabels: + app.kubernetes.io/name: thanos-ruler + thanos-ruler: {{ template "kube-prometheus-stack.fullname" . }}-thanos-ruler +{{- end }} diff --git a/packages/rancher-project-monitoring/generated-changes/exclude/templates/thanos-ruler/ruler.yaml b/packages/rancher-project-monitoring/generated-changes/exclude/templates/thanos-ruler/ruler.yaml new file mode 100644 index 00000000..c914e755 --- /dev/null +++ b/packages/rancher-project-monitoring/generated-changes/exclude/templates/thanos-ruler/ruler.yaml @@ -0,0 +1,168 @@ +{{- if .Values.thanosRuler.enabled }} +apiVersion: monitoring.coreos.com/v1 +kind: ThanosRuler +metadata: + name: {{ template "kube-prometheus-stack.fullname" . }}-thanos-ruler + namespace: {{ template "kube-prometheus-stack.namespace" . }} + labels: + app: {{ template "kube-prometheus-stack.name" . }}-thanos-ruler +{{ include "kube-prometheus-stack.labels" . | indent 4 }} +{{- if .Values.thanosRuler.annotations }} + annotations: +{{ toYaml .Values.thanosRuler.annotations | indent 4 }} +{{- end }} +spec: +{{- if .Values.thanosRuler.thanosRulerSpec.image }} + {{- if and .Values.thanosRuler.thanosRulerSpec.image.tag .Values.thanosRuler.thanosRulerSpec.image.sha }} + image: "{{ template "system_default_registry" . }}{{ .Values.thanosRuler.thanosRulerSpec.image.repository }}:{{ .Values.thanosRuler.thanosRulerSpec.image.tag }}@sha256:{{ .Values.thanosRuler.thanosRulerSpec.image.sha }}" + {{- else if .Values.thanosRuler.thanosRulerSpec.image.sha }} + image: "{{ template "system_default_registry" . }}{{ .Values.thanosRuler.thanosRulerSpec.image.repository }}@sha256:{{ .Values.thanosRuler.thanosRulerSpec.image.sha }}" + {{- else if .Values.thanosRuler.thanosRulerSpec.image.tag }} + image: "{{ template "system_default_registry" . }}{{ .Values.thanosRuler.thanosRulerSpec.image.repository }}:{{ .Values.thanosRuler.thanosRulerSpec.image.tag }}" + {{- else }} + image: "{{ template "system_default_registry" . }}{{ .Values.thanosRuler.thanosRulerSpec.image.repository }}" + {{- end }} + {{- if .Values.thanosRuler.thanosRulerSpec.image.sha }} + sha: {{ .Values.thanosRuler.thanosRulerSpec.image.sha }} + {{- end }} +{{- end }} + replicas: {{ .Values.thanosRuler.thanosRulerSpec.replicas }} + listenLocal: {{ .Values.thanosRuler.thanosRulerSpec.listenLocal }} + serviceAccountName: {{ template "kube-prometheus-stack.thanosRuler.serviceAccountName" . }} +{{- if .Values.thanosRuler.thanosRulerSpec.externalPrefix }} + externalPrefix: "{{ tpl .Values.thanosRuler.thanosRulerSpec.externalPrefix . }}" +{{- else if and .Values.thanosRuler.ingress.enabled .Values.thanosRuler.ingress.hosts }} + externalPrefix: "http://{{ tpl (index .Values.thanosRuler.ingress.hosts 0) . }}{{ .Values.thanosRuler.thanosRulerSpec.routePrefix }}" +{{- else }} + externalPrefix: http://{{ template "kube-prometheus-stack.fullname" . }}-thanosRuler.{{ template "kube-prometheus-stack.namespace" . }}:{{ .Values.thanosRuler.service.port }} +{{- end }} + nodeSelector: {{ include "linux-node-selector" . | nindent 4 }} +{{- if .Values.thanosRuler.thanosRulerSpec.nodeSelector }} +{{ toYaml .Values.thanosRuler.thanosRulerSpec.nodeSelector | indent 4 }} +{{- end }} + paused: {{ .Values.thanosRuler.thanosRulerSpec.paused }} + logFormat: {{ .Values.thanosRuler.thanosRulerSpec.logFormat | quote }} + logLevel: {{ .Values.thanosRuler.thanosRulerSpec.logLevel | quote }} + retention: {{ .Values.thanosRuler.thanosRulerSpec.retention | quote }} +{{- if .Values.thanosRuler.thanosRulerSpec.evaluationInterval }} + evaluationInterval: {{ .Values.thanosRuler.thanosRulerSpec.evaluationInterval }} +{{- end }} +{{- if .Values.thanosRuler.thanosRulerSpec.ruleNamespaceSelector }} + ruleNamespaceSelector: +{{ toYaml .Values.thanosRuler.thanosRulerSpec.ruleNamespaceSelector | indent 4 }} +{{ else }} + ruleNamespaceSelector: {} +{{- end }} +{{- if .Values.thanosRuler.thanosRulerSpec.ruleSelector }} + ruleSelector: +{{ toYaml .Values.thanosRuler.thanosRulerSpec.ruleSelector | indent 4}} +{{- else if .Values.thanosRuler.thanosRulerSpec.ruleSelectorNilUsesHelmValues }} + ruleSelector: + matchLabels: + release: {{ $.Release.Name | quote }} +{{ else }} + ruleSelector: {} +{{- end }} +{{- if .Values.thanosRuler.thanosRulerSpec.alertQueryUrl }} + alertQueryUrl: "{{ .Values.thanosRuler.thanosRulerSpec.alertQueryUrl }}" +{{- end}} +{{- if .Values.thanosRuler.thanosRulerSpec.alertmanagersUrl }} + alertmanagersUrl: +{{ toYaml .Values.thanosRuler.thanosRulerSpec.alertmanagersUrl | indent 4 }} +{{- end }} +{{- if .Values.thanosRuler.thanosRulerSpec.alertmanagersConfig }} + alertmanagersConfig: +{{ toYaml .Values.thanosRuler.thanosRulerSpec.alertmanagersConfig | indent 4 }} +{{- end }} +{{- if .Values.thanosRuler.thanosRulerSpec.queryEndpoints }} + queryEndpoints: +{{ toYaml .Values.thanosRuler.thanosRulerSpec.queryEndpoints | indent 4 }} +{{- end }} +{{- if .Values.thanosRuler.thanosRulerSpec.resources }} + resources: +{{ toYaml .Values.thanosRuler.thanosRulerSpec.resources | indent 4 }} +{{- end }} +{{- if .Values.thanosRuler.thanosRulerSpec.routePrefix }} + routePrefix: "{{ .Values.thanosRuler.thanosRulerSpec.routePrefix }}" +{{- end }} +{{- if .Values.thanosRuler.thanosRulerSpec.securityContext }} + securityContext: +{{ toYaml .Values.thanosRuler.thanosRulerSpec.securityContext | indent 4 }} +{{- end }} +{{- if .Values.thanosRuler.thanosRulerSpec.storage }} + storage: +{{ toYaml .Values.thanosRuler.thanosRulerSpec.storage | indent 4 }} +{{- end }} +{{- if .Values.thanosRuler.thanosRulerSpec.objectStorageConfig }} + objectStorageConfig: +{{ toYaml .Values.thanosRuler.thanosRulerSpec.objectStorageConfig | indent 4 }} +{{- end }} +{{- if .Values.thanosRuler.thanosRulerSpec.labels }} + labels: +{{ toYaml .Values.thanosRuler.thanosRulerSpec.labels | indent 4 }} +{{- end }} +{{- if .Values.thanosRuler.thanosRulerSpec.objectStorageConfigFile }} + objectStorageConfigFile: {{ .Values.thanosRuler.thanosRulerSpec.objectStorageConfigFile }} +{{- end }} +{{- if .Values.thanosRuler.thanosRulerSpec.podMetadata }} + podMetadata: +{{ toYaml .Values.thanosRuler.thanosRulerSpec.podMetadata | indent 4 }} +{{- end }} +{{- if or .Values.thanosRuler.thanosRulerSpec.podAntiAffinity .Values.thanosRuler.thanosRulerSpec.affinity }} + affinity: +{{- end }} +{{- if .Values.thanosRuler.thanosRulerSpec.affinity }} +{{ toYaml .Values.thanosRuler.thanosRulerSpec.affinity | indent 4 }} +{{- end }} +{{- if eq .Values.thanosRuler.thanosRulerSpec.podAntiAffinity "hard" }} + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - topologyKey: {{ .Values.thanosRuler.thanosRulerSpec.podAntiAffinityTopologyKey }} + labelSelector: + matchExpressions: + - {key: app.kubernetes.io/name, operator: In, values: [thanos-ruler]} + - {key: thanos-ruler, operator: In, values: [{{ template "kube-prometheus-stack.fullname" . }}-thanos-ruler]} +{{- else if eq .Values.thanosRuler.thanosRulerSpec.podAntiAffinity "soft" }} + podAntiAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - weight: 100 + podAffinityTerm: + topologyKey: {{ .Values.thanosRuler.thanosRulerSpec.podAntiAffinityTopologyKey }} + labelSelector: + matchExpressions: + - {key: app.kubernetes.io/name, operator: In, values: [thanos-ruler]} + - {key: thanos-ruler, operator: In, values: [{{ template "kube-prometheus-stack.fullname" . }}-thanos-ruler]} +{{- end }} + tolerations: {{ include "linux-node-tolerations" . | nindent 4 }} +{{- if .Values.thanosRuler.thanosRulerSpec.tolerations }} +{{ toYaml .Values.thanosRuler.thanosRulerSpec.tolerations | indent 4 }} +{{- end }} +{{- if .Values.thanosRuler.thanosRulerSpec.topologySpreadConstraints }} + topologySpreadConstraints: +{{ toYaml .Values.thanosRuler.thanosRulerSpec.topologySpreadConstraints | indent 4 }} +{{- end }} +{{- if .Values.global.imagePullSecrets }} + imagePullSecrets: +{{ toYaml .Values.global.imagePullSecrets | indent 4 }} +{{- end }} +{{- if .Values.thanosRuler.thanosRulerSpec.containers }} + containers: +{{ toYaml .Values.thanosRuler.thanosRulerSpec.containers | indent 4 }} +{{- end }} +{{- if .Values.thanosRuler.thanosRulerSpec.initContainers }} + initContainers: +{{ toYaml .Values.thanosRuler.thanosRulerSpec.initContainers | indent 4 }} +{{- end }} +{{- if .Values.thanosRuler.thanosRulerSpec.priorityClassName }} + priorityClassName: {{.Values.thanosRuler.thanosRulerSpec.priorityClassName }} +{{- end }} +{{- if .Values.thanosRuler.thanosRulerSpec.volumes }} + volumes: +{{ toYaml .Values.thanosRuler.thanosRulerSpec.volumes | indent 4 }} +{{- end }} +{{- if .Values.thanosRuler.thanosRulerSpec.volumeMounts }} + volumeMounts: +{{ toYaml .Values.thanosRuler.thanosRulerSpec.volumeMounts | indent 4 }} +{{- end }} + portName: {{ .Values.thanosRuler.thanosRulerSpec.portName }} +{{- end }} diff --git a/packages/rancher-project-monitoring/generated-changes/exclude/templates/thanos-ruler/service.yaml b/packages/rancher-project-monitoring/generated-changes/exclude/templates/thanos-ruler/service.yaml new file mode 100644 index 00000000..093dbf7c --- /dev/null +++ b/packages/rancher-project-monitoring/generated-changes/exclude/templates/thanos-ruler/service.yaml @@ -0,0 +1,53 @@ +{{- if .Values.thanosRuler.enabled }} +apiVersion: v1 +kind: Service +metadata: + name: {{ template "kube-prometheus-stack.fullname" . }}-thanos-ruler + namespace: {{ template "kube-prometheus-stack.namespace" . }} + labels: + app: {{ template "kube-prometheus-stack.name" . }}-thanos-ruler + self-monitor: {{ .Values.thanosRuler.serviceMonitor.selfMonitor | quote }} +{{ include "kube-prometheus-stack.labels" . | indent 4 }} +{{- if .Values.thanosRuler.service.labels }} +{{ toYaml .Values.thanosRuler.service.labels | indent 4 }} +{{- end }} +{{- if .Values.thanosRuler.service.annotations }} + annotations: +{{ toYaml .Values.thanosRuler.service.annotations | indent 4 }} +{{- end }} +spec: +{{- if .Values.thanosRuler.service.clusterIP }} + clusterIP: {{ .Values.thanosRuler.service.clusterIP }} +{{- end }} +{{- if .Values.thanosRuler.service.externalIPs }} + externalIPs: +{{ toYaml .Values.thanosRuler.service.externalIPs | indent 4 }} +{{- end }} +{{- if .Values.thanosRuler.service.loadBalancerIP }} + loadBalancerIP: {{ .Values.thanosRuler.service.loadBalancerIP }} +{{- end }} +{{- if .Values.thanosRuler.service.loadBalancerSourceRanges }} + loadBalancerSourceRanges: + {{- range $cidr := .Values.thanosRuler.service.loadBalancerSourceRanges }} + - {{ $cidr }} + {{- end }} +{{- end }} +{{- if ne .Values.thanosRuler.service.type "ClusterIP" }} + externalTrafficPolicy: {{ .Values.thanosRuler.service.externalTrafficPolicy }} +{{- end }} + ports: + - name: {{ .Values.thanosRuler.thanosRulerSpec.portName }} + {{- if eq .Values.thanosRuler.service.type "NodePort" }} + nodePort: {{ .Values.thanosRuler.service.nodePort }} + {{- end }} + port: {{ .Values.thanosRuler.service.port }} + targetPort: {{ .Values.thanosRuler.service.targetPort }} + protocol: TCP +{{- if .Values.thanosRuler.service.additionalPorts }} +{{ toYaml .Values.thanosRuler.service.additionalPorts | indent 2 }} +{{- end }} + selector: + app.kubernetes.io/name: thanos-ruler + thanos-ruler: {{ template "kube-prometheus-stack.fullname" . }}-thanos-ruler + type: "{{ .Values.thanosRuler.service.type }}" +{{- end }} diff --git a/packages/rancher-project-monitoring/generated-changes/exclude/templates/thanos-ruler/serviceaccount.yaml b/packages/rancher-project-monitoring/generated-changes/exclude/templates/thanos-ruler/serviceaccount.yaml new file mode 100644 index 00000000..0138c357 --- /dev/null +++ b/packages/rancher-project-monitoring/generated-changes/exclude/templates/thanos-ruler/serviceaccount.yaml @@ -0,0 +1,20 @@ +{{- if and .Values.thanosRuler.enabled .Values.thanosRuler.serviceAccount.create }} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ template "kube-prometheus-stack.thanosRuler.serviceAccountName" . }} + namespace: {{ template "kube-prometheus-stack.namespace" . }} + labels: + app: {{ template "kube-prometheus-stack.name" . }}-thanos-ruler + app.kubernetes.io/name: {{ template "kube-prometheus-stack.name" . }}-thanos-ruler + app.kubernetes.io/component: thanos-ruler +{{ include "kube-prometheus-stack.labels" . | indent 4 }} +{{- if .Values.thanosRuler.serviceAccount.annotations }} + annotations: +{{ toYaml .Values.thanosRuler.serviceAccount.annotations | indent 4 }} +{{- end }} +{{- if .Values.global.imagePullSecrets }} +imagePullSecrets: +{{ toYaml .Values.global.imagePullSecrets | indent 2 }} +{{- end }} +{{- end }} diff --git a/packages/rancher-project-monitoring/generated-changes/exclude/templates/thanos-ruler/servicemonitor.yaml b/packages/rancher-project-monitoring/generated-changes/exclude/templates/thanos-ruler/servicemonitor.yaml new file mode 100644 index 00000000..4a05679b --- /dev/null +++ b/packages/rancher-project-monitoring/generated-changes/exclude/templates/thanos-ruler/servicemonitor.yaml @@ -0,0 +1,45 @@ +{{- if and .Values.thanosRuler.enabled .Values.thanosRuler.serviceMonitor.selfMonitor }} +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + name: {{ template "kube-prometheus-stack.fullname" . }}-thanos-ruler + namespace: {{ template "kube-prometheus-stack.namespace" . }} + labels: + app: {{ template "kube-prometheus-stack.name" . }}-thanos-ruler +{{ include "kube-prometheus-stack.labels" . | indent 4 }} +spec: + selector: + matchLabels: + app: {{ template "kube-prometheus-stack.name" . }}-thanos-ruler + release: {{ $.Release.Name | quote }} + self-monitor: {{ .Values.thanosRuler.serviceMonitor.selfMonitor | quote }} + namespaceSelector: + matchNames: + - {{ printf "%s" (include "kube-prometheus-stack.namespace" .) | quote }} + endpoints: + - port: {{ .Values.thanosRuler.thanosRulerSpec.portName }} + {{- if .Values.thanosRuler.serviceMonitor.interval }} + interval: {{ .Values.thanosRuler.serviceMonitor.interval }} + {{- end }} + {{- if .Values.thanosRuler.serviceMonitor.proxyUrl }} + proxyUrl: {{ .Values.thanosRuler.serviceMonitor.proxyUrl}} + {{- end }} + {{- if .Values.thanosRuler.serviceMonitor.scheme }} + scheme: {{ .Values.thanosRuler.serviceMonitor.scheme }} + {{- end }} + {{- if .Values.thanosRuler.serviceMonitor.bearerTokenFile }} + bearerTokenFile: {{ .Values.thanosRuler.serviceMonitor.bearerTokenFile }} + {{- end }} + {{- if .Values.thanosRuler.serviceMonitor.tlsConfig }} + tlsConfig: {{ toYaml .Values.thanosRuler.serviceMonitor.tlsConfig | nindent 6 }} + {{- end }} + path: "{{ trimSuffix "/" .Values.thanosRuler.thanosRulerSpec.routePrefix }}/metrics" +{{- if .Values.thanosRuler.serviceMonitor.metricRelabelings }} + metricRelabelings: +{{ tpl (toYaml .Values.thanosRuler.serviceMonitor.metricRelabelings | indent 6) . }} +{{- end }} +{{- if .Values.thanosRuler.serviceMonitor.relabelings }} + relabelings: +{{ toYaml .Values.thanosRuler.serviceMonitor.relabelings | indent 6 }} +{{- end }} +{{- end }} diff --git a/packages/rancher-project-monitoring/generated-changes/overlay/templates/grafana/dashboards-1.14/grafana-overview.yaml b/packages/rancher-project-monitoring/generated-changes/overlay/templates/grafana/dashboards-1.14/grafana-overview.yaml deleted file mode 100644 index 8d08b055..00000000 --- a/packages/rancher-project-monitoring/generated-changes/overlay/templates/grafana/dashboards-1.14/grafana-overview.yaml +++ /dev/null @@ -1,635 +0,0 @@ -{{- /* -Generated from 'grafana-overview' from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/grafana-dashboardDefinitions.yaml -Do not change in-place! In order to change this file first read following link: -https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack -*/ -}} -{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} -{{- if and (or .Values.grafana.enabled .Values.grafana.forceDeployDashboards) (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.grafana.defaultDashboardsEnabled }} -apiVersion: v1 -kind: ConfigMap -metadata: - namespace: {{ template "kube-prometheus-stack-grafana.namespace" . }} - name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" $) "grafana-overview" | trunc 63 | trimSuffix "-" }} - annotations: -{{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} - labels: - {{- if $.Values.grafana.sidecar.dashboards.label }} - {{ $.Values.grafana.sidecar.dashboards.label }}: {{ ternary $.Values.grafana.sidecar.dashboards.labelValue "1" (not (empty $.Values.grafana.sidecar.dashboards.labelValue)) | quote }} - {{- end }} - app: {{ template "kube-prometheus-stack.name" $ }}-grafana -{{ include "kube-prometheus-stack.labels" $ | indent 4 }} -data: - grafana-overview.json: |- - { - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [ - - ], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "gnetId": null, - "graphTooltip": 0, - "id": 3085, - "iteration": 1631554945276, - "links": [ - - ], - "panels": [ - { - "datasource": "$datasource", - "fieldConfig": { - "defaults": { - "mappings": [ - - ], - "noValue": "0", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - - ] - }, - "gridPos": { - "h": 5, - "w": 6, - "x": 0, - "y": 0 - }, - "id": 6, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "mean" - ], - "fields": "", - "values": false - }, - "text": { - - }, - "textMode": "auto" - }, - "pluginVersion": "8.1.3", - "targets": [ - { - "expr": "grafana_alerting_result_total{job=~\"$job\", instance=~\"$instance\", state=\"alerting\"}", - "instant": true, - "interval": "", - "legendFormat": "", - "refId": "A" - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Firing Alerts", - "type": "stat" - }, - { - "datasource": "$datasource", - "fieldConfig": { - "defaults": { - "mappings": [ - - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - - ] - }, - "gridPos": { - "h": 5, - "w": 6, - "x": 6, - "y": 0 - }, - "id": 8, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "mean" - ], - "fields": "", - "values": false - }, - "text": { - - }, - "textMode": "auto" - }, - "pluginVersion": "8.1.3", - "targets": [ - { - "expr": "sum(grafana_stat_totals_dashboard{job=~\"$job\", instance=~\"$instance\"})", - "interval": "", - "legendFormat": "", - "refId": "A" - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Dashboards", - "type": "stat" - }, - { - "datasource": "$datasource", - "fieldConfig": { - "defaults": { - "custom": { - "align": null, - "displayMode": "auto" - }, - "mappings": [ - - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - - ] - }, - "gridPos": { - "h": 5, - "w": 12, - "x": 12, - "y": 0 - }, - "id": 10, - "options": { - "showHeader": true - }, - "pluginVersion": "8.1.3", - "targets": [ - { - "expr": "grafana_build_info{job=~\"$job\", instance=~\"$instance\"}", - "instant": true, - "interval": "", - "legendFormat": "", - "refId": "A" - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Build Info", - "transformations": [ - { - "id": "labelsToFields", - "options": { - - } - }, - { - "id": "organize", - "options": { - "excludeByName": { - "Time": true, - "Value": true, - "branch": true, - "container": true, - "goversion": true, - "namespace": true, - "pod": true, - "revision": true - }, - "indexByName": { - "Time": 7, - "Value": 11, - "branch": 4, - "container": 8, - "edition": 2, - "goversion": 6, - "instance": 1, - "job": 0, - "namespace": 9, - "pod": 10, - "revision": 5, - "version": 3 - }, - "renameByName": { - - } - } - } - ], - "type": "table" - }, - { - "aliasColors": { - - }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fieldConfig": { - "defaults": { - "links": [ - - ] - }, - "overrides": [ - - ] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 5 - }, - "hiddenSeries": false, - "id": 2, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "8.1.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - - ], - "spaceLength": 10, - "stack": true, - "steppedLine": false, - "targets": [ - { - "expr": "sum by (status_code) (irate(grafana_http_request_duration_seconds_count{job=~\"$job\", instance=~\"$instance\"}[1m])) ", - "interval": "", - "legendFormat": "{{`{{`}}status_code{{`}}`}}", - "refId": "A" - } - ], - "thresholds": [ - - ], - "timeFrom": null, - "timeRegions": [ - - ], - "timeShift": null, - "title": "RPS", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ - - ] - }, - "yaxes": [ - { - "$$hashKey": "object:157", - "format": "reqps", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "$$hashKey": "object:158", - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": { - - }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fieldConfig": { - "defaults": { - "links": [ - - ] - }, - "overrides": [ - - ] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 5 - }, - "hiddenSeries": false, - "id": 4, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "8.1.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - - ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "exemplar": true, - "expr": "histogram_quantile(0.99, sum(irate(grafana_http_request_duration_seconds_bucket{instance=~\"$instance\", job=~\"$job\"}[$__rate_interval])) by (le)) * 1", - "interval": "", - "legendFormat": "99th Percentile", - "refId": "A" - }, - { - "exemplar": true, - "expr": "histogram_quantile(0.50, sum(irate(grafana_http_request_duration_seconds_bucket{instance=~\"$instance\", job=~\"$job\"}[$__rate_interval])) by (le)) * 1", - "interval": "", - "legendFormat": "50th Percentile", - "refId": "B" - }, - { - "exemplar": true, - "expr": "sum(irate(grafana_http_request_duration_seconds_sum{instance=~\"$instance\", job=~\"$job\"}[$__rate_interval])) * 1 / sum(irate(grafana_http_request_duration_seconds_count{instance=~\"$instance\", job=~\"$job\"}[$__rate_interval]))", - "interval": "", - "legendFormat": "Average", - "refId": "C" - } - ], - "thresholds": [ - - ], - "timeFrom": null, - "timeRegions": [ - - ], - "timeShift": null, - "title": "Request Latency", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ - - ] - }, - "yaxes": [ - { - "$$hashKey": "object:210", - "format": "ms", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "$$hashKey": "object:211", - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - } - ], - "schemaVersion": 30, - "style": "dark", - "tags": [ - - ], - "templating": { - "list": [ - { - "current": { - "text": "Prometheus", - "value": "Prometheus" - }, - "description": null, - "error": null, - "hide": 0, - "includeAll": false, - "label": "Data Source", - "multi": false, - "name": "datasource", - "options": [ - - ], - "query": "prometheus", - "queryValue": "", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "type": "datasource" - }, - { - "allValue": ".*", - "current": { - "selected": false, - "text": [ - "default/grafana" - ], - "value": [ - "default/grafana" - ] - }, - "datasource": "$datasource", - "definition": "label_values(grafana_build_info, job)", - "description": null, - "error": null, - "hide": 0, - "includeAll": true, - "label": null, - "multi": true, - "name": "job", - "options": [ - - ], - "query": { - "query": "label_values(grafana_build_info, job)", - "refId": "Billing Admin-job-Variable-Query" - }, - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": ".*", - "current": { - "selected": false, - "text": "All", - "value": "$__all" - }, - "datasource": "$datasource", - "definition": "label_values(grafana_build_info, instance)", - "description": null, - "error": null, - "hide": 0, - "includeAll": true, - "label": null, - "multi": true, - "name": "instance", - "options": [ - - ], - "query": { - "query": "label_values(grafana_build_info, instance)", - "refId": "Billing Admin-instance-Variable-Query" - }, - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "time": { - "from": "now-6h", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ] - }, - "timezone": "{{ .Values.grafana.defaultDashboardsTimezone }}", - "title": "Grafana Overview", - "uid": "6be0s85Mk", - "version": 2 - } -{{- end }} \ No newline at end of file diff --git a/packages/rancher-project-monitoring/generated-changes/patch/Chart.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/Chart.yaml.patch index f467ad73..a67c60d9 100644 --- a/packages/rancher-project-monitoring/generated-changes/patch/Chart.yaml.patch +++ b/packages/rancher-project-monitoring/generated-changes/patch/Chart.yaml.patch @@ -1,6 +1,6 @@ --- charts-original/Chart.yaml +++ charts/Chart.yaml -@@ -1,61 +1,33 @@ +@@ -1,25 +1,11 @@ annotations: - artifacthub.io/links: | - - name: Chart Source @@ -12,14 +12,14 @@ catalog.cattle.io/certified: rancher - catalog.cattle.io/deploys-on-os: windows - catalog.cattle.io/display-name: Monitoring -- catalog.cattle.io/kube-version: '>=1.16.0-0' +- catalog.cattle.io/kube-version: '>= 1.16.0-0 < 1.25.0-0' - catalog.cattle.io/namespace: cattle-monitoring-system + catalog.cattle.io/display-name: Project Monitoring + catalog.cattle.io/hidden: "true" + catalog.cattle.io/kube-version: '>=1.16.0-0 < 1.25.0-0' catalog.cattle.io/permits-os: linux,windows - catalog.cattle.io/provides-gvr: monitoring.coreos.com.prometheus/v1 -- catalog.cattle.io/rancher-version: '>= 2.6.0-0 <=2.6.99-0' +- catalog.cattle.io/rancher-version: '>= 2.6.0-0 < 2.7.0-0' - catalog.cattle.io/release-name: rancher-monitoring - catalog.cattle.io/requests-cpu: 4500m - catalog.cattle.io/requests-memory: 4000Mi @@ -29,11 +29,9 @@ + catalog.cattle.io/rancher-version: '>= 2.6.5-0 <= 2.8.0-0' + catalog.cattle.io/release-name: rancher-project-monitoring apiVersion: v2 --appVersion: 0.50.0 -+appVersion: 0.59.1 + appVersion: 0.59.1 dependencies: - - condition: grafana.enabled - name: grafana +@@ -28,38 +14,20 @@ repository: file://./charts/grafana description: Collects several related Helm charts, Grafana dashboards, and Prometheus rules combined with documentation and scripts to provide easy to operate end-to-end @@ -49,29 +47,30 @@ - monitoring kubeVersion: '>=1.16.0-0' maintainers: --- name: vsliouniaev --- name: bismarck +-- email: andrew@quadcorps.co.uk +- name: andrewgkew +-- email: cedric@desaintmartin.fr +- name: desaintmartin -- email: gianrubio@gmail.com - name: gianrubio -- email: github.gkarthiks@gmail.com - name: gkarthiks +-- email: kube-prometheus-stack@sisti.pt +- name: GMartinez-Sisti -- email: scott@r6by.com - name: scottrigby -- email: miroslav.hadzhiev@gmail.com - name: Xtigyro - email: arvind.iyengar@suse.com name: Arvind --- email: jiaqi.luo@suse.com -- name: Jack -- url: https://github.com/jiaqiluo + - email: amangeet.samra@suse.com + name: Geet + url: https://github.com/geethub97 -name: rancher-monitoring -sources: -- https://github.com/prometheus-community/helm-charts -- https://github.com/prometheus-operator/kube-prometheus -+- email: amangeet.samra@suse.com -+ name: Geet -+ url: https://github.com/geethub97 +name: rancher-project-monitoring type: application --version: 100.1.2+up19.0.3 +-version: 100.2.0+up40.1.2 +version: 0.1.0 diff --git a/packages/rancher-project-monitoring/generated-changes/patch/files/rancher/pods/rancher-pod-containers.json.patch b/packages/rancher-project-monitoring/generated-changes/patch/files/rancher/pods/rancher-pod-containers.json.patch deleted file mode 100644 index 5c01d180..00000000 --- a/packages/rancher-project-monitoring/generated-changes/patch/files/rancher/pods/rancher-pod-containers.json.patch +++ /dev/null @@ -1,130 +0,0 @@ ---- charts-original/files/rancher/pods/rancher-pod-containers.json -+++ charts/files/rancher/pods/rancher-pod-containers.json -@@ -26,7 +26,7 @@ - "bars": false, - "dashLength": 10, - "dashes": false, -- "datasource": null, -+ "datasource": "$datasource", - "fieldConfig": { - "defaults": { - "custom": {} -@@ -139,7 +139,7 @@ - "bars": false, - "dashLength": 10, - "dashes": false, -- "datasource": null, -+ "datasource": "$datasource", - "fieldConfig": { - "defaults": { - "custom": {} -@@ -234,7 +234,7 @@ - "bars": false, - "dashLength": 10, - "dashes": false, -- "datasource": null, -+ "datasource": "$datasource", - "fieldConfig": { - "defaults": { - "custom": {} -@@ -274,37 +274,37 @@ - "steppedLine": false, - "targets": [ - { -- "expr": "sum(rate(container_network_receive_packets_total{namespace=~\"$namespace\",pod=~\"$pod\",container!=\"\"}[$__rate_interval])) by (container) OR sum(rate(windows_container_network_receive_packets_total{namespace=~\"$namespace\",pod=~\"$pod\",container!=\"\"}[$__rate_interval])) by (container)", -+ "expr": "sum(irate(container_network_receive_packets_total{namespace=~\"$namespace\",pod=~\"$pod\"}[$__rate_interval])) by (container) OR sum(irate(windows_container_network_receive_packets_total{namespace=~\"$namespace\",pod=~\"$pod\"}[$__rate_interval])) by (container)", - "interval": "", - "legendFormat": "Receive Total ({{container}})", - "refId": "A" - }, - { -- "expr": "sum(rate(container_network_transmit_packets_total{namespace=~\"$namespace\",pod=~\"$pod\",container!=\"\"}[$__rate_interval])) by (container) OR sum(rate(windows_container_network_transmit_packets_total{namespace=~\"$namespace\",pod=~\"$pod\",container!=\"\"}[$__rate_interval])) by (container)", -+ "expr": "sum(irate(container_network_transmit_packets_total{namespace=~\"$namespace\",pod=~\"$pod\"}[$__rate_interval])) by (container) OR sum(irate(windows_container_network_transmit_packets_total{namespace=~\"$namespace\",pod=~\"$pod\"}[$__rate_interval])) by (container)", - "interval": "", - "legendFormat": "Transmit Total ({{container}})", - "refId": "B" - }, - { -- "expr": "sum(rate(container_network_receive_packets_dropped_total{namespace=~\"$namespace\",pod=~\"$pod\",container!=\"\"}[$__rate_interval])) by (container) OR sum(rate(windows_container_network_receive_packets_dropped_total{namespace=~\"$namespace\",pod=~\"$pod\",container!=\"\"}[$__rate_interval])) by (container)", -+ "expr": "sum(irate(container_network_receive_packets_dropped_total{namespace=~\"$namespace\",pod=~\"$pod\"}[$__rate_interval])) by (container) OR sum(irate(windows_container_network_receive_packets_dropped_total{namespace=~\"$namespace\",pod=~\"$pod\"}[$__rate_interval])) by (container)", - "interval": "", - "legendFormat": "Receive Dropped ({{container}})", - "refId": "C" - }, - { -- "expr": "sum(rate(container_network_receive_errors_total{namespace=~\"$namespace\",pod=~\"$pod\",container!=\"\"}[$__rate_interval])) by (container)", -+ "expr": "sum(irate(container_network_receive_errors_total{namespace=~\"$namespace\",pod=~\"$pod\"}[$__rate_interval])) by (container)", - "interval": "", - "legendFormat": "Receive Errors ({{container}})", - "refId": "D" - }, - { -- "expr": "sum(rate(container_network_transmit_errors_total{namespace=~\"$namespace\",pod=~\"$pod\",container!=\"\"}[$__rate_interval])) by (container)", -+ "expr": "sum(irate(container_network_transmit_errors_total{namespace=~\"$namespace\",pod=~\"$pod\"}[$__rate_interval])) by (container)", - "interval": "", - "legendFormat": "Transmit Errors ({{container}})", - "refId": "E" - }, - { -- "expr": "sum(rate(container_network_transmit_packets_dropped_total{namespace=~\"$namespace\",pod=~\"$pod\",container!=\"\"}[$__rate_interval])) by (container) OR sum(rate(windows_container_network_transmit_packets_dropped_total{namespace=~\"$namespace\",pod=~\"$pod\",container!=\"\"}[$__rate_interval])) by (container)", -+ "expr": "sum(irate(container_network_transmit_packets_dropped_total{namespace=~\"$namespace\",pod=~\"$pod\"}[$__rate_interval])) by (container) OR sum(irate(windows_container_network_transmit_packets_dropped_total{namespace=~\"$namespace\",pod=~\"$pod\"}[$__rate_interval])) by (container)", - "interval": "", - "legendFormat": "Transmit Dropped ({{container}})", - "refId": "F" -@@ -359,7 +359,7 @@ - "bars": false, - "dashLength": 10, - "dashes": false, -- "datasource": null, -+ "datasource": "$datasource", - "fieldConfig": { - "defaults": { - "custom": {} -@@ -399,13 +399,13 @@ - "steppedLine": false, - "targets": [ - { -- "expr": "sum(rate(container_network_receive_bytes_total{namespace=~\"$namespace\",pod=~\"$pod\",container!=\"\"}[$__rate_interval])) by (container) OR sum(rate(windows_container_network_receive_bytes_total{namespace=~\"$namespace\",pod=~\"$pod\",container!=\"\"}[$__rate_interval])) by (container)", -+ "expr": "sum(irate(container_network_receive_bytes_total{namespace=~\"$namespace\",pod=~\"$pod\"}[$__rate_interval])) by (container) OR sum(irate(windows_container_network_receive_bytes_total{namespace=~\"$namespace\",pod=~\"$pod\"}[$__rate_interval])) by (container)", - "interval": "", - "legendFormat": "Receive Total ({{container}})", - "refId": "A" - }, - { -- "expr": "sum(rate(container_network_transmit_bytes_total{namespace=~\"$namespace\",pod=~\"$pod\",container!=\"\"}[$__rate_interval])) by (container) OR sum(rate(windows_container_network_transmit_bytes_total{namespace=~\"$namespace\",pod=~\"$pod\",container!=\"\"}[$__rate_interval])) by (container)", -+ "expr": "sum(irate(container_network_transmit_bytes_total{namespace=~\"$namespace\",pod=~\"$pod\"}[$__rate_interval])) by (container) OR sum(irate(windows_container_network_transmit_bytes_total{namespace=~\"$namespace\",pod=~\"$pod\"}[$__rate_interval])) by (container)", - "interval": "", - "legendFormat": "Transmit Total ({{container}})", - "refId": "B" -@@ -460,7 +460,7 @@ - "bars": false, - "dashLength": 10, - "dashes": false, -- "datasource": null, -+ "datasource": "$datasource", - "fieldConfig": { - "defaults": { - "custom": {} -@@ -561,6 +561,22 @@ - "tags": [], - "templating": { - "list": [ -+ { -+ "current": { -+ "text": "Prometheus", -+ "value": "Prometheus" -+ }, -+ "hide": 0, -+ "label": "Data Source", -+ "name": "datasource", -+ "options": [ -+ -+ ], -+ "query": "prometheus", -+ "refresh": 1, -+ "regex": "", -+ "type": "datasource" -+ }, - { - "allValue": null, - "hide": 0, diff --git a/packages/rancher-project-monitoring/generated-changes/patch/files/rancher/pods/rancher-pod.json.patch b/packages/rancher-project-monitoring/generated-changes/patch/files/rancher/pods/rancher-pod.json.patch deleted file mode 100644 index ce88ea02..00000000 --- a/packages/rancher-project-monitoring/generated-changes/patch/files/rancher/pods/rancher-pod.json.patch +++ /dev/null @@ -1,130 +0,0 @@ ---- charts-original/files/rancher/pods/rancher-pod.json -+++ charts/files/rancher/pods/rancher-pod.json -@@ -26,7 +26,7 @@ - "bars": false, - "dashLength": 10, - "dashes": false, -- "datasource": null, -+ "datasource": "$datasource", - "fieldConfig": { - "defaults": { - "custom": {} -@@ -139,7 +139,7 @@ - "bars": false, - "dashLength": 10, - "dashes": false, -- "datasource": null, -+ "datasource": "$datasource", - "fieldConfig": { - "defaults": { - "custom": {} -@@ -234,7 +234,7 @@ - "bars": false, - "dashLength": 10, - "dashes": false, -- "datasource": null, -+ "datasource": "$datasource", - "fieldConfig": { - "defaults": { - "custom": {} -@@ -274,37 +274,37 @@ - "steppedLine": false, - "targets": [ - { -- "expr": "sum(rate(container_network_receive_packets_total{namespace=~\"$namespace\",pod=~\"$pod\",container!=\"\"}[$__rate_interval])) OR sum(rate(windows_container_network_receive_packets_total{namespace=~\"$namespace\",pod=~\"$pod\",container!=\"\"}[$__rate_interval]))", -+ "expr": "sum(irate(container_network_receive_packets_total{namespace=~\"$namespace\",pod=~\"$pod\"}[$__rate_interval])) OR sum(irate(windows_container_network_receive_packets_total{namespace=~\"$namespace\",pod=~\"$pod\"}[$__rate_interval]))", - "interval": "", - "legendFormat": "Receive Total", - "refId": "A" - }, - { -- "expr": "sum(rate(container_network_transmit_packets_total{namespace=~\"$namespace\",pod=~\"$pod\",container!=\"\"}[$__rate_interval])) OR sum(rate(windows_container_network_transmit_packets_total{namespace=~\"$namespace\",pod=~\"$pod\",container!=\"\"}[$__rate_interval]))", -+ "expr": "sum(irate(container_network_transmit_packets_total{namespace=~\"$namespace\",pod=~\"$pod\"}[$__rate_interval])) OR sum(irate(windows_container_network_transmit_packets_total{namespace=~\"$namespace\",pod=~\"$pod\"}[$__rate_interval]))", - "interval": "", - "legendFormat": "Transmit Total", - "refId": "B" - }, - { -- "expr": "sum(rate(container_network_receive_packets_dropped_total{namespace=~\"$namespace\",pod=~\"$pod\",container!=\"\"}[$__rate_interval])) OR sum(rate(windows_container_network_receive_packets_dropped_total{namespace=~\"$namespace\",pod=~\"$pod\",container!=\"\"}[$__rate_interval]))", -+ "expr": "sum(irate(container_network_receive_packets_dropped_total{namespace=~\"$namespace\",pod=~\"$pod\"}[$__rate_interval])) OR sum(irate(windows_container_network_receive_packets_dropped_total{namespace=~\"$namespace\",pod=~\"$pod\"}[$__rate_interval]))", - "interval": "", - "legendFormat": "Receive Dropped", - "refId": "C" - }, - { -- "expr": "sum(rate(container_network_receive_errors_total{namespace=~\"$namespace\",pod=~\"$pod\",container!=\"\"}[$__rate_interval]))", -+ "expr": "sum(irate(container_network_receive_errors_total{namespace=~\"$namespace\",pod=~\"$pod\"}[$__rate_interval]))", - "interval": "", - "legendFormat": "Receive Errors", - "refId": "D" - }, - { -- "expr": "sum(rate(container_network_transmit_errors_total{namespace=~\"$namespace\",pod=~\"$pod\",container!=\"\"}[$__rate_interval]))", -+ "expr": "sum(irate(container_network_transmit_errors_total{namespace=~\"$namespace\",pod=~\"$pod\"}[$__rate_interval]))", - "interval": "", - "legendFormat": "Transmit Errors", - "refId": "E" - }, - { -- "expr": "sum(rate(container_network_transmit_packets_dropped_total{namespace=~\"$namespace\",pod=~\"$pod\",container!=\"\"}[$__rate_interval])) OR sum(rate(windows_container_network_transmit_packets_dropped_total{namespace=~\"$namespace\",pod=~\"$pod\",container!=\"\"}[$__rate_interval]))", -+ "expr": "sum(irate(container_network_transmit_packets_dropped_total{namespace=~\"$namespace\",pod=~\"$pod\"}[$__rate_interval])) OR sum(irate(windows_container_network_transmit_packets_dropped_total{namespace=~\"$namespace\",pod=~\"$pod\"}[$__rate_interval]))", - "interval": "", - "legendFormat": "Transmit Dropped", - "refId": "F" -@@ -359,7 +359,7 @@ - "bars": false, - "dashLength": 10, - "dashes": false, -- "datasource": null, -+ "datasource": "$datasource", - "fieldConfig": { - "defaults": { - "custom": {} -@@ -399,13 +399,13 @@ - "steppedLine": false, - "targets": [ - { -- "expr": "sum(rate(container_network_receive_bytes_total{namespace=~\"$namespace\",pod=~\"$pod\",container!=\"\"}[$__rate_interval])) OR sum(rate(windows_container_network_receive_bytes_total{namespace=~\"$namespace\",pod=~\"$pod\",container!=\"\"}[$__rate_interval]))", -+ "expr": "sum(irate(container_network_receive_bytes_total{namespace=~\"$namespace\",pod=~\"$pod\"}[$__rate_interval])) OR sum(irate(windows_container_network_receive_bytes_total{namespace=~\"$namespace\",pod=~\"$pod\"}[$__rate_interval]))", - "interval": "", - "legendFormat": "Receive Total", - "refId": "A" - }, - { -- "expr": "sum(rate(container_network_transmit_bytes_total{namespace=~\"$namespace\",pod=~\"$pod\",container!=\"\"}[$__rate_interval])) OR sum(rate(windows_container_network_transmit_bytes_total{namespace=~\"$namespace\",pod=~\"$pod\",container!=\"\"}[$__rate_interval]))", -+ "expr": "sum(irate(container_network_transmit_bytes_total{namespace=~\"$namespace\",pod=~\"$pod\"}[$__rate_interval])) OR sum(irate(windows_container_network_transmit_bytes_total{namespace=~\"$namespace\",pod=~\"$pod\"}[$__rate_interval]))", - "interval": "", - "legendFormat": "Transmit Total", - "refId": "B" -@@ -460,7 +460,7 @@ - "bars": false, - "dashLength": 10, - "dashes": false, -- "datasource": null, -+ "datasource": "$datasource", - "fieldConfig": { - "defaults": { - "custom": {} -@@ -561,6 +561,22 @@ - "tags": [], - "templating": { - "list": [ -+ { -+ "current": { -+ "text": "Prometheus", -+ "value": "Prometheus" -+ }, -+ "hide": 0, -+ "label": "Data Source", -+ "name": "datasource", -+ "options": [ -+ -+ ], -+ "query": "prometheus", -+ "refresh": 1, -+ "regex": "", -+ "type": "datasource" -+ }, - { - "allValue": null, - "hide": 0, diff --git a/packages/rancher-project-monitoring/generated-changes/patch/files/rancher/workloads/rancher-workload-pods.json.patch b/packages/rancher-project-monitoring/generated-changes/patch/files/rancher/workloads/rancher-workload-pods.json.patch deleted file mode 100644 index 7d3651d3..00000000 --- a/packages/rancher-project-monitoring/generated-changes/patch/files/rancher/workloads/rancher-workload-pods.json.patch +++ /dev/null @@ -1,130 +0,0 @@ ---- charts-original/files/rancher/workloads/rancher-workload-pods.json -+++ charts/files/rancher/workloads/rancher-workload-pods.json -@@ -26,7 +26,7 @@ - "bars": false, - "dashLength": 10, - "dashes": false, -- "datasource": null, -+ "datasource": "$datasource", - "fieldConfig": { - "defaults": { - "custom": {} -@@ -139,7 +139,7 @@ - "bars": false, - "dashLength": 10, - "dashes": false, -- "datasource": null, -+ "datasource": "$datasource", - "fieldConfig": { - "defaults": { - "custom": {} -@@ -234,7 +234,7 @@ - "bars": false, - "dashLength": 10, - "dashes": false, -- "datasource": null, -+ "datasource": "$datasource", - "fieldConfig": { - "defaults": { - "custom": {} -@@ -274,37 +274,37 @@ - "steppedLine": false, - "targets": [ - { -- "expr": "(sum(rate(container_network_receive_packets_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod) OR sum(rate(windows_container_network_receive_packets_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)) * on(pod) kube_pod_info{namespace=~\"$namespace\", created_by_kind=\"$kind\", created_by_name=\"$workload\"}", -+ "expr": "(sum(irate(container_network_receive_packets_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod) OR sum(irate(windows_container_network_receive_packets_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)) * on(pod) kube_pod_info{namespace=~\"$namespace\", created_by_kind=\"$kind\", created_by_name=\"$workload\"}", - "interval": "", - "legendFormat": "Receive Total ({{pod}})", - "refId": "A" - }, - { -- "expr": "(sum(rate(container_network_transmit_packets_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod) OR sum(rate(windows_container_network_transmit_packets_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)) * on(pod) kube_pod_info{namespace=~\"$namespace\", created_by_kind=\"$kind\", created_by_name=\"$workload\"}", -+ "expr": "(sum(irate(container_network_transmit_packets_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod) OR sum(irate(windows_container_network_transmit_packets_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)) * on(pod) kube_pod_info{namespace=~\"$namespace\", created_by_kind=\"$kind\", created_by_name=\"$workload\"}", - "interval": "", - "legendFormat": "Transmit Total ({{pod}})", - "refId": "B" - }, - { -- "expr": "(sum(rate(container_network_receive_packets_dropped_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod) OR sum(rate(windows_container_network_receive_packets_dropped_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)) * on(pod) kube_pod_info{namespace=~\"$namespace\", created_by_kind=\"$kind\", created_by_name=\"$workload\"}", -+ "expr": "(sum(irate(container_network_receive_packets_dropped_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod) OR sum(irate(windows_container_network_receive_packets_dropped_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)) * on(pod) kube_pod_info{namespace=~\"$namespace\", created_by_kind=\"$kind\", created_by_name=\"$workload\"}", - "interval": "", - "legendFormat": "Receive Dropped ({{pod}})", - "refId": "C" - }, - { -- "expr": "(sum(rate(container_network_receive_errors_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)) * on(pod) kube_pod_info{namespace=~\"$namespace\", created_by_kind=\"$kind\", created_by_name=\"$workload\"}", -+ "expr": "(sum(irate(container_network_receive_errors_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)) * on(pod) kube_pod_info{namespace=~\"$namespace\", created_by_kind=\"$kind\", created_by_name=\"$workload\"}", - "interval": "", - "legendFormat": "Receive Errors ({{pod}})", - "refId": "D" - }, - { -- "expr": "(sum(rate(container_network_transmit_errors_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)) * on(pod) kube_pod_info{namespace=~\"$namespace\", created_by_kind=\"$kind\", created_by_name=\"$workload\"}", -+ "expr": "(sum(irate(container_network_transmit_errors_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)) * on(pod) kube_pod_info{namespace=~\"$namespace\", created_by_kind=\"$kind\", created_by_name=\"$workload\"}", - "interval": "", - "legendFormat": "Transmit Errors ({{pod}})", - "refId": "E" - }, - { -- "expr": "(sum(rate(container_network_transmit_packets_dropped_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod) OR sum(rate(windows_container_network_transmit_packets_dropped_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)) * on(pod) kube_pod_info{namespace=~\"$namespace\", created_by_kind=\"$kind\", created_by_name=\"$workload\"}", -+ "expr": "(sum(irate(container_network_transmit_packets_dropped_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod) OR sum(irate(windows_container_network_transmit_packets_dropped_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)) * on(pod) kube_pod_info{namespace=~\"$namespace\", created_by_kind=\"$kind\", created_by_name=\"$workload\"}", - "interval": "", - "legendFormat": "Transmit Dropped ({{pod}})", - "refId": "F" -@@ -359,7 +359,7 @@ - "bars": false, - "dashLength": 10, - "dashes": false, -- "datasource": null, -+ "datasource": "$datasource", - "fieldConfig": { - "defaults": { - "custom": {} -@@ -399,13 +399,13 @@ - "steppedLine": false, - "targets": [ - { -- "expr": "(sum(rate(container_network_receive_bytes_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod) OR sum(rate(windows_container_network_receive_bytes_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)) * on(pod) kube_pod_info{namespace=~\"$namespace\", created_by_kind=\"$kind\", created_by_name=\"$workload\"}", -+ "expr": "(sum(irate(container_network_receive_bytes_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod) OR sum(irate(windows_container_network_receive_bytes_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)) * on(pod) kube_pod_info{namespace=~\"$namespace\", created_by_kind=\"$kind\", created_by_name=\"$workload\"}", - "interval": "", - "legendFormat": "Receive Total ({{pod}})", - "refId": "A" - }, - { -- "expr": "(sum(rate(container_network_transmit_bytes_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod) OR sum(rate(windows_container_network_transmit_bytes_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)) * on(pod) kube_pod_info{namespace=~\"$namespace\", created_by_kind=\"$kind\", created_by_name=\"$workload\"}", -+ "expr": "(sum(irate(container_network_transmit_bytes_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod) OR sum(irate(windows_container_network_transmit_bytes_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)) * on(pod) kube_pod_info{namespace=~\"$namespace\", created_by_kind=\"$kind\", created_by_name=\"$workload\"}", - "interval": "", - "legendFormat": "Transmit Total ({{pod}})", - "refId": "B" -@@ -460,7 +460,7 @@ - "bars": false, - "dashLength": 10, - "dashes": false, -- "datasource": null, -+ "datasource": "$datasource", - "fieldConfig": { - "defaults": { - "custom": {} -@@ -561,6 +561,22 @@ - "tags": [], - "templating": { - "list": [ -+ { -+ "current": { -+ "text": "Prometheus", -+ "value": "Prometheus" -+ }, -+ "hide": 0, -+ "label": "Data Source", -+ "name": "datasource", -+ "options": [ -+ -+ ], -+ "query": "prometheus", -+ "refresh": 1, -+ "regex": "", -+ "type": "datasource" -+ }, - { - "allValue": null, - "hide": 0, diff --git a/packages/rancher-project-monitoring/generated-changes/patch/files/rancher/workloads/rancher-workload.json.patch b/packages/rancher-project-monitoring/generated-changes/patch/files/rancher/workloads/rancher-workload.json.patch deleted file mode 100644 index 72de6341..00000000 --- a/packages/rancher-project-monitoring/generated-changes/patch/files/rancher/workloads/rancher-workload.json.patch +++ /dev/null @@ -1,130 +0,0 @@ ---- charts-original/files/rancher/workloads/rancher-workload.json -+++ charts/files/rancher/workloads/rancher-workload.json -@@ -26,7 +26,7 @@ - "bars": false, - "dashLength": 10, - "dashes": false, -- "datasource": null, -+ "datasource": "$datasource", - "fieldConfig": { - "defaults": { - "custom": {} -@@ -139,7 +139,7 @@ - "bars": false, - "dashLength": 10, - "dashes": false, -- "datasource": null, -+ "datasource": "$datasource", - "fieldConfig": { - "defaults": { - "custom": {} -@@ -234,7 +234,7 @@ - "bars": false, - "dashLength": 10, - "dashes": false, -- "datasource": null, -+ "datasource": "$datasource", - "fieldConfig": { - "defaults": { - "custom": {} -@@ -274,37 +274,37 @@ - "steppedLine": false, - "targets": [ - { -- "expr": "sum((sum(rate(container_network_receive_packets_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod) OR sum(rate(windows_container_network_receive_packets_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)) * on(pod) kube_pod_info{namespace=~\"$namespace\", created_by_kind=\"$kind\", created_by_name=\"$workload\"})", -+ "expr": "sum((sum(irate(container_network_receive_packets_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod) OR sum(irate(windows_container_network_receive_packets_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)) * on(pod) kube_pod_info{namespace=~\"$namespace\", created_by_kind=\"$kind\", created_by_name=\"$workload\"})", - "interval": "", - "legendFormat": "Receive Total", - "refId": "A" - }, - { -- "expr": "sum((sum(rate(container_network_transmit_packets_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod) OR sum(rate(windows_container_network_transmit_packets_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)) * on(pod) kube_pod_info{namespace=~\"$namespace\", created_by_kind=\"$kind\", created_by_name=\"$workload\"})", -+ "expr": "sum((sum(irate(container_network_transmit_packets_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod) OR sum(irate(windows_container_network_transmit_packets_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)) * on(pod) kube_pod_info{namespace=~\"$namespace\", created_by_kind=\"$kind\", created_by_name=\"$workload\"})", - "interval": "", - "legendFormat": "Transmit Total", - "refId": "B" - }, - { -- "expr": "sum((sum(rate(container_network_receive_packets_dropped_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod) OR sum(rate(windows_container_network_receive_packets_dropped_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)) * on(pod) kube_pod_info{namespace=~\"$namespace\", created_by_kind=\"$kind\", created_by_name=\"$workload\"})", -+ "expr": "sum((sum(irate(container_network_receive_packets_dropped_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod) OR sum(irate(windows_container_network_receive_packets_dropped_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)) * on(pod) kube_pod_info{namespace=~\"$namespace\", created_by_kind=\"$kind\", created_by_name=\"$workload\"})", - "interval": "", - "legendFormat": "Receive Dropped", - "refId": "C" - }, - { -- "expr": "sum((sum(rate(container_network_receive_errors_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)) * on(pod) kube_pod_info{namespace=~\"$namespace\", created_by_kind=\"$kind\", created_by_name=\"$workload\"})", -+ "expr": "sum((sum(irate(container_network_receive_errors_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)) * on(pod) kube_pod_info{namespace=~\"$namespace\", created_by_kind=\"$kind\", created_by_name=\"$workload\"})", - "interval": "", - "legendFormat": "Receive Errors", - "refId": "D" - }, - { -- "expr": "sum((sum(rate(container_network_transmit_errors_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)) * on(pod) kube_pod_info{namespace=~\"$namespace\", created_by_kind=\"$kind\", created_by_name=\"$workload\"})", -+ "expr": "sum((sum(irate(container_network_transmit_errors_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)) * on(pod) kube_pod_info{namespace=~\"$namespace\", created_by_kind=\"$kind\", created_by_name=\"$workload\"})", - "interval": "", - "legendFormat": "Transmit Errors", - "refId": "E" - }, - { -- "expr": "sum((sum(rate(container_network_transmit_packets_dropped_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod) OR sum(rate(windows_container_network_transmit_packets_dropped_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)) * on(pod) kube_pod_info{namespace=~\"$namespace\", created_by_kind=\"$kind\", created_by_name=\"$workload\"})", -+ "expr": "sum((sum(irate(container_network_transmit_packets_dropped_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod) OR sum(irate(windows_container_network_transmit_packets_dropped_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)) * on(pod) kube_pod_info{namespace=~\"$namespace\", created_by_kind=\"$kind\", created_by_name=\"$workload\"})", - "interval": "", - "legendFormat": "Transmit Dropped", - "refId": "F" -@@ -359,7 +359,7 @@ - "bars": false, - "dashLength": 10, - "dashes": false, -- "datasource": null, -+ "datasource": "$datasource", - "fieldConfig": { - "defaults": { - "custom": {} -@@ -399,13 +399,13 @@ - "steppedLine": false, - "targets": [ - { -- "expr": "sum((sum(rate(container_network_receive_bytes_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod) OR sum(rate(windows_container_network_receive_bytes_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)) * on(pod) kube_pod_info{namespace=~\"$namespace\", created_by_kind=\"$kind\", created_by_name=\"$workload\"})", -+ "expr": "sum((sum(irate(container_network_receive_bytes_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod) OR sum(irate(windows_container_network_receive_bytes_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)) * on(pod) kube_pod_info{namespace=~\"$namespace\", created_by_kind=\"$kind\", created_by_name=\"$workload\"})", - "interval": "", - "legendFormat": "Receive Total", - "refId": "A" - }, - { -- "expr": "sum((sum(rate(container_network_transmit_bytes_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod) OR sum(rate(windows_container_network_transmit_bytes_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)) * on(pod) kube_pod_info{namespace=~\"$namespace\", created_by_kind=\"$kind\", created_by_name=\"$workload\"})", -+ "expr": "sum((sum(irate(container_network_transmit_bytes_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod) OR sum(irate(windows_container_network_transmit_bytes_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)) * on(pod) kube_pod_info{namespace=~\"$namespace\", created_by_kind=\"$kind\", created_by_name=\"$workload\"})", - "interval": "", - "legendFormat": "Transmit Total", - "refId": "B" -@@ -460,7 +460,7 @@ - "bars": false, - "dashLength": 10, - "dashes": false, -- "datasource": null, -+ "datasource": "$datasource", - "fieldConfig": { - "defaults": { - "custom": {} -@@ -561,6 +561,22 @@ - "tags": [], - "templating": { - "list": [ -+ { -+ "current": { -+ "text": "Prometheus", -+ "value": "Prometheus" -+ }, -+ "hide": 0, -+ "label": "Data Source", -+ "name": "datasource", -+ "options": [ -+ -+ ], -+ "query": "prometheus", -+ "refresh": 1, -+ "regex": "", -+ "type": "datasource" -+ }, - { - "allValue": null, - "hide": 0, diff --git a/packages/rancher-project-monitoring/generated-changes/patch/templates/_helpers.tpl.patch b/packages/rancher-project-monitoring/generated-changes/patch/templates/_helpers.tpl.patch index c62694c8..a1832073 100644 --- a/packages/rancher-project-monitoring/generated-changes/patch/templates/_helpers.tpl.patch +++ b/packages/rancher-project-monitoring/generated-changes/patch/templates/_helpers.tpl.patch @@ -1,6 +1,6 @@ --- charts-original/templates/_helpers.tpl +++ charts/templates/_helpers.tpl -@@ -21,100 +21,6 @@ +@@ -21,94 +21,6 @@ {{- include $template (dict "Chart" (dict "Name" (last $subchart)) "Values" $values "Release" $dot.Release "Capabilities" $dot.Capabilities) }} {{- end }} @@ -35,12 +35,6 @@ -{{- end -}} -{{- end }} - --{{- define "exporter.kubeletService.enabled" -}} --{{- if or .Values.hardenedKubelet.enabled .Values.prometheusOperator.kubeletService.enabled .Values.k3sServer.enabled -}} --"true" --{{- end -}} --{{- end }} -- -{{- define "exporter.kubeControllerManager.jobName" -}} -{{- if .Values.k3sServer.enabled -}} -k3s-server @@ -101,7 +95,7 @@ # Windows Support {{/* -@@ -141,7 +47,7 @@ +@@ -135,7 +47,7 @@ {{/* vim: set filetype=mustache: */}} {{/* Expand the name of the chart. This is suffixed with -alertmanager, which means subtract 13 from longest 63 available */}} @@ -110,7 +104,7 @@ {{- default .Chart.Name .Values.nameOverride | trunc 50 | trimSuffix "-" -}} {{- end }} -@@ -152,7 +58,7 @@ +@@ -146,7 +58,7 @@ The components in this chart create additional resources that expand the longest created name strings. The longest name that gets created adds and extra 37 characters, so truncation should be 63-35=26. */}} @@ -119,7 +113,7 @@ {{- if .Values.fullnameOverride -}} {{- .Values.fullnameOverride | trunc 26 | trimSuffix "-" -}} {{- else -}} -@@ -166,32 +72,40 @@ +@@ -160,45 +72,40 @@ {{- end -}} {{/* Fullname suffixed with operator */}} @@ -129,30 +123,35 @@ +{{- printf "%s-operator" (include "project-prometheus-stack.fullname" .) -}} {{- end }} --{{/* Fullname suffixed with prometheus */}} --{{- define "kube-prometheus-stack.prometheus.fullname" -}} --{{- printf "%s-prometheus" (include "kube-prometheus-stack.fullname" .) -}} -+{{/* Prometheus custom resource instance name */}} + {{/* Prometheus custom resource instance name */}} +-{{- define "kube-prometheus-stack.prometheus.crname" -}} +{{- define "project-prometheus-stack.prometheus.crname" -}} -+{{- if .Values.cleanPrometheusOperatorObjectNames }} + {{- if .Values.cleanPrometheusOperatorObjectNames }} +-{{- include "kube-prometheus-stack.fullname" . }} +{{- include "project-prometheus-stack.fullname" . }} -+{{- else }} + {{- else }} +-{{- print (include "kube-prometheus-stack.fullname" .) "-prometheus" }} +{{- print (include "project-prometheus-stack.fullname" .) "-prometheus" }} {{- end }} -+{{- end }} + {{- end }} --{{/* Fullname suffixed with alertmanager */}} --{{- define "kube-prometheus-stack.alertmanager.fullname" -}} --{{- printf "%s-alertmanager" (include "kube-prometheus-stack.fullname" .) -}} -+{{/* Alertmanager custom resource instance name */}} + {{/* Alertmanager custom resource instance name */}} +-{{- define "kube-prometheus-stack.alertmanager.crname" -}} +{{- define "project-prometheus-stack.alertmanager.crname" -}} -+{{- if .Values.cleanPrometheusOperatorObjectNames }} + {{- if .Values.cleanPrometheusOperatorObjectNames }} +-{{- include "kube-prometheus-stack.fullname" . }} +{{- include "project-prometheus-stack.fullname" . }} -+{{- else }} + {{- else }} +-{{- print (include "kube-prometheus-stack.fullname" .) "-alertmanager" -}} +{{- print (include "project-prometheus-stack.fullname" .) "-alertmanager" -}} {{- end }} -+{{- end }} + {{- end }} +-{{/* Fullname suffixed with thanos-ruler */}} +-{{- define "kube-prometheus-stack.thanosRuler.fullname" -}} +-{{- printf "%s-thanos-ruler" (include "kube-prometheus-stack.fullname" .) -}} +-{{- end }} +- {{/* Create chart name and version as used by the chart label. */}} -{{- define "kube-prometheus-stack.chartref" -}} +{{- define "project-prometheus-stack.chartref" -}} @@ -172,7 +171,7 @@ release: {{ $.Release.Name | quote }} heritage: {{ $.Release.Service | quote }} {{- if .Values.commonLabels}} -@@ -199,28 +113,19 @@ +@@ -206,46 +113,28 @@ {{- end }} {{- end }} @@ -189,7 +188,7 @@ -{{- define "kube-prometheus-stack.prometheus.serviceAccountName" -}} +{{- define "project-prometheus-stack.prometheus.serviceAccountName" -}} {{- if .Values.prometheus.serviceAccount.create -}} -- {{ default (include "kube-prometheus-stack.prometheus.fullname" .) .Values.prometheus.serviceAccount.name }} +- {{ default (print (include "kube-prometheus-stack.fullname" .) "-prometheus") .Values.prometheus.serviceAccount.name }} + {{ default (print (include "project-prometheus-stack.fullname" .) "-prometheus") .Values.prometheus.serviceAccount.name }} {{- else -}} {{ default "default" .Values.prometheus.serviceAccount.name }} @@ -200,12 +199,22 @@ -{{- define "kube-prometheus-stack.alertmanager.serviceAccountName" -}} +{{- define "project-prometheus-stack.alertmanager.serviceAccountName" -}} {{- if .Values.alertmanager.serviceAccount.create -}} -- {{ default (include "kube-prometheus-stack.alertmanager.fullname" .) .Values.alertmanager.serviceAccount.name }} +- {{ default (print (include "kube-prometheus-stack.fullname" .) "-alertmanager") .Values.alertmanager.serviceAccount.name }} + {{ default (print (include "project-prometheus-stack.fullname" .) "-alertmanager") .Values.alertmanager.serviceAccount.name }} {{- else -}} {{ default "default" .Values.alertmanager.serviceAccount.name }} {{- end -}} -@@ -229,7 +134,7 @@ + {{- end -}} + +-{{/* Create the name of thanosRuler service account to use */}} +-{{- define "kube-prometheus-stack.thanosRuler.serviceAccountName" -}} +-{{- if .Values.thanosRuler.serviceAccount.create -}} +- {{ default (include "kube-prometheus-stack.thanosRuler.fullname" .) .Values.thanosRuler.serviceAccount.name }} +-{{- else -}} +- {{ default "default" .Values.thanosRuler.serviceAccount.name }} +-{{- end -}} +-{{- end -}} +- {{/* Allow the release namespace to be overridden for multi-namespace deployments in combined charts */}} @@ -214,7 +223,7 @@ {{- if .Values.namespaceOverride -}} {{- .Values.namespaceOverride -}} {{- else -}} -@@ -240,7 +145,7 @@ +@@ -256,7 +145,7 @@ {{/* Use the grafana namespace override for multi-namespace deployments in combined charts */}} @@ -223,7 +232,7 @@ {{- if .Values.grafana.namespaceOverride -}} {{- .Values.grafana.namespaceOverride -}} {{- else -}} -@@ -248,36 +153,14 @@ +@@ -264,36 +153,14 @@ {{- end -}} {{- end -}} @@ -263,7 +272,7 @@ {{- print "networking.k8s.io/v1" -}} {{- else if .Capabilities.APIVersions.Has "networking.k8s.io/v1beta1" -}} {{- print "networking.k8s.io/v1beta1" -}} -@@ -287,21 +170,82 @@ +@@ -303,19 +170,19 @@ {{- end -}} {{/* Check Ingress stability */}} @@ -289,66 +298,48 @@ {{- print "policy/v1" -}} {{- else -}} {{- print "policy/v1beta1" -}} - {{- end -}} -+ {{- end -}} -+ -+{{/* Get value based on current Kubernetes version */}} -+{{- define "kube-prometheus-stack.kubeVersionDefaultValue" -}} +@@ -324,11 +191,11 @@ + + {{/* Get value based on current Kubernetes version */}} + {{- define "kube-prometheus-stack.kubeVersionDefaultValue" -}} +- {{- $values := index . 0 -}} +- {{- $kubeVersion := index . 1 -}} +- {{- $old := index . 2 -}} +- {{- $new := index . 3 -}} +- {{- $default := index . 4 -}} + {{- $values := index . 0 100644 + {{- $kubeVersion := index . 1 100644 + {{- $old := index . 2 100644 + {{- $new := index . 3 100644 + {{- $default := index . 4 100644 -+ {{- if kindIs "invalid" $default -}} -+ {{- if semverCompare $kubeVersion (include "kube-prometheus-stack.kubeVersion" $values) -}} -+ {{- print $new -}} -+ {{- else -}} -+ {{- print $old -}} -+ {{- end -}} -+ {{- else -}} -+ {{- print $default }} -+ {{- end -}} -+{{- end -}} -+ -+{{/* Get value for kube-controller-manager depending on insecure scraping availability */}} -+{{- define "kube-prometheus-stack.kubeControllerManager.insecureScrape" -}} + {{- if kindIs "invalid" $default -}} + {{- if semverCompare $kubeVersion (include "kube-prometheus-stack.kubeVersion" $values) -}} + {{- print $new -}} +@@ -342,19 +209,19 @@ + + {{/* Get value for kube-controller-manager depending on insecure scraping availability */}} + {{- define "kube-prometheus-stack.kubeControllerManager.insecureScrape" -}} +- {{- $values := index . 0 -}} +- {{- $insecure := index . 1 -}} +- {{- $secure := index . 2 -}} +- {{- $userValue := index . 3 -}} + {{- $values := index . 0 100644 + {{- $insecure := index . 1 100644 + {{- $secure := index . 2 100644 + {{- $userValue := index . 3 100644 -+ {{- include "kube-prometheus-stack.kubeVersionDefaultValue" (list $values ">= 1.22-0" $insecure $secure $userValue) -}} -+{{- end -}} -+ -+{{/* Get value for kube-scheduler depending on insecure scraping availability */}} -+{{- define "kube-prometheus-stack.kubeScheduler.insecureScrape" -}} + {{- include "kube-prometheus-stack.kubeVersionDefaultValue" (list $values ">= 1.22-0" $insecure $secure $userValue) -}} + {{- end -}} + + {{/* Get value for kube-scheduler depending on insecure scraping availability */}} + {{- define "kube-prometheus-stack.kubeScheduler.insecureScrape" -}} +- {{- $values := index . 0 -}} +- {{- $insecure := index . 1 -}} +- {{- $secure := index . 2 -}} +- {{- $userValue := index . 3 -}} + {{- $values := index . 0 100644 + {{- $insecure := index . 1 100644 + {{- $secure := index . 2 100644 + {{- $userValue := index . 3 100644 -+ {{- include "kube-prometheus-stack.kubeVersionDefaultValue" (list $values ">= 1.23-0" $insecure $secure $userValue) -}} -+{{- end -}} -+ -+{{/* -+To help compatibility with other charts which use global.imagePullSecrets. -+Allow either an array of {name: pullSecret} maps (k8s-style), or an array of strings (more common helm-style). -+global: -+ imagePullSecrets: -+ - name: pullSecret1 -+ - name: pullSecret2 -+ -+or -+ -+global: -+ imagePullSecrets: -+ - pullSecret1 -+ - pullSecret2 -+*/}} -+{{- define "kube-prometheus-stack.imagePullSecrets" -}} -+{{- range .Values.global.imagePullSecrets }} -+ {{- if eq (typeOf .) "map[string]interface {}" }} -+- {{ toYaml . | trim }} -+ {{- else }} -+- name: {{ . }} -+ {{- end }} -+{{- end }} + {{- include "kube-prometheus-stack.kubeVersionDefaultValue" (list $values ">= 1.23-0" $insecure $secure $userValue) -}} {{- end -}} + diff --git a/packages/rancher-project-monitoring/generated-changes/patch/templates/alertmanager/alertmanager.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/templates/alertmanager/alertmanager.yaml.patch index 6f8cee57..d7e08a42 100644 --- a/packages/rancher-project-monitoring/generated-changes/patch/templates/alertmanager/alertmanager.yaml.patch +++ b/packages/rancher-project-monitoring/generated-changes/patch/templates/alertmanager/alertmanager.yaml.patch @@ -1,10 +1,10 @@ --- charts-original/templates/alertmanager/alertmanager.yaml +++ charts/templates/alertmanager/alertmanager.yaml -@@ -2,18 +2,26 @@ +@@ -2,11 +2,11 @@ apiVersion: monitoring.coreos.com/v1 kind: Alertmanager metadata: -- name: {{ template "kube-prometheus-stack.fullname" . }}-alertmanager +- name: {{ template "kube-prometheus-stack.alertmanager.crname" . }} - namespace: {{ template "kube-prometheus-stack.namespace" . }} + name: {{ template "project-prometheus-stack.alertmanager.crname" . }} + namespace: {{ template "project-prometheus-stack.namespace" . }} @@ -16,23 +16,7 @@ {{- if .Values.alertmanager.annotations }} annotations: {{ toYaml .Values.alertmanager.annotations | indent 4 }} - {{- end }} - spec: - {{- if .Values.alertmanager.alertmanagerSpec.image }} -- image: {{ template "system_default_registry" . }}{{ .Values.alertmanager.alertmanagerSpec.image.repository }}:{{ .Values.alertmanager.alertmanagerSpec.image.tag }} -+ {{- if and .Values.alertmanager.alertmanagerSpec.image.tag .Values.alertmanager.alertmanagerSpec.image.sha }} -+ image: "{{ template "system_default_registry" . }}{{ .Values.alertmanager.alertmanagerSpec.image.repository }}:{{ .Values.alertmanager.alertmanagerSpec.image.tag }}@sha256:{{ .Values.alertmanager.alertmanagerSpec.image.sha }}" -+ {{- else if .Values.alertmanager.alertmanagerSpec.image.sha }} -+ image: "{{ template "system_default_registry" . }}{{ .Values.alertmanager.alertmanagerSpec.image.repository }}@sha256:{{ .Values.alertmanager.alertmanagerSpec.image.sha }}" -+ {{- else if .Values.alertmanager.alertmanagerSpec.image.tag }} -+ image: "{{ template "system_default_registry" . }}{{ .Values.alertmanager.alertmanagerSpec.image.repository }}:{{ .Values.alertmanager.alertmanagerSpec.image.tag }}" -+ {{- else }} -+ image: "{{ template "system_default_registry" . }}{{ .Values.alertmanager.alertmanagerSpec.image.repository }}" -+ {{- end }} - version: {{ .Values.alertmanager.alertmanagerSpec.image.tag }} - {{- if .Values.alertmanager.alertmanagerSpec.image.sha }} - sha: {{ .Values.alertmanager.alertmanagerSpec.image.sha }} -@@ -21,15 +29,15 @@ +@@ -29,15 +29,15 @@ {{- end }} replicas: {{ .Values.alertmanager.alertmanagerSpec.replicas }} listenLocal: {{ .Values.alertmanager.alertmanagerSpec.listenLocal }} @@ -51,7 +35,7 @@ {{- end }} nodeSelector: {{ include "linux-node-selector" . | nindent 4 }} {{- if .Values.alertmanager.alertmanagerSpec.nodeSelector }} -@@ -56,12 +64,15 @@ +@@ -64,12 +64,7 @@ {{ else }} alertmanagerConfigSelector: {} {{- end }} @@ -60,72 +44,31 @@ -{{ toYaml .Values.alertmanager.alertmanagerSpec.alertmanagerConfigNamespaceSelector | indent 4}} -{{ else }} - alertmanagerConfigNamespaceSelector: {} +-{{- end }} + alertmanagerConfigNamespaceSelector: {{ .Values.global.cattle.projectNamespaceSelector | toYaml | nindent 4 }} -+{{- if .Values.alertmanager.alertmanagerSpec.web }} -+ web: -+{{ toYaml .Values.alertmanager.alertmanagerSpec.web | indent 4 }} - {{- end }} -+{{- if .Values.alertmanager.alertmanagerSpec.alertmanagerConfiguration }} -+ alertmanagerConfiguration: -+{{ toYaml .Values.alertmanager.alertmanagerSpec.alertmanagerConfiguration | indent 4 }} -+{{- end }} - {{- if .Values.alertmanager.alertmanagerSpec.resources }} - resources: - {{ toYaml .Values.alertmanager.alertmanagerSpec.resources | indent 4 }} -@@ -75,7 +86,7 @@ - {{- end }} - {{- if .Values.alertmanager.alertmanagerSpec.storage }} - storage: --{{ toYaml .Values.alertmanager.alertmanagerSpec.storage | indent 4 }} -+{{ tpl (toYaml .Values.alertmanager.alertmanagerSpec.storage | indent 4) . }} - {{- end }} - {{- if .Values.alertmanager.alertmanagerSpec.podMetadata }} - podMetadata: -@@ -83,6 +94,7 @@ - {{- end }} - {{- if or .Values.alertmanager.alertmanagerSpec.podAntiAffinity .Values.alertmanager.alertmanagerSpec.affinity }} - affinity: -+{{- end }} - {{- if .Values.alertmanager.alertmanagerSpec.affinity }} - {{ toYaml .Values.alertmanager.alertmanagerSpec.affinity | indent 4 }} - {{- end }} -@@ -92,8 +104,8 @@ + {{- if .Values.alertmanager.alertmanagerSpec.web }} + web: + {{ toYaml .Values.alertmanager.alertmanagerSpec.web | indent 4 }} +@@ -109,8 +104,8 @@ - topologyKey: {{ .Values.alertmanager.alertmanagerSpec.podAntiAffinityTopologyKey }} labelSelector: matchExpressions: -- - {key: app, operator: In, values: [alertmanager]} -- - {key: alertmanager, operator: In, values: [{{ template "kube-prometheus-stack.fullname" . }}-alertmanager]} +- - {key: app.kubernetes.io/name, operator: In, values: [alertmanager]} +- - {key: alertmanager, operator: In, values: [{{ template "kube-prometheus-stack.alertmanager.crname" . }}]} + - {key: app.kubernetes.io/name, operator: In, values: [alertmanager]} + - {key: alertmanager, operator: In, values: [{{ template "project-prometheus-stack.alertmanager.crname" . }}]} {{- else if eq .Values.alertmanager.alertmanagerSpec.podAntiAffinity "soft" }} podAntiAffinity: preferredDuringSchedulingIgnoredDuringExecution: -@@ -102,8 +114,8 @@ +@@ -119,8 +114,9 @@ topologyKey: {{ .Values.alertmanager.alertmanagerSpec.podAntiAffinityTopologyKey }} labelSelector: matchExpressions: -- - {key: app, operator: In, values: [alertmanager]} -- - {key: alertmanager, operator: In, values: [{{ template "kube-prometheus-stack.fullname" . }}-alertmanager]} +- - {key: app.kubernetes.io/name, operator: In, values: [alertmanager]} +- - {key: alertmanager, operator: In, values: [{{ template "kube-prometheus-stack.alertmanager.crname" . }}]} + - {key: app.kubernetes.io/name, operator: In, values: [alertmanager]} + - {key: alertmanager, operator: In, values: [{{ template "project-prometheus-stack.alertmanager.crname" . }}]} - {{- end }} - {{- end }} - tolerations: {{ include "linux-node-tolerations" . | nindent 4 }} -@@ -116,7 +128,7 @@ - {{- end }} - {{- if .Values.global.imagePullSecrets }} - imagePullSecrets: --{{ toYaml .Values.global.imagePullSecrets | indent 4 }} -+{{ include "kube-prometheus-stack.imagePullSecrets" . | trim | indent 4 }} - {{- end }} - {{- if .Values.alertmanager.alertmanagerSpec.containers }} - containers: -@@ -147,5 +159,8 @@ - {{- end }} - {{- if .Values.alertmanager.alertmanagerSpec.forceEnableClusterMode }} - forceEnableClusterMode: {{ .Values.alertmanager.alertmanagerSpec.forceEnableClusterMode }} +{{- end }} -+{{- if .Values.alertmanager.alertmanagerSpec.minReadySeconds }} -+ minReadySeconds: {{ .Values.alertmanager.alertmanagerSpec.minReadySeconds }} - {{- end }} {{- end }} + tolerations: {{ include "linux-node-tolerations" . | nindent 4 }} + {{- if .Values.alertmanager.alertmanagerSpec.tolerations }} diff --git a/packages/rancher-project-monitoring/generated-changes/patch/templates/alertmanager/ingress.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/templates/alertmanager/ingress.yaml.patch index dc6afdce..7fe5ea08 100644 --- a/packages/rancher-project-monitoring/generated-changes/patch/templates/alertmanager/ingress.yaml.patch +++ b/packages/rancher-project-monitoring/generated-changes/patch/templates/alertmanager/ingress.yaml.patch @@ -4,9 +4,8 @@ {{- if and .Values.alertmanager.enabled .Values.alertmanager.ingress.enabled }} {{- $pathType := .Values.alertmanager.ingress.pathType | default "ImplementationSpecific" }} -{{- $serviceName := printf "%s-%s" (include "kube-prometheus-stack.fullname" .) "alertmanager" }} --{{- $servicePort := .Values.alertmanager.service.port -}} +{{- $serviceName := printf "%s-%s" (include "project-prometheus-stack.fullname" .) "alertmanager" }} -+{{- $servicePort := .Values.alertmanager.ingress.servicePort | default .Values.alertmanager.service.port -}} + {{- $servicePort := .Values.alertmanager.ingress.servicePort | default .Values.alertmanager.service.port -}} {{- $routePrefix := list .Values.alertmanager.alertmanagerSpec.routePrefix }} {{- $paths := .Values.alertmanager.ingress.paths | default $routePrefix -}} -{{- $apiIsStable := eq (include "kube-prometheus-stack.ingress.isStable" .) "true" -}} diff --git a/packages/rancher-project-monitoring/generated-changes/patch/templates/alertmanager/podDisruptionBudget.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/templates/alertmanager/podDisruptionBudget.yaml.patch index 583d3a64..9126d739 100644 --- a/packages/rancher-project-monitoring/generated-changes/patch/templates/alertmanager/podDisruptionBudget.yaml.patch +++ b/packages/rancher-project-monitoring/generated-changes/patch/templates/alertmanager/podDisruptionBudget.yaml.patch @@ -18,12 +18,10 @@ spec: {{- if .Values.alertmanager.podDisruptionBudget.minAvailable }} minAvailable: {{ .Values.alertmanager.podDisruptionBudget.minAvailable }} -@@ -16,6 +16,6 @@ - {{- end }} +@@ -17,5 +17,5 @@ selector: matchLabels: -- app: alertmanager -- alertmanager: {{ template "kube-prometheus-stack.fullname" . }}-alertmanager -+ app.kubernetes.io/name: alertmanager + app.kubernetes.io/name: alertmanager +- alertmanager: {{ template "kube-prometheus-stack.alertmanager.crname" . }} + alertmanager: {{ template "project-prometheus-stack.alertmanager.crname" . }} {{- end }} diff --git a/packages/rancher-project-monitoring/generated-changes/patch/templates/alertmanager/psp.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/templates/alertmanager/psp.yaml.patch index 7b83d013..904ad8dd 100644 --- a/packages/rancher-project-monitoring/generated-changes/patch/templates/alertmanager/psp.yaml.patch +++ b/packages/rancher-project-monitoring/generated-changes/patch/templates/alertmanager/psp.yaml.patch @@ -1,6 +1,6 @@ --- charts-original/templates/alertmanager/psp.yaml +++ charts/templates/alertmanager/psp.yaml -@@ -2,22 +2,16 @@ +@@ -2,14 +2,14 @@ apiVersion: policy/v1beta1 kind: PodSecurityPolicy metadata: @@ -17,28 +17,4 @@ +{{ include "project-prometheus-stack.labels" . | indent 4 }} spec: privileged: false -- # Required to prevent escalations to root. -- # allowPrivilegeEscalation: false -- # This is redundant with non-root + disallow privilege escalation, -- # but we can provide it for defense in depth. -- #requiredDropCapabilities: -- # - ALL # Allow core volume types. - volumes: - - 'configMap' -@@ -38,13 +32,13 @@ - supplementalGroups: - rule: 'MustRunAs' - ranges: -- # Forbid adding the root group. -+ # Allow adding the root group. - - min: 0 - max: 65535 - fsGroup: - rule: 'MustRunAs' - ranges: -- # Forbid adding the root group. -+ # Allow adding the root group. - - min: 0 - max: 65535 - readOnlyRootFilesystem: false diff --git a/packages/rancher-project-monitoring/generated-changes/patch/templates/alertmanager/secret.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/templates/alertmanager/secret.yaml.patch index c0c509b7..66709f37 100644 --- a/packages/rancher-project-monitoring/generated-changes/patch/templates/alertmanager/secret.yaml.patch +++ b/packages/rancher-project-monitoring/generated-changes/patch/templates/alertmanager/secret.yaml.patch @@ -4,7 +4,7 @@ -{{- if and (.Values.alertmanager.enabled) (not .Values.alertmanager.alertmanagerSpec.useExistingSecret) }} +{{- if .Values.alertmanager.enabled }} {{/* This file is applied when the operation is helm install and the target secret does not exist. */}} --{{- $secretName := (printf "alertmanager-%s-alertmanager" (include "kube-prometheus-stack.fullname" .)) }} +-{{- $secretName := (printf "alertmanager-%s" (include "kube-prometheus-stack.alertmanager.crname" .)) }} -{{- if (not (lookup "v1" "Secret" (include "kube-prometheus-stack.namespace" .) $secretName)) }} +{{- $secretName := (printf "%s-alertmanager-secret" (include "project-prometheus-stack.fullname" .)) }} +{{- if (not (lookup "v1" "Secret" (include "project-prometheus-stack.namespace" .) $secretName)) }} diff --git a/packages/rancher-project-monitoring/generated-changes/patch/templates/alertmanager/service.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/templates/alertmanager/service.yaml.patch index bc396f80..a6c0510b 100644 --- a/packages/rancher-project-monitoring/generated-changes/patch/templates/alertmanager/service.yaml.patch +++ b/packages/rancher-project-monitoring/generated-changes/patch/templates/alertmanager/service.yaml.patch @@ -17,23 +17,11 @@ {{- if .Values.alertmanager.service.labels }} {{ toYaml .Values.alertmanager.service.labels | indent 4 }} {{- end }} -@@ -32,6 +32,9 @@ - - {{ $cidr }} - {{- end }} - {{- end }} -+{{- if ne .Values.alertmanager.service.type "ClusterIP" }} -+ externalTrafficPolicy: {{ .Values.alertmanager.service.externalTrafficPolicy }} -+{{- end }} - ports: - - name: {{ .Values.alertmanager.alertmanagerSpec.portName }} - {{- if eq .Values.alertmanager.service.type "NodePort" }} -@@ -44,7 +47,7 @@ - {{ toYaml .Values.alertmanager.service.additionalPorts | indent 2 }} +@@ -48,6 +48,6 @@ {{- end }} selector: -- app: alertmanager -- alertmanager: {{ template "kube-prometheus-stack.fullname" . }}-alertmanager -+ app.kubernetes.io/name: alertmanager + app.kubernetes.io/name: alertmanager +- alertmanager: {{ template "kube-prometheus-stack.alertmanager.crname" . }} + alertmanager: {{ template "project-prometheus-stack.alertmanager.crname" . }} type: "{{ .Values.alertmanager.service.type }}" {{- end }} diff --git a/packages/rancher-project-monitoring/generated-changes/patch/templates/alertmanager/serviceaccount.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/templates/alertmanager/serviceaccount.yaml.patch index 0d8ffafa..0c17c122 100644 --- a/packages/rancher-project-monitoring/generated-changes/patch/templates/alertmanager/serviceaccount.yaml.patch +++ b/packages/rancher-project-monitoring/generated-changes/patch/templates/alertmanager/serviceaccount.yaml.patch @@ -1,6 +1,6 @@ --- charts-original/templates/alertmanager/serviceaccount.yaml +++ charts/templates/alertmanager/serviceaccount.yaml -@@ -2,19 +2,19 @@ +@@ -2,13 +2,13 @@ apiVersion: v1 kind: ServiceAccount metadata: @@ -19,10 +19,3 @@ {{- if .Values.alertmanager.serviceAccount.annotations }} annotations: {{ toYaml .Values.alertmanager.serviceAccount.annotations | indent 4 }} - {{- end }} - {{- if .Values.global.imagePullSecrets }} - imagePullSecrets: --{{ toYaml .Values.global.imagePullSecrets | indent 2 }} -+{{ include "kube-prometheus-stack.imagePullSecrets" . | trim | indent 2}} - {{- end }} - {{- end }} diff --git a/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/configmap-dashboards.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/configmap-dashboards.yaml.patch index 2affe557..761167f4 100644 --- a/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/configmap-dashboards.yaml.patch +++ b/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/configmap-dashboards.yaml.patch @@ -10,8 +10,7 @@ + namespace: {{ template "project-prometheus-stack.namespace" . }} labels: {{- if $.Values.grafana.sidecar.dashboards.label }} -- {{ $.Values.grafana.sidecar.dashboards.label }}: "1" -+ {{ $.Values.grafana.sidecar.dashboards.label }}: {{ ternary $.Values.grafana.sidecar.dashboards.labelValue "1" (not (empty $.Values.grafana.sidecar.dashboards.labelValue)) | quote }} + {{ $.Values.grafana.sidecar.dashboards.label }}: {{ ternary $.Values.grafana.sidecar.dashboards.labelValue "1" (not (empty $.Values.grafana.sidecar.dashboards.labelValue)) | quote }} {{- end }} - app: {{ template "kube-prometheus-stack.name" $ }}-grafana -{{ include "kube-prometheus-stack.labels" $ | indent 6 }} diff --git a/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/configmaps-datasources.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/configmaps-datasources.yaml.patch index c494defd..3993c276 100644 --- a/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/configmaps-datasources.yaml.patch +++ b/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/configmaps-datasources.yaml.patch @@ -1,6 +1,6 @@ --- charts-original/templates/grafana/configmaps-datasources.yaml +++ charts/templates/grafana/configmaps-datasources.yaml -@@ -2,43 +2,42 @@ +@@ -2,16 +2,16 @@ apiVersion: v1 kind: ConfigMap metadata: @@ -13,24 +13,16 @@ {{ toYaml .Values.grafana.sidecar.datasources.annotations | indent 4 }} {{- end }} labels: - {{ $.Values.grafana.sidecar.datasources.label }}: "1" +- {{ $.Values.grafana.sidecar.datasources.label }}: {{ $.Values.grafana.sidecar.datasources.labelValue | quote }} - app: {{ template "kube-prometheus-stack.name" $ }}-grafana -{{ include "kube-prometheus-stack.labels" $ | indent 4 }} ++ {{ $.Values.grafana.sidecar.datasources.label }}: "1" + app: {{ template "project-prometheus-stack.name" $ }}-grafana +{{ include "project-prometheus-stack.labels" $ | indent 4 }} data: datasource.yaml: |- apiVersion: 1 -+{{- if .Values.grafana.deleteDatasources }} -+ deleteDatasources: -+{{ tpl (toYaml .Values.grafana.deleteDatasources | indent 6) . }} -+{{- end }} - datasources: - {{- $scrapeInterval := .Values.grafana.sidecar.datasources.defaultDatasourceScrapeInterval | default .Values.prometheus.prometheusSpec.scrapeInterval | default "30s" }} - {{- if .Values.grafana.sidecar.datasources.defaultDatasourceEnabled }} - - name: Prometheus - type: prometheus -+ uid: {{ .Values.grafana.sidecar.datasources.uid }} +@@ -28,7 +28,7 @@ {{- if .Values.grafana.sidecar.datasources.url }} url: {{ .Values.grafana.sidecar.datasources.url }} {{- else }} @@ -39,22 +31,27 @@ {{- end }} access: proxy isDefault: true - jsonData: - timeInterval: {{ $scrapeInterval }} +@@ -38,23 +38,6 @@ + exemplarTraceIdDestinations: + - datasourceUid: {{ .Values.grafana.sidecar.datasources.exemplarTraceIdDestinations.datasourceUid }} + name: {{ .Values.grafana.sidecar.datasources.exemplarTraceIdDestinations.traceIdLabelName }} +-{{- end }} -{{- if .Values.grafana.sidecar.datasources.createPrometheusReplicasDatasources }} -{{- range until (int .Values.prometheus.prometheusSpec.replicas) }} - - name: Prometheus-{{ . }} - type: prometheus -- url: http://prometheus-{{ template "kube-prometheus-stack.fullname" $ }}-prometheus-{{ . }}.prometheus-operated:9090/{{ trimPrefix "/" $.Values.prometheus.prometheusSpec.routePrefix }} +- uid: {{ $.Values.grafana.sidecar.datasources.uid }}-replica-{{ . }} +- url: http://prometheus-{{ template "kube-prometheus-stack.prometheus.crname" $ }}-{{ . }}.prometheus-operated:9090/{{ trimPrefix "/" $.Values.prometheus.prometheusSpec.routePrefix }} - access: proxy - isDefault: false - jsonData: - timeInterval: {{ $scrapeInterval }} +-{{- if $.Values.grafana.sidecar.datasources.exemplarTraceIdDestinations }} +- exemplarTraceIdDestinations: +- - datasourceUid: {{ .Values.grafana.sidecar.datasources.exemplarTraceIdDestinations.datasourceUid }} +- name: {{ .Values.grafana.sidecar.datasources.exemplarTraceIdDestinations.traceIdLabelName }} +-{{- end }} -{{- end }} -+{{- if .Values.grafana.sidecar.datasources.exemplarTraceIdDestinations }} -+ exemplarTraceIdDestinations: -+ - datasourceUid: {{ .Values.grafana.sidecar.datasources.exemplarTraceIdDestinations.datasourceUid }} -+ name: {{ .Values.grafana.sidecar.datasources.exemplarTraceIdDestinations.traceIdLabelName }} {{- end }} {{- end }} {{- if .Values.grafana.additionalDataSources }} diff --git a/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/alertmanager-overview.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/alertmanager-overview.yaml.patch index 2533845b..f72dc8c0 100644 --- a/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/alertmanager-overview.yaml.patch +++ b/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/alertmanager-overview.yaml.patch @@ -21,8 +21,7 @@ {{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} labels: {{- if $.Values.grafana.sidecar.dashboards.label }} -- {{ $.Values.grafana.sidecar.dashboards.label }}: "1" -+ {{ $.Values.grafana.sidecar.dashboards.label }}: {{ ternary $.Values.grafana.sidecar.dashboards.labelValue "1" (not (empty $.Values.grafana.sidecar.dashboards.labelValue)) | quote }} + {{ $.Values.grafana.sidecar.dashboards.label }}: {{ ternary $.Values.grafana.sidecar.dashboards.labelValue "1" (not (empty $.Values.grafana.sidecar.dashboards.labelValue)) | quote }} {{- end }} - app: {{ template "kube-prometheus-stack.name" $ }}-grafana -{{ include "kube-prometheus-stack.labels" $ | indent 4 }} @@ -31,130 +30,3 @@ data: alertmanager-overview.json: |- { -@@ -55,6 +55,7 @@ - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", -+ "description": "current set of alerts stored in the Alertmanager", - "fill": 1, - "fillGradient": 0, - "gridPos": { -@@ -93,7 +94,7 @@ - "steppedLine": false, - "targets": [ - { -- "expr": "sum(alertmanager_alerts{namespace=\"$namespace\",service=\"$service\"}) by (namespace,service,instance)", -+ "expr": "sum(alertmanager_alerts{namespace=~\"$namespace\",service=~\"$service\"}) by (namespace,service,instance)", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{`{{`}}instance{{`}}`}}", -@@ -148,6 +149,7 @@ - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", -+ "description": "rate of successful and invalid alerts received by the Alertmanager", - "fill": 1, - "fillGradient": 0, - "gridPos": { -@@ -186,14 +188,14 @@ - "steppedLine": false, - "targets": [ - { -- "expr": "sum(rate(alertmanager_alerts_received_total{namespace=\"$namespace\",service=\"$service\"}[5m])) by (namespace,service,instance)", -+ "expr": "sum(rate(alertmanager_alerts_received_total{namespace=~\"$namespace\",service=~\"$service\"}[$__rate_interval])) by (namespace,service,instance)", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{`{{`}}instance{{`}}`}} Received", - "refId": "A" - }, - { -- "expr": "sum(rate(alertmanager_alerts_invalid_total{namespace=\"$namespace\",service=\"$service\"}[5m])) by (namespace,service,instance)", -+ "expr": "sum(rate(alertmanager_alerts_invalid_total{namespace=~\"$namespace\",service=~\"$service\"}[$__rate_interval])) by (namespace,service,instance)", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{`{{`}}instance{{`}}`}} Invalid", -@@ -261,6 +263,7 @@ - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", -+ "description": "rate of successful and invalid notifications sent by the Alertmanager", - "fill": 1, - "fillGradient": 0, - "gridPos": { -@@ -298,14 +301,14 @@ - "steppedLine": false, - "targets": [ - { -- "expr": "sum(rate(alertmanager_notifications_total{namespace=\"$namespace\",service=\"$service\", integration=\"$integration\"}[5m])) by (integration,namespace,service,instance)", -+ "expr": "sum(rate(alertmanager_notifications_total{namespace=~\"$namespace\",service=~\"$service\", integration=\"$integration\"}[$__rate_interval])) by (integration,namespace,service,instance)", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{`{{`}}instance{{`}}`}} Total", - "refId": "A" - }, - { -- "expr": "sum(rate(alertmanager_notifications_failed_total{namespace=\"$namespace\",service=\"$service\", integration=\"$integration\"}[5m])) by (integration,namespace,service,instance)", -+ "expr": "sum(rate(alertmanager_notifications_failed_total{namespace=~\"$namespace\",service=~\"$service\", integration=\"$integration\"}[$__rate_interval])) by (integration,namespace,service,instance)", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{`{{`}}instance{{`}}`}} Failed", -@@ -360,6 +363,7 @@ - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", -+ "description": "latency of notifications sent by the Alertmanager", - "fill": 1, - "fillGradient": 0, - "gridPos": { -@@ -397,21 +401,21 @@ - "steppedLine": false, - "targets": [ - { -- "expr": "histogram_quantile(0.99,\n sum(rate(alertmanager_notification_latency_seconds_bucket{namespace=\"$namespace\",service=\"$service\", integration=\"$integration\"}[5m])) by (le,namespace,service,instance)\n) \n", -+ "expr": "histogram_quantile(0.99,\n sum(rate(alertmanager_notification_latency_seconds_bucket{namespace=~\"$namespace\",service=~\"$service\", integration=\"$integration\"}[$__rate_interval])) by (le,namespace,service,instance)\n) \n", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{`{{`}}instance{{`}}`}} 99th Percentile", - "refId": "A" - }, - { -- "expr": "histogram_quantile(0.50,\n sum(rate(alertmanager_notification_latency_seconds_bucket{namespace=\"$namespace\",service=\"$service\", integration=\"$integration\"}[5m])) by (le,namespace,service,instance)\n) \n", -+ "expr": "histogram_quantile(0.50,\n sum(rate(alertmanager_notification_latency_seconds_bucket{namespace=~\"$namespace\",service=~\"$service\", integration=\"$integration\"}[$__rate_interval])) by (le,namespace,service,instance)\n) \n", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{`{{`}}instance{{`}}`}} Median", - "refId": "B" - }, - { -- "expr": "sum(rate(alertmanager_notification_latency_seconds_sum{namespace=\"$namespace\",service=\"$service\", integration=\"$integration\"}[5m])) by (namespace,service,instance)\n/\nsum(rate(alertmanager_notification_latency_seconds_count{namespace=\"$namespace\",service=\"$service\", integration=\"$integration\"}[5m])) by (namespace,service,instance)\n", -+ "expr": "sum(rate(alertmanager_notification_latency_seconds_sum{namespace=~\"$namespace\",service=~\"$service\", integration=\"$integration\"}[$__rate_interval])) by (namespace,service,instance)\n/\nsum(rate(alertmanager_notification_latency_seconds_count{namespace=~\"$namespace\",service=~\"$service\", integration=\"$integration\"}[$__rate_interval])) by (namespace,service,instance)\n", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{`{{`}}instance{{`}}`}} Average", -@@ -481,7 +485,7 @@ - "value": "Prometheus" - }, - "hide": 0, -- "label": null, -+ "label": "Data Source", - "name": "datasource", - "options": [ - -@@ -500,7 +504,7 @@ - "datasource": "$datasource", - "hide": 0, - "includeAll": false, -- "label": null, -+ "label": "namespace", - "multi": false, - "name": "namespace", - "options": [ -@@ -527,7 +531,7 @@ - "datasource": "$datasource", - "hide": 0, - "includeAll": false, -- "label": null, -+ "label": "service", - "multi": false, - "name": "service", - "options": [ diff --git a/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/cluster-total.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/cluster-total.yaml.patch index 5fb301ef..1f2c76dd 100644 --- a/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/cluster-total.yaml.patch +++ b/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/cluster-total.yaml.patch @@ -20,8 +20,7 @@ {{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} labels: {{- if $.Values.grafana.sidecar.dashboards.label }} -- {{ $.Values.grafana.sidecar.dashboards.label }}: "1" -+ {{ $.Values.grafana.sidecar.dashboards.label }}: {{ ternary $.Values.grafana.sidecar.dashboards.labelValue "1" (not (empty $.Values.grafana.sidecar.dashboards.labelValue)) | quote }} + {{ $.Values.grafana.sidecar.dashboards.label }}: {{ ternary $.Values.grafana.sidecar.dashboards.labelValue "1" (not (empty $.Values.grafana.sidecar.dashboards.labelValue)) | quote }} {{- end }} - app: {{ template "kube-prometheus-stack.name" $ }}-grafana -{{ include "kube-prometheus-stack.labels" $ | indent 4 }} @@ -409,21 +408,6 @@ } ], "repeat": null, -@@ -1803,11 +1593,11 @@ - }, - { - "current": { -- "text": "default", -- "value": "default" -+ "text": "Prometheus", -+ "value": "Prometheus" - }, - "hide": 0, -- "label": null, -+ "label": "Data Source", - "name": "datasource", - "options": [ - @@ -1816,32 +1606,6 @@ "refresh": 1, "regex": "", diff --git a/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-resources-namespace.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-resources-namespace.yaml.patch index 1ca42665..80657ed0 100644 --- a/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-resources-namespace.yaml.patch +++ b/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-resources-namespace.yaml.patch @@ -20,8 +20,7 @@ {{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} labels: {{- if $.Values.grafana.sidecar.dashboards.label }} -- {{ $.Values.grafana.sidecar.dashboards.label }}: "1" -+ {{ $.Values.grafana.sidecar.dashboards.label }}: {{ ternary $.Values.grafana.sidecar.dashboards.labelValue "1" (not (empty $.Values.grafana.sidecar.dashboards.labelValue)) | quote }} + {{ $.Values.grafana.sidecar.dashboards.label }}: {{ ternary $.Values.grafana.sidecar.dashboards.labelValue "1" (not (empty $.Values.grafana.sidecar.dashboards.labelValue)) | quote }} {{- end }} - app: {{ template "kube-prometheus-stack.name" $ }}-grafana -{{ include "kube-prometheus-stack.labels" $ | indent 4 }} @@ -30,154 +29,43 @@ data: k8s-resources-namespace.json: |- { -@@ -50,11 +50,14 @@ - "fill": 1, - "format": "percentunit", - "id": 1, -+ "interval": "1m", - "legend": { -+ "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, -+ "rightSide": true, - "show": true, - "total": false, - "values": false -@@ -78,7 +81,7 @@ +@@ -81,7 +81,7 @@ "steppedLine": false, "targets": [ { -- "expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate{cluster=\"$cluster\", namespace=\"$namespace\"}) / sum(kube_pod_container_resource_requests{cluster=\"$cluster\", namespace=\"$namespace\", resource=\"cpu\"})", +- "expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate{cluster=\"$cluster\", namespace=\"$namespace\"}) / sum(kube_pod_container_resource_requests{job=\"kube-state-metrics\", cluster=\"$cluster\", namespace=\"$namespace\", resource=\"cpu\"})", + "expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate{namespace=\"$namespace\"}) / sum(kube_pod_container_resource_requests{namespace=\"$namespace\", resource=\"cpu\"})", "format": "time_series", "instant": true, "intervalFactor": 2, -@@ -91,7 +94,7 @@ - "title": "CPU Utilisation (from requests)", - "tooltip": { - "shared": false, -- "sort": 0, -+ "sort": 2, - "value_type": "individual" - }, - "type": "singlestat", -@@ -134,11 +137,14 @@ - "fill": 1, - "format": "percentunit", - "id": 2, -+ "interval": "1m", - "legend": { -+ "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, -+ "rightSide": true, - "show": true, - "total": false, - "values": false -@@ -162,7 +168,7 @@ +@@ -168,7 +168,7 @@ "steppedLine": false, "targets": [ { -- "expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate{cluster=\"$cluster\", namespace=\"$namespace\"}) / sum(kube_pod_container_resource_limits{cluster=\"$cluster\", namespace=\"$namespace\", resource=\"cpu\"})", +- "expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate{cluster=\"$cluster\", namespace=\"$namespace\"}) / sum(kube_pod_container_resource_limits{job=\"kube-state-metrics\", cluster=\"$cluster\", namespace=\"$namespace\", resource=\"cpu\"})", + "expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate{namespace=\"$namespace\"}) / sum(kube_pod_container_resource_limits{namespace=\"$namespace\", resource=\"cpu\"})", "format": "time_series", "instant": true, "intervalFactor": 2, -@@ -175,7 +181,7 @@ - "title": "CPU Utilisation (from limits)", - "tooltip": { - "shared": false, -- "sort": 0, -+ "sort": 2, - "value_type": "individual" - }, - "type": "singlestat", -@@ -218,11 +224,14 @@ - "fill": 1, - "format": "percentunit", - "id": 3, -+ "interval": "1m", - "legend": { -+ "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, -+ "rightSide": true, - "show": true, - "total": false, - "values": false -@@ -246,7 +255,7 @@ +@@ -255,7 +255,7 @@ "steppedLine": false, "targets": [ { -- "expr": "sum(container_memory_working_set_bytes{cluster=\"$cluster\", namespace=\"$namespace\",container!=\"\", image!=\"\"}) / sum(kube_pod_container_resource_requests{cluster=\"$cluster\", namespace=\"$namespace\", resource=\"memory\"})", +- "expr": "sum(container_memory_working_set_bytes{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=\"$namespace\",container!=\"\", image!=\"\"}) / sum(kube_pod_container_resource_requests{job=\"kube-state-metrics\", cluster=\"$cluster\", namespace=\"$namespace\", resource=\"memory\"})", + "expr": "sum(container_memory_working_set_bytes{namespace=\"$namespace\",container!=\"\", image!=\"\"}) / sum(kube_pod_container_resource_requests{namespace=\"$namespace\", resource=\"memory\"})", "format": "time_series", "instant": true, "intervalFactor": 2, -@@ -259,7 +268,7 @@ - "title": "Memory Utilisation (from requests)", - "tooltip": { - "shared": false, -- "sort": 0, -+ "sort": 2, - "value_type": "individual" - }, - "type": "singlestat", -@@ -302,11 +311,14 @@ - "fill": 1, - "format": "percentunit", - "id": 4, -+ "interval": "1m", - "legend": { -+ "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, -+ "rightSide": true, - "show": true, - "total": false, - "values": false -@@ -330,7 +342,7 @@ +@@ -342,7 +342,7 @@ "steppedLine": false, "targets": [ { -- "expr": "sum(container_memory_working_set_bytes{cluster=\"$cluster\", namespace=\"$namespace\",container!=\"\", image!=\"\"}) / sum(kube_pod_container_resource_limits{cluster=\"$cluster\", namespace=\"$namespace\", resource=\"memory\"})", +- "expr": "sum(container_memory_working_set_bytes{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=\"$namespace\",container!=\"\", image!=\"\"}) / sum(kube_pod_container_resource_limits{job=\"kube-state-metrics\", cluster=\"$cluster\", namespace=\"$namespace\", resource=\"memory\"})", + "expr": "sum(container_memory_working_set_bytes{namespace=\"$namespace\",container!=\"\", image!=\"\"}) / sum(kube_pod_container_resource_limits{namespace=\"$namespace\", resource=\"memory\"})", "format": "time_series", "instant": true, "intervalFactor": 2, -@@ -343,7 +355,7 @@ - "title": "Memory Utilisation (from limits)", - "tooltip": { - "shared": false, -- "sort": 0, -+ "sort": 2, - "value_type": "individual" - }, - "type": "singlestat", -@@ -397,11 +409,14 @@ - "datasource": "$datasource", - "fill": 10, - "id": 5, -+ "interval": "1m", - "legend": { -+ "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, -+ "rightSide": true, - "show": true, - "total": false, - "values": false -@@ -446,7 +461,7 @@ +@@ -461,7 +461,7 @@ "steppedLine": false, "targets": [ { @@ -186,7 +74,7 @@ "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}pod{{`}}`}}", -@@ -454,7 +469,7 @@ +@@ -469,7 +469,7 @@ "step": 10 }, { @@ -195,7 +83,7 @@ "format": "time_series", "intervalFactor": 2, "legendFormat": "quota - requests", -@@ -462,7 +477,7 @@ +@@ -477,7 +477,7 @@ "step": 10 }, { @@ -204,40 +92,7 @@ "format": "time_series", "intervalFactor": 2, "legendFormat": "quota - limits", -@@ -478,7 +493,7 @@ - "title": "CPU Usage", - "tooltip": { - "shared": false, -- "sort": 0, -+ "sort": 2, - "value_type": "individual" - }, - "type": "graph", -@@ -532,11 +547,14 @@ - "datasource": "$datasource", - "fill": 1, - "id": 6, -+ "interval": "1m", - "legend": { -+ "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, -+ "rightSide": true, - "show": true, - "total": false, - "values": false -@@ -671,7 +689,7 @@ - "link": true, - "linkTargetBlank": false, - "linkTooltip": "Drill down", -- "linkUrl": "/d/6581e46e4e5c7ba40a07646395ef7b23/k8s-resources-pod?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$namespace&var-pod=$__cell", -+ "linkUrl": "d/6581e46e4e5c7ba40a07646395ef7b23/k8s-resources-pod?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$namespace&var-pod=$__cell", - "pattern": "pod", - "thresholds": [ - -@@ -697,7 +715,7 @@ +@@ -715,7 +715,7 @@ ], "targets": [ { @@ -246,7 +101,7 @@ "format": "table", "instant": true, "intervalFactor": 2, -@@ -706,7 +724,7 @@ +@@ -724,7 +724,7 @@ "step": 10 }, { @@ -255,7 +110,7 @@ "format": "table", "instant": true, "intervalFactor": 2, -@@ -715,7 +733,7 @@ +@@ -733,7 +733,7 @@ "step": 10 }, { @@ -264,7 +119,7 @@ "format": "table", "instant": true, "intervalFactor": 2, -@@ -724,7 +742,7 @@ +@@ -742,7 +742,7 @@ "step": 10 }, { @@ -273,7 +128,7 @@ "format": "table", "instant": true, "intervalFactor": 2, -@@ -733,7 +751,7 @@ +@@ -751,7 +751,7 @@ "step": 10 }, { @@ -282,40 +137,16 @@ "format": "table", "instant": true, "intervalFactor": 2, -@@ -750,7 +768,7 @@ - "title": "CPU Quota", - "tooltip": { - "shared": false, -- "sort": 0, -+ "sort": 2, - "value_type": "individual" - }, - "transform": "table", -@@ -805,11 +823,14 @@ - "datasource": "$datasource", - "fill": 10, - "id": 7, -+ "interval": "1m", - "legend": { -+ "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, -+ "rightSide": true, - "show": true, - "total": false, - "values": false -@@ -854,7 +875,7 @@ +@@ -875,7 +875,7 @@ "steppedLine": false, "targets": [ { -- "expr": "sum(container_memory_working_set_bytes{cluster=\"$cluster\", namespace=\"$namespace\", container!=\"\", image!=\"\"}) by (pod)", +- "expr": "sum(container_memory_working_set_bytes{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=\"$namespace\", container!=\"\", image!=\"\"}) by (pod)", + "expr": "sum(container_memory_working_set_bytes{namespace=\"$namespace\", container!=\"\", image!=\"\"}) by (pod)", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}pod{{`}}`}}", -@@ -862,7 +883,7 @@ +@@ -883,7 +883,7 @@ "step": 10 }, { @@ -324,7 +155,7 @@ "format": "time_series", "intervalFactor": 2, "legendFormat": "quota - requests", -@@ -870,7 +891,7 @@ +@@ -891,7 +891,7 @@ "step": 10 }, { @@ -333,49 +164,16 @@ "format": "time_series", "intervalFactor": 2, "legendFormat": "quota - limits", -@@ -886,7 +907,7 @@ - "title": "Memory Usage (w/o cache)", - "tooltip": { - "shared": false, -- "sort": 0, -+ "sort": 2, - "value_type": "individual" - }, - "type": "graph", -@@ -940,11 +961,14 @@ - "datasource": "$datasource", - "fill": 1, - "id": 8, -+ "interval": "1m", - "legend": { -+ "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, -+ "rightSide": true, - "show": true, - "total": false, - "values": false -@@ -1136,7 +1160,7 @@ - "link": true, - "linkTargetBlank": false, - "linkTooltip": "Drill down", -- "linkUrl": "/d/6581e46e4e5c7ba40a07646395ef7b23/k8s-resources-pod?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$namespace&var-pod=$__cell", -+ "linkUrl": "d/6581e46e4e5c7ba40a07646395ef7b23/k8s-resources-pod?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$namespace&var-pod=$__cell", - "pattern": "pod", - "thresholds": [ - -@@ -1162,7 +1186,7 @@ +@@ -1186,7 +1186,7 @@ ], "targets": [ { -- "expr": "sum(container_memory_working_set_bytes{cluster=\"$cluster\", namespace=\"$namespace\",container!=\"\", image!=\"\"}) by (pod)", +- "expr": "sum(container_memory_working_set_bytes{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=\"$namespace\",container!=\"\", image!=\"\"}) by (pod)", + "expr": "sum(container_memory_working_set_bytes{namespace=\"$namespace\",container!=\"\", image!=\"\"}) by (pod)", "format": "table", "instant": true, "intervalFactor": 2, -@@ -1171,7 +1195,7 @@ +@@ -1195,7 +1195,7 @@ "step": 10 }, { @@ -384,16 +182,16 @@ "format": "table", "instant": true, "intervalFactor": 2, -@@ -1180,7 +1204,7 @@ +@@ -1204,7 +1204,7 @@ "step": 10 }, { -- "expr": "sum(container_memory_working_set_bytes{cluster=\"$cluster\", namespace=\"$namespace\",container!=\"\", image!=\"\"}) by (pod) / sum(cluster:namespace:pod_memory:active:kube_pod_container_resource_requests{cluster=\"$cluster\", namespace=\"$namespace\"}) by (pod)", +- "expr": "sum(container_memory_working_set_bytes{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=\"$namespace\",container!=\"\", image!=\"\"}) by (pod) / sum(cluster:namespace:pod_memory:active:kube_pod_container_resource_requests{cluster=\"$cluster\", namespace=\"$namespace\"}) by (pod)", + "expr": "sum(container_memory_working_set_bytes{namespace=\"$namespace\",container!=\"\", image!=\"\"}) by (pod) / sum(cluster:namespace:pod_memory:active:kube_pod_container_resource_requests{namespace=\"$namespace\"}) by (pod)", "format": "table", "instant": true, "intervalFactor": 2, -@@ -1189,7 +1213,7 @@ +@@ -1213,7 +1213,7 @@ "step": 10 }, { @@ -402,503 +200,223 @@ "format": "table", "instant": true, "intervalFactor": 2, -@@ -1198,7 +1222,7 @@ +@@ -1222,7 +1222,7 @@ "step": 10 }, { -- "expr": "sum(container_memory_working_set_bytes{cluster=\"$cluster\", namespace=\"$namespace\",container!=\"\", image!=\"\"}) by (pod) / sum(cluster:namespace:pod_memory:active:kube_pod_container_resource_limits{cluster=\"$cluster\", namespace=\"$namespace\"}) by (pod)", +- "expr": "sum(container_memory_working_set_bytes{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=\"$namespace\",container!=\"\", image!=\"\"}) by (pod) / sum(cluster:namespace:pod_memory:active:kube_pod_container_resource_limits{cluster=\"$cluster\", namespace=\"$namespace\"}) by (pod)", + "expr": "sum(container_memory_working_set_bytes{namespace=\"$namespace\",container!=\"\", image!=\"\"}) by (pod) / sum(cluster:namespace:pod_memory:active:kube_pod_container_resource_limits{namespace=\"$namespace\"}) by (pod)", "format": "table", "instant": true, "intervalFactor": 2, -@@ -1207,7 +1231,7 @@ +@@ -1231,7 +1231,7 @@ "step": 10 }, { -- "expr": "sum(container_memory_rss{cluster=\"$cluster\", namespace=\"$namespace\",container!=\"\"}) by (pod)", +- "expr": "sum(container_memory_rss{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=\"$namespace\",container!=\"\"}) by (pod)", + "expr": "sum(container_memory_rss{namespace=\"$namespace\",container!=\"\"}) by (pod)", "format": "table", "instant": true, "intervalFactor": 2, -@@ -1216,7 +1240,7 @@ +@@ -1240,7 +1240,7 @@ "step": 10 }, { -- "expr": "sum(container_memory_cache{cluster=\"$cluster\", namespace=\"$namespace\",container!=\"\"}) by (pod)", +- "expr": "sum(container_memory_cache{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=\"$namespace\",container!=\"\"}) by (pod)", + "expr": "sum(container_memory_cache{namespace=\"$namespace\",container!=\"\"}) by (pod)", "format": "table", "instant": true, "intervalFactor": 2, -@@ -1225,7 +1249,7 @@ +@@ -1249,7 +1249,7 @@ "step": 10 }, { -- "expr": "sum(container_memory_swap{cluster=\"$cluster\", namespace=\"$namespace\",container!=\"\"}) by (pod)", +- "expr": "sum(container_memory_swap{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=\"$namespace\",container!=\"\"}) by (pod)", + "expr": "sum(container_memory_swap{namespace=\"$namespace\",container!=\"\"}) by (pod)", "format": "table", "instant": true, "intervalFactor": 2, -@@ -1242,7 +1266,7 @@ - "title": "Memory Quota", - "tooltip": { - "shared": false, -- "sort": 0, -+ "sort": 2, - "value_type": "individual" - }, - "transform": "table", -@@ -1299,10 +1323,12 @@ - "id": 9, - "interval": "1m", - "legend": { -+ "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, -+ "rightSide": true, - "show": true, - "total": false, - "values": false -@@ -1456,7 +1482,7 @@ - "link": true, - "linkTargetBlank": false, - "linkTooltip": "Drill down to pods", -- "linkUrl": "/d/6581e46e4e5c7ba40a07646395ef7b23/k8s-resources-pod?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$namespace&var-pod=$__cell", -+ "linkUrl": "d/6581e46e4e5c7ba40a07646395ef7b23/k8s-resources-pod?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$namespace&var-pod=$__cell", - "pattern": "pod", - "thresholds": [ - -@@ -1482,7 +1508,7 @@ +@@ -1508,7 +1508,7 @@ ], "targets": [ { -- "expr": "sum(irate(container_network_receive_bytes_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__rate_interval])) by (pod)", +- "expr": "sum(irate(container_network_receive_bytes_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval])) by (pod)", + "expr": "sum(irate(container_network_receive_bytes_total{namespace=\"$namespace\"}[$__rate_interval])) by (pod)", "format": "table", "instant": true, "intervalFactor": 2, -@@ -1491,7 +1517,7 @@ +@@ -1517,7 +1517,7 @@ "step": 10 }, { -- "expr": "sum(irate(container_network_transmit_bytes_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__rate_interval])) by (pod)", +- "expr": "sum(irate(container_network_transmit_bytes_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval])) by (pod)", + "expr": "sum(irate(container_network_transmit_bytes_total{namespace=\"$namespace\"}[$__rate_interval])) by (pod)", "format": "table", "instant": true, "intervalFactor": 2, -@@ -1500,7 +1526,7 @@ +@@ -1526,7 +1526,7 @@ "step": 10 }, { -- "expr": "sum(irate(container_network_receive_packets_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__rate_interval])) by (pod)", +- "expr": "sum(irate(container_network_receive_packets_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval])) by (pod)", + "expr": "sum(irate(container_network_receive_packets_total{namespace=\"$namespace\"}[$__rate_interval])) by (pod)", "format": "table", "instant": true, "intervalFactor": 2, -@@ -1509,7 +1535,7 @@ +@@ -1535,7 +1535,7 @@ "step": 10 }, { -- "expr": "sum(irate(container_network_transmit_packets_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__rate_interval])) by (pod)", +- "expr": "sum(irate(container_network_transmit_packets_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval])) by (pod)", + "expr": "sum(irate(container_network_transmit_packets_total{namespace=\"$namespace\"}[$__rate_interval])) by (pod)", "format": "table", "instant": true, "intervalFactor": 2, -@@ -1518,7 +1544,7 @@ +@@ -1544,7 +1544,7 @@ "step": 10 }, { -- "expr": "sum(irate(container_network_receive_packets_dropped_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__rate_interval])) by (pod)", +- "expr": "sum(irate(container_network_receive_packets_dropped_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval])) by (pod)", + "expr": "sum(irate(container_network_receive_packets_dropped_total{namespace=\"$namespace\"}[$__rate_interval])) by (pod)", "format": "table", "instant": true, "intervalFactor": 2, -@@ -1527,7 +1553,7 @@ +@@ -1553,7 +1553,7 @@ "step": 10 }, { -- "expr": "sum(irate(container_network_transmit_packets_dropped_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__rate_interval])) by (pod)", +- "expr": "sum(irate(container_network_transmit_packets_dropped_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval])) by (pod)", + "expr": "sum(irate(container_network_transmit_packets_dropped_total{namespace=\"$namespace\"}[$__rate_interval])) by (pod)", "format": "table", "instant": true, "intervalFactor": 2, -@@ -1544,7 +1570,7 @@ - "title": "Current Network Usage", - "tooltip": { - "shared": false, -- "sort": 0, -+ "sort": 2, - "value_type": "individual" - }, - "transform": "table", -@@ -1599,11 +1625,14 @@ - "datasource": "$datasource", - "fill": 10, - "id": 10, -+ "interval": "1m", - "legend": { -+ "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, -+ "rightSide": true, - "show": true, - "total": false, - "values": false -@@ -1627,7 +1656,7 @@ +@@ -1656,7 +1656,7 @@ "steppedLine": false, "targets": [ { -- "expr": "sum(irate(container_network_receive_bytes_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__rate_interval])) by (pod)", +- "expr": "sum(irate(container_network_receive_bytes_total{cluster=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval])) by (pod)", + "expr": "sum(irate(container_network_receive_bytes_total{namespace=\"$namespace\"}[$__rate_interval])) by (pod)", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}pod{{`}}`}}", -@@ -1643,7 +1672,7 @@ - "title": "Receive Bandwidth", - "tooltip": { - "shared": false, -- "sort": 0, -+ "sort": 2, - "value_type": "individual" - }, - "type": "graph", -@@ -1685,11 +1714,14 @@ - "datasource": "$datasource", - "fill": 10, - "id": 11, -+ "interval": "1m", - "legend": { -+ "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, -+ "rightSide": true, - "show": true, - "total": false, - "values": false -@@ -1713,7 +1745,7 @@ +@@ -1745,7 +1745,7 @@ "steppedLine": false, "targets": [ { -- "expr": "sum(irate(container_network_transmit_bytes_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__rate_interval])) by (pod)", +- "expr": "sum(irate(container_network_transmit_bytes_total{cluster=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval])) by (pod)", + "expr": "sum(irate(container_network_transmit_bytes_total{namespace=\"$namespace\"}[$__rate_interval])) by (pod)", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}pod{{`}}`}}", -@@ -1729,7 +1761,7 @@ - "title": "Transmit Bandwidth", - "tooltip": { - "shared": false, -- "sort": 0, -+ "sort": 2, - "value_type": "individual" - }, - "type": "graph", -@@ -1783,11 +1815,14 @@ - "datasource": "$datasource", - "fill": 10, - "id": 12, -+ "interval": "1m", - "legend": { -+ "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, -+ "rightSide": true, - "show": true, - "total": false, - "values": false -@@ -1811,7 +1846,7 @@ +@@ -1846,7 +1846,7 @@ "steppedLine": false, "targets": [ { -- "expr": "sum(irate(container_network_receive_packets_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__rate_interval])) by (pod)", +- "expr": "sum(irate(container_network_receive_packets_total{cluster=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval])) by (pod)", + "expr": "sum(irate(container_network_receive_packets_total{namespace=\"$namespace\"}[$__rate_interval])) by (pod)", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}pod{{`}}`}}", -@@ -1827,7 +1862,7 @@ - "title": "Rate of Received Packets", - "tooltip": { - "shared": false, -- "sort": 0, -+ "sort": 2, - "value_type": "individual" - }, - "type": "graph", -@@ -1869,11 +1904,14 @@ - "datasource": "$datasource", - "fill": 10, - "id": 13, -+ "interval": "1m", - "legend": { -+ "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, -+ "rightSide": true, - "show": true, - "total": false, - "values": false -@@ -1897,7 +1935,7 @@ +@@ -1935,7 +1935,7 @@ "steppedLine": false, "targets": [ { -- "expr": "sum(irate(container_network_transmit_packets_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__rate_interval])) by (pod)", +- "expr": "sum(irate(container_network_transmit_packets_total{cluster=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval])) by (pod)", + "expr": "sum(irate(container_network_transmit_packets_total{namespace=\"$namespace\"}[$__rate_interval])) by (pod)", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}pod{{`}}`}}", -@@ -1913,7 +1951,7 @@ - "title": "Rate of Transmitted Packets", - "tooltip": { - "shared": false, -- "sort": 0, -+ "sort": 2, - "value_type": "individual" - }, - "type": "graph", -@@ -1967,11 +2005,14 @@ - "datasource": "$datasource", - "fill": 10, - "id": 14, -+ "interval": "1m", - "legend": { -+ "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, -+ "rightSide": true, - "show": true, - "total": false, - "values": false -@@ -1995,7 +2036,7 @@ +@@ -2036,7 +2036,7 @@ "steppedLine": false, "targets": [ { -- "expr": "sum(irate(container_network_receive_packets_dropped_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__rate_interval])) by (pod)", +- "expr": "sum(irate(container_network_receive_packets_dropped_total{cluster=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval])) by (pod)", + "expr": "sum(irate(container_network_receive_packets_dropped_total{namespace=\"$namespace\"}[$__rate_interval])) by (pod)", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}pod{{`}}`}}", -@@ -2011,7 +2052,7 @@ - "title": "Rate of Received Packets Dropped", - "tooltip": { - "shared": false, -- "sort": 0, -+ "sort": 2, - "value_type": "individual" - }, - "type": "graph", -@@ -2053,11 +2094,14 @@ - "datasource": "$datasource", - "fill": 10, - "id": 15, -+ "interval": "1m", - "legend": { -+ "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, -+ "rightSide": true, - "show": true, - "total": false, - "values": false -@@ -2081,7 +2125,7 @@ +@@ -2125,7 +2125,7 @@ "steppedLine": false, "targets": [ { -- "expr": "sum(irate(container_network_transmit_packets_dropped_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__rate_interval])) by (pod)", +- "expr": "sum(irate(container_network_transmit_packets_dropped_total{cluster=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval])) by (pod)", + "expr": "sum(irate(container_network_transmit_packets_dropped_total{namespace=\"$namespace\"}[$__rate_interval])) by (pod)", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}pod{{`}}`}}", -@@ -2097,7 +2141,7 @@ - "title": "Rate of Transmitted Packets Dropped", - "tooltip": { - "shared": false, -- "sort": 0, -+ "sort": 2, - "value_type": "individual" - }, - "type": "graph", -@@ -2152,11 +2196,14 @@ - "decimals": -1, - "fill": 10, - "id": 16, -+ "interval": "1m", - "legend": { -+ "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, -+ "rightSide": true, - "show": true, - "total": false, - "values": false -@@ -2180,7 +2227,7 @@ +@@ -2227,7 +2227,7 @@ "steppedLine": false, "targets": [ { -- "expr": "ceil(sum by(pod) (rate(container_fs_reads_total{container!=\"\", cluster=\"$cluster\",namespace=~\"$namespace\"}[5m]) + rate(container_fs_writes_total{container!=\"\", cluster=\"$cluster\",namespace=~\"$namespace\"}[5m])))", +- "expr": "ceil(sum by(pod) (rate(container_fs_reads_total{container!=\"\", device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", cluster=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval]) + rate(container_fs_writes_total{container!=\"\", device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", cluster=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval])))", + "expr": "ceil(sum by(pod) (rate(container_fs_reads_total{container!=\"\", device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", namespace=\"$namespace\"}[$__rate_interval]) + rate(container_fs_writes_total{container!=\"\", device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", namespace=\"$namespace\"}[$__rate_interval])))", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}pod{{`}}`}}", -@@ -2196,7 +2243,7 @@ - "title": "IOPS(Reads+Writes)", - "tooltip": { - "shared": false, -- "sort": 0, -+ "sort": 2, - "value_type": "individual" - }, - "type": "graph", -@@ -2238,11 +2285,14 @@ - "datasource": "$datasource", - "fill": 10, - "id": 17, -+ "interval": "1m", - "legend": { -+ "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, -+ "rightSide": true, - "show": true, - "total": false, - "values": false -@@ -2266,7 +2316,7 @@ +@@ -2316,7 +2316,7 @@ "steppedLine": false, "targets": [ { -- "expr": "sum by(pod) (rate(container_fs_reads_bytes_total{container!=\"\", cluster=\"$cluster\",namespace=~\"$namespace\"}[5m]) + rate(container_fs_writes_bytes_total{container!=\"\", cluster=\"$cluster\",namespace=~\"$namespace\"}[5m]))", +- "expr": "sum by(pod) (rate(container_fs_reads_bytes_total{container!=\"\", device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", cluster=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval]) + rate(container_fs_writes_bytes_total{container!=\"\", device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", cluster=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval]))", + "expr": "sum by(pod) (rate(container_fs_reads_bytes_total{container!=\"\", device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", namespace=\"$namespace\"}[$__rate_interval]) + rate(container_fs_writes_bytes_total{container!=\"\", device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", namespace=\"$namespace\"}[$__rate_interval]))", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}pod{{`}}`}}", -@@ -2282,7 +2332,7 @@ - "title": "ThroughPut(Read+Write)", - "tooltip": { - "shared": false, -- "sort": 0, -+ "sort": 2, - "value_type": "individual" - }, - "type": "graph", -@@ -2336,11 +2386,14 @@ - "datasource": "$datasource", - "fill": 1, - "id": 18, -+ "interval": "1m", - "legend": { -+ "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, -+ "rightSide": true, - "show": true, - "total": false, - "values": false -@@ -2498,7 +2551,7 @@ - "link": true, - "linkTargetBlank": false, - "linkTooltip": "Drill down to pods", -- "linkUrl": "/d/6581e46e4e5c7ba40a07646395ef7b23/k8s-resources-pod?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$namespace&var-pod=$__cell", -+ "linkUrl": "d/6581e46e4e5c7ba40a07646395ef7b23/k8s-resources-pod?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$namespace&var-pod=$__cell", - "pattern": "pod", - "thresholds": [ - -@@ -2524,7 +2577,7 @@ +@@ -2577,7 +2577,7 @@ ], "targets": [ { -- "expr": "sum by(pod) (rate(container_fs_reads_total{container!=\"\", cluster=\"$cluster\",namespace=~\"$namespace\"}[5m]))", +- "expr": "sum by(pod) (rate(container_fs_reads_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", container!=\"\", cluster=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval]))", + "expr": "sum by(pod) (rate(container_fs_reads_total{device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", container!=\"\",namespace=\"$namespace\"}[$__rate_interval]))", "format": "table", "instant": true, "intervalFactor": 2, -@@ -2533,7 +2586,7 @@ +@@ -2586,7 +2586,7 @@ "step": 10 }, { -- "expr": "sum by(pod) (rate(container_fs_writes_total{container!=\"\", cluster=\"$cluster\",namespace=~\"$namespace\"}[5m]))", +- "expr": "sum by(pod) (rate(container_fs_writes_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", container!=\"\", cluster=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval]))", + "expr": "sum by(pod) (rate(container_fs_writes_total{device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", container!=\"\",namespace=\"$namespace\"}[$__rate_interval]))", "format": "table", "instant": true, "intervalFactor": 2, -@@ -2542,7 +2595,7 @@ +@@ -2595,7 +2595,7 @@ "step": 10 }, { -- "expr": "sum by(pod) (rate(container_fs_reads_total{container!=\"\", cluster=\"$cluster\",namespace=~\"$namespace\"}[5m]) + rate(container_fs_writes_total{container!=\"\", cluster=\"$cluster\",namespace=~\"$namespace\"}[5m]))", +- "expr": "sum by(pod) (rate(container_fs_reads_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", container!=\"\", cluster=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval]) + rate(container_fs_writes_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", container!=\"\", cluster=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval]))", + "expr": "sum by(pod) (rate(container_fs_reads_total{device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", container!=\"\",namespace=\"$namespace\"}[$__rate_interval]) + rate(container_fs_writes_total{device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", container!=\"\",namespace=\"$namespace\"}[$__rate_interval]))", "format": "table", "instant": true, "intervalFactor": 2, -@@ -2551,7 +2604,7 @@ +@@ -2604,7 +2604,7 @@ "step": 10 }, { -- "expr": "sum by(pod) (rate(container_fs_reads_bytes_total{container!=\"\", cluster=\"$cluster\",namespace=~\"$namespace\"}[5m]))", +- "expr": "sum by(pod) (rate(container_fs_reads_bytes_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", container!=\"\", cluster=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval]))", + "expr": "sum by(pod) (rate(container_fs_reads_bytes_total{device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", container!=\"\",namespace=\"$namespace\"}[$__rate_interval]))", "format": "table", "instant": true, "intervalFactor": 2, -@@ -2560,7 +2613,7 @@ +@@ -2613,7 +2613,7 @@ "step": 10 }, { -- "expr": "sum by(pod) (rate(container_fs_writes_bytes_total{container!=\"\", cluster=\"$cluster\",namespace=~\"$namespace\"}[5m]))", +- "expr": "sum by(pod) (rate(container_fs_writes_bytes_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", container!=\"\", cluster=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval]))", + "expr": "sum by(pod) (rate(container_fs_writes_bytes_total{device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", container!=\"\",namespace=\"$namespace\"}[$__rate_interval]))", "format": "table", "instant": true, "intervalFactor": 2, -@@ -2569,7 +2622,7 @@ +@@ -2622,7 +2622,7 @@ "step": 10 }, { -- "expr": "sum by(pod) (rate(container_fs_reads_bytes_total{container!=\"\", cluster=\"$cluster\",namespace=~\"$namespace\"}[5m]) + rate(container_fs_writes_bytes_total{container!=\"\", cluster=\"$cluster\",namespace=~\"$namespace\"}[5m]))", +- "expr": "sum by(pod) (rate(container_fs_reads_bytes_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", container!=\"\", cluster=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval]) + rate(container_fs_writes_bytes_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", container!=\"\", cluster=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval]))", + "expr": "sum by(pod) (rate(container_fs_reads_bytes_total{device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", container!=\"\",namespace=\"$namespace\"}[$__rate_interval]) + rate(container_fs_writes_bytes_total{device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", container!=\"\",namespace=\"$namespace\"}[$__rate_interval]))", "format": "table", "instant": true, "intervalFactor": 2, -@@ -2586,7 +2639,7 @@ - "title": "Current Storage IO", - "tooltip": { - "shared": false, -- "sort": 0, -+ "sort": 2, - "value_type": "individual" - }, - "transform": "table", -@@ -2637,11 +2690,11 @@ - "list": [ - { - "current": { -- "text": "default", -- "value": "default" -+ "text": "Prometheus", -+ "value": "Prometheus" - }, - "hide": 0, -- "label": null, -+ "label": "Data Source", - "name": "datasource", - "options": [ - -@@ -2658,33 +2711,6 @@ +@@ -2711,33 +2711,6 @@ "value": "" }, "datasource": "$datasource", @@ -910,7 +428,7 @@ - "options": [ - - ], -- "query": "label_values(kube_pod_info, cluster)", +- "query": "label_values(up{job=\"kube-state-metrics\"}, cluster)", - "refresh": 2, - "regex": "", - "sort": 1, @@ -932,11 +450,11 @@ "hide": 0, "includeAll": false, "label": null, -@@ -2693,7 +2719,7 @@ +@@ -2746,7 +2719,7 @@ "options": [ ], -- "query": "label_values(kube_pod_info{cluster=\"$cluster\"}, namespace)", +- "query": "label_values(kube_namespace_status_phase{job=\"kube-state-metrics\", cluster=\"$cluster\"}, namespace)", + "query": "label_values(kube_pod_info, namespace)", "refresh": 2, "regex": "", diff --git a/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-resources-node.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-resources-node.yaml.patch index e6730dc7..31294520 100644 --- a/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-resources-node.yaml.patch +++ b/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-resources-node.yaml.patch @@ -20,8 +20,7 @@ {{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} labels: {{- if $.Values.grafana.sidecar.dashboards.label }} -- {{ $.Values.grafana.sidecar.dashboards.label }}: "1" -+ {{ $.Values.grafana.sidecar.dashboards.label }}: {{ ternary $.Values.grafana.sidecar.dashboards.labelValue "1" (not (empty $.Values.grafana.sidecar.dashboards.labelValue)) | quote }} + {{ $.Values.grafana.sidecar.dashboards.label }}: {{ ternary $.Values.grafana.sidecar.dashboards.labelValue "1" (not (empty $.Values.grafana.sidecar.dashboards.labelValue)) | quote }} {{- end }} - app: {{ template "kube-prometheus-stack.name" $ }}-grafana -{{ include "kube-prometheus-stack.labels" $ | indent 4 }} @@ -30,55 +29,45 @@ data: k8s-resources-node.json: |- { -@@ -49,11 +49,14 @@ - "datasource": "$datasource", - "fill": 10, - "id": 1, -+ "interval": "1m", - "legend": { -+ "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, -+ "rightSide": true, - "show": true, - "total": false, - "values": false -@@ -77,7 +80,7 @@ +@@ -72,17 +72,7 @@ + "points": false, + "renderer": "flot", + "seriesOverrides": [ +- { +- "alias": "max capacity", +- "color": "#F2495C", +- "dashes": true, +- "fill": 0, +- "hiddenSeries": true, +- "hideTooltip": true, +- "legend": true, +- "linewidth": 2, +- "stack": false +- } ++ + ], + "spaceLength": 10, + "span": 12, +@@ -90,17 +80,9 @@ "steppedLine": false, "targets": [ { -- "expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate{cluster=\"$cluster\", node=~\"$node\"}) by (pod)", +- "expr": "sum(kube_node_status_capacity{cluster=\"$cluster\", node=~\"$node\", resource=\"cpu\"})", + "expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate{node=~\"$node\"}) by (pod)", "format": "time_series", "intervalFactor": 2, +- "legendFormat": "max capacity", +- "legendLink": null, +- "step": 10 +- }, +- { +- "expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate{cluster=\"$cluster\", node=~\"$node\"}) by (pod)", +- "format": "time_series", +- "intervalFactor": 2, "legendFormat": "{{`{{`}}pod{{`}}`}}", -@@ -93,7 +96,7 @@ - "title": "CPU Usage", - "tooltip": { - "shared": false, -- "sort": 0, -+ "sort": 2, - "value_type": "individual" - }, - "type": "graph", -@@ -147,11 +150,14 @@ - "datasource": "$datasource", - "fill": 1, - "id": 2, -+ "interval": "1m", - "legend": { -+ "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, -+ "rightSide": true, - "show": true, - "total": false, - "values": false -@@ -312,7 +318,7 @@ + "legendLink": null, + "step": 10 +@@ -336,7 +318,7 @@ ], "targets": [ { @@ -87,7 +76,7 @@ "format": "table", "instant": true, "intervalFactor": 2, -@@ -321,7 +327,7 @@ +@@ -345,7 +327,7 @@ "step": 10 }, { @@ -96,7 +85,7 @@ "format": "table", "instant": true, "intervalFactor": 2, -@@ -330,7 +336,7 @@ +@@ -354,7 +336,7 @@ "step": 10 }, { @@ -105,7 +94,7 @@ "format": "table", "instant": true, "intervalFactor": 2, -@@ -339,7 +345,7 @@ +@@ -363,7 +345,7 @@ "step": 10 }, { @@ -114,7 +103,7 @@ "format": "table", "instant": true, "intervalFactor": 2, -@@ -348,7 +354,7 @@ +@@ -372,7 +354,7 @@ "step": 10 }, { @@ -123,64 +112,45 @@ "format": "table", "instant": true, "intervalFactor": 2, -@@ -365,7 +371,7 @@ - "title": "CPU Quota", - "tooltip": { - "shared": false, -- "sort": 0, -+ "sort": 2, - "value_type": "individual" - }, - "transform": "table", -@@ -420,11 +426,14 @@ - "datasource": "$datasource", - "fill": 10, - "id": 3, -+ "interval": "1m", - "legend": { -+ "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, -+ "rightSide": true, - "show": true, - "total": false, - "values": false -@@ -448,7 +457,7 @@ +@@ -467,17 +449,7 @@ + "points": false, + "renderer": "flot", + "seriesOverrides": [ +- { +- "alias": "max capacity", +- "color": "#F2495C", +- "dashes": true, +- "fill": 0, +- "hiddenSeries": true, +- "hideTooltip": true, +- "legend": true, +- "linewidth": 2, +- "stack": false +- } ++ + ], + "spaceLength": 10, + "span": 12, +@@ -485,17 +457,9 @@ "steppedLine": false, "targets": [ { -- "expr": "sum(node_namespace_pod_container:container_memory_working_set_bytes{cluster=\"$cluster\", node=~\"$node\", container!=\"\"}) by (pod)", +- "expr": "sum(kube_node_status_capacity{cluster=\"$cluster\", node=~\"$node\", resource=\"memory\"})", + "expr": "sum(node_namespace_pod_container:container_memory_working_set_bytes{node=~\"$node\", container!=\"\"}) by (pod)", "format": "time_series", "intervalFactor": 2, +- "legendFormat": "max capacity", +- "legendLink": null, +- "step": 10 +- }, +- { +- "expr": "sum(node_namespace_pod_container:container_memory_working_set_bytes{cluster=\"$cluster\", node=~\"$node\", container!=\"\"}) by (pod)", +- "format": "time_series", +- "intervalFactor": 2, "legendFormat": "{{`{{`}}pod{{`}}`}}", -@@ -464,7 +473,7 @@ - "title": "Memory Usage (w/o cache)", - "tooltip": { - "shared": false, -- "sort": 0, -+ "sort": 2, - "value_type": "individual" - }, - "type": "graph", -@@ -518,11 +527,14 @@ - "datasource": "$datasource", - "fill": 1, - "id": 4, -+ "interval": "1m", - "legend": { -+ "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, -+ "rightSide": true, - "show": true, - "total": false, - "values": false -@@ -740,7 +752,7 @@ + "legendLink": null, + "step": 10 +@@ -788,7 +752,7 @@ ], "targets": [ { @@ -189,7 +159,7 @@ "format": "table", "instant": true, "intervalFactor": 2, -@@ -749,7 +761,7 @@ +@@ -797,7 +761,7 @@ "step": 10 }, { @@ -198,7 +168,7 @@ "format": "table", "instant": true, "intervalFactor": 2, -@@ -758,7 +770,7 @@ +@@ -806,7 +770,7 @@ "step": 10 }, { @@ -207,7 +177,7 @@ "format": "table", "instant": true, "intervalFactor": 2, -@@ -767,7 +779,7 @@ +@@ -815,7 +779,7 @@ "step": 10 }, { @@ -216,7 +186,7 @@ "format": "table", "instant": true, "intervalFactor": 2, -@@ -776,7 +788,7 @@ +@@ -824,7 +788,7 @@ "step": 10 }, { @@ -225,7 +195,7 @@ "format": "table", "instant": true, "intervalFactor": 2, -@@ -785,7 +797,7 @@ +@@ -833,7 +797,7 @@ "step": 10 }, { @@ -234,7 +204,7 @@ "format": "table", "instant": true, "intervalFactor": 2, -@@ -794,7 +806,7 @@ +@@ -842,7 +806,7 @@ "step": 10 }, { @@ -243,7 +213,7 @@ "format": "table", "instant": true, "intervalFactor": 2, -@@ -803,7 +815,7 @@ +@@ -851,7 +815,7 @@ "step": 10 }, { @@ -252,31 +222,7 @@ "format": "table", "instant": true, "intervalFactor": 2, -@@ -820,7 +832,7 @@ - "title": "Memory Quota", - "tooltip": { - "shared": false, -- "sort": 0, -+ "sort": 2, - "value_type": "individual" - }, - "transform": "table", -@@ -871,11 +883,11 @@ - "list": [ - { - "current": { -- "text": "default", -- "value": "default" -+ "text": "Prometheus", -+ "value": "Prometheus" - }, - "hide": 0, -- "label": null, -+ "label": "Data Source", - "name": "datasource", - "options": [ - -@@ -892,33 +904,6 @@ +@@ -940,33 +904,6 @@ "value": "" }, "datasource": "$datasource", @@ -288,7 +234,7 @@ - "options": [ - - ], -- "query": "label_values(kube_pod_info, cluster)", +- "query": "label_values(up{job=\"kube-state-metrics\"}, cluster)", - "refresh": 2, - "regex": "", - "sort": 1, @@ -310,11 +256,11 @@ "hide": 0, "includeAll": false, "label": null, -@@ -927,7 +912,7 @@ +@@ -975,7 +912,7 @@ "options": [ ], -- "query": "label_values(kube_pod_info{cluster=\"$cluster\"}, node)", +- "query": "label_values(kube_node_info{cluster=\"$cluster\"}, node)", + "query": "label_values(kube_pod_info, node)", "refresh": 2, "regex": "", diff --git a/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-resources-pod.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-resources-pod.yaml.patch index 45b7ddd4..b380b9be 100644 --- a/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-resources-pod.yaml.patch +++ b/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-resources-pod.yaml.patch @@ -20,8 +20,7 @@ {{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} labels: {{- if $.Values.grafana.sidecar.dashboards.label }} -- {{ $.Values.grafana.sidecar.dashboards.label }}: "1" -+ {{ $.Values.grafana.sidecar.dashboards.label }}: {{ ternary $.Values.grafana.sidecar.dashboards.labelValue "1" (not (empty $.Values.grafana.sidecar.dashboards.labelValue)) | quote }} + {{ $.Values.grafana.sidecar.dashboards.label }}: {{ ternary $.Values.grafana.sidecar.dashboards.labelValue "1" (not (empty $.Values.grafana.sidecar.dashboards.labelValue)) | quote }} {{- end }} - app: {{ template "kube-prometheus-stack.name" $ }}-grafana -{{ include "kube-prometheus-stack.labels" $ | indent 4 }} @@ -30,22 +29,7 @@ data: k8s-resources-pod.json: |- { -@@ -49,11 +49,14 @@ - "datasource": "$datasource", - "fill": 10, - "id": 1, -+ "interval": "1m", - "legend": { -+ "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, -+ "rightSide": true, - "show": true, - "total": false, - "values": false -@@ -94,7 +97,7 @@ +@@ -97,7 +97,7 @@ "steppedLine": false, "targets": [ { @@ -54,82 +38,34 @@ "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}container{{`}}`}}", -@@ -102,7 +105,7 @@ +@@ -105,7 +105,7 @@ "step": 10 }, { -- "expr": "sum(\n kube_pod_container_resource_requests{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\", resource=\"cpu\"}\n)\n", +- "expr": "sum(\n kube_pod_container_resource_requests{job=\"kube-state-metrics\", cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\", resource=\"cpu\"}\n)\n", + "expr": "sum(\n kube_pod_container_resource_requests{namespace=\"$namespace\", pod=\"$pod\", resource=\"cpu\"}\n)\n", "format": "time_series", "intervalFactor": 2, "legendFormat": "requests", -@@ -110,7 +113,7 @@ +@@ -113,7 +113,7 @@ "step": 10 }, { -- "expr": "sum(\n kube_pod_container_resource_limits{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\", resource=\"cpu\"}\n)\n", +- "expr": "sum(\n kube_pod_container_resource_limits{job=\"kube-state-metrics\", cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\", resource=\"cpu\"}\n)\n", + "expr": "sum(\n kube_pod_container_resource_limits{namespace=\"$namespace\", pod=\"$pod\", resource=\"cpu\"}\n)\n", "format": "time_series", "intervalFactor": 2, "legendFormat": "limits", -@@ -126,7 +129,7 @@ - "title": "CPU Usage", - "tooltip": { - "shared": false, -- "sort": 0, -+ "sort": 2, - "value_type": "individual" - }, - "type": "graph", -@@ -180,11 +183,14 @@ - "datasource": "$datasource", - "fill": 10, - "id": 2, -+ "interval": "1m", - "legend": { -+ "alignAsTable": true, - "avg": false, - "current": true, - "max": true, - "min": false, -+ "rightSide": true, - "show": true, - "total": false, - "values": false -@@ -208,7 +214,7 @@ +@@ -214,7 +214,7 @@ "steppedLine": false, "targets": [ { -- "expr": "sum(increase(container_cpu_cfs_throttled_periods_total{namespace=\"$namespace\", pod=\"$pod\", container!=\"\", cluster=\"$cluster\"}[5m])) by (container) /sum(increase(container_cpu_cfs_periods_total{namespace=\"$namespace\", pod=\"$pod\", container!=\"\", cluster=\"$cluster\"}[5m])) by (container)", +- "expr": "sum(increase(container_cpu_cfs_throttled_periods_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", namespace=\"$namespace\", pod=\"$pod\", container!=\"\", cluster=\"$cluster\"}[$__rate_interval])) by (container) /sum(increase(container_cpu_cfs_periods_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", namespace=\"$namespace\", pod=\"$pod\", container!=\"\", cluster=\"$cluster\"}[$__rate_interval])) by (container)", + "expr": "sum(increase(container_cpu_cfs_throttled_periods_total{namespace=\"$namespace\", pod=\"$pod\", container!=\"\"}[$__rate_interval])) by (container) /sum(increase(container_cpu_cfs_periods_total{namespace=\"$namespace\", pod=\"$pod\", container!=\"\"}[$__rate_interval])) by (container)", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}container{{`}}`}}", -@@ -231,7 +237,7 @@ - "title": "CPU Throttling", - "tooltip": { - "shared": false, -- "sort": 0, -+ "sort": 2, - "value_type": "individual" - }, - "type": "graph", -@@ -285,11 +291,14 @@ - "datasource": "$datasource", - "fill": 1, - "id": 3, -+ "interval": "1m", - "legend": { -+ "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, -+ "rightSide": true, - "show": true, - "total": false, - "values": false -@@ -450,7 +459,7 @@ +@@ -459,7 +459,7 @@ ], "targets": [ { @@ -138,7 +74,7 @@ "format": "table", "instant": true, "intervalFactor": 2, -@@ -459,7 +468,7 @@ +@@ -468,7 +468,7 @@ "step": 10 }, { @@ -147,7 +83,7 @@ "format": "table", "instant": true, "intervalFactor": 2, -@@ -468,7 +477,7 @@ +@@ -477,7 +477,7 @@ "step": 10 }, { @@ -156,7 +92,7 @@ "format": "table", "instant": true, "intervalFactor": 2, -@@ -477,7 +486,7 @@ +@@ -486,7 +486,7 @@ "step": 10 }, { @@ -165,7 +101,7 @@ "format": "table", "instant": true, "intervalFactor": 2, -@@ -486,7 +495,7 @@ +@@ -495,7 +495,7 @@ "step": 10 }, { @@ -174,91 +110,43 @@ "format": "table", "instant": true, "intervalFactor": 2, -@@ -503,7 +512,7 @@ - "title": "CPU Quota", - "tooltip": { - "shared": false, -- "sort": 0, -+ "sort": 2, - "value_type": "individual" - }, - "transform": "table", -@@ -558,11 +567,14 @@ - "datasource": "$datasource", - "fill": 10, - "id": 4, -+ "interval": "1m", - "legend": { -+ "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, -+ "rightSide": true, - "show": true, - "total": false, - "values": false -@@ -605,7 +617,7 @@ +@@ -617,7 +617,7 @@ "steppedLine": false, "targets": [ { -- "expr": "sum(container_memory_working_set_bytes{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\", container!=\"\", image!=\"\"}) by (container)", +- "expr": "sum(container_memory_working_set_bytes{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\", container!=\"\", image!=\"\"}) by (container)", + "expr": "sum(container_memory_working_set_bytes{namespace=\"$namespace\", pod=\"$pod\", container!=\"\", image!=\"\"}) by (container)", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}container{{`}}`}}", -@@ -613,7 +625,7 @@ +@@ -625,7 +625,7 @@ "step": 10 }, { -- "expr": "sum(\n kube_pod_container_resource_requests{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\", resource=\"memory\"}\n)\n", +- "expr": "sum(\n kube_pod_container_resource_requests{job=\"kube-state-metrics\", cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\", resource=\"memory\"}\n)\n", + "expr": "sum(\n kube_pod_container_resource_requests{namespace=\"$namespace\", pod=\"$pod\", resource=\"memory\"}\n)\n", "format": "time_series", "intervalFactor": 2, "legendFormat": "requests", -@@ -621,7 +633,7 @@ +@@ -633,7 +633,7 @@ "step": 10 }, { -- "expr": "sum(\n kube_pod_container_resource_limits{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\", resource=\"memory\"}\n)\n", +- "expr": "sum(\n kube_pod_container_resource_limits{job=\"kube-state-metrics\", cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\", resource=\"memory\"}\n)\n", + "expr": "sum(\n kube_pod_container_resource_limits{namespace=\"$namespace\", pod=\"$pod\", resource=\"memory\"}\n)\n", "format": "time_series", "intervalFactor": 2, "legendFormat": "limits", -@@ -637,7 +649,7 @@ - "title": "Memory Usage (WSS)", - "tooltip": { - "shared": false, -- "sort": 0, -+ "sort": 2, - "value_type": "individual" - }, - "type": "graph", -@@ -691,11 +703,14 @@ - "datasource": "$datasource", - "fill": 1, - "id": 5, -+ "interval": "1m", - "legend": { -+ "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, -+ "rightSide": true, - "show": true, - "total": false, - "values": false -@@ -913,7 +928,7 @@ +@@ -928,7 +928,7 @@ ], "targets": [ { -- "expr": "sum(container_memory_working_set_bytes{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\", container!=\"\", image!=\"\"}) by (container)", +- "expr": "sum(container_memory_working_set_bytes{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\", container!=\"\", image!=\"\"}) by (container)", + "expr": "sum(container_memory_working_set_bytes{namespace=\"$namespace\", pod=\"$pod\", container!=\"\", image!=\"\"}) by (container)", "format": "table", "instant": true, "intervalFactor": 2, -@@ -922,7 +937,7 @@ +@@ -937,7 +937,7 @@ "step": 10 }, { @@ -267,16 +155,16 @@ "format": "table", "instant": true, "intervalFactor": 2, -@@ -931,7 +946,7 @@ +@@ -946,7 +946,7 @@ "step": 10 }, { -- "expr": "sum(container_memory_working_set_bytes{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\", image!=\"\"}) by (container) / sum(cluster:namespace:pod_memory:active:kube_pod_container_resource_requests{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}) by (container)", +- "expr": "sum(container_memory_working_set_bytes{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\", image!=\"\"}) by (container) / sum(cluster:namespace:pod_memory:active:kube_pod_container_resource_requests{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}) by (container)", + "expr": "sum(container_memory_working_set_bytes{namespace=\"$namespace\", pod=\"$pod\", image!=\"\"}) by (container) / sum(cluster:namespace:pod_memory:active:kube_pod_container_resource_requests{namespace=\"$namespace\", pod=\"$pod\"}) by (container)", "format": "table", "instant": true, "intervalFactor": 2, -@@ -940,7 +955,7 @@ +@@ -955,7 +955,7 @@ "step": 10 }, { @@ -285,481 +173,205 @@ "format": "table", "instant": true, "intervalFactor": 2, -@@ -949,7 +964,7 @@ +@@ -964,7 +964,7 @@ "step": 10 }, { -- "expr": "sum(container_memory_working_set_bytes{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\", container!=\"\", image!=\"\"}) by (container) / sum(cluster:namespace:pod_memory:active:kube_pod_container_resource_limits{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}) by (container)", +- "expr": "sum(container_memory_working_set_bytes{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\", container!=\"\", image!=\"\"}) by (container) / sum(cluster:namespace:pod_memory:active:kube_pod_container_resource_limits{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}) by (container)", + "expr": "sum(container_memory_working_set_bytes{namespace=\"$namespace\", pod=\"$pod\", container!=\"\", image!=\"\"}) by (container) / sum(cluster:namespace:pod_memory:active:kube_pod_container_resource_limits{namespace=\"$namespace\", pod=\"$pod\"}) by (container)", "format": "table", "instant": true, "intervalFactor": 2, -@@ -958,7 +973,7 @@ +@@ -973,7 +973,7 @@ "step": 10 }, { -- "expr": "sum(container_memory_rss{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\", container != \"\", container != \"POD\"}) by (container)", +- "expr": "sum(container_memory_rss{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\", container != \"\", container != \"POD\"}) by (container)", + "expr": "sum(container_memory_rss{namespace=\"$namespace\", pod=\"$pod\", container != \"\", container != \"POD\"}) by (container)", "format": "table", "instant": true, "intervalFactor": 2, -@@ -967,7 +982,7 @@ +@@ -982,7 +982,7 @@ "step": 10 }, { -- "expr": "sum(container_memory_cache{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\", container != \"\", container != \"POD\"}) by (container)", +- "expr": "sum(container_memory_cache{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\", container != \"\", container != \"POD\"}) by (container)", + "expr": "sum(container_memory_cache{namespace=\"$namespace\", pod=\"$pod\", container != \"\", container != \"POD\"}) by (container)", "format": "table", "instant": true, "intervalFactor": 2, -@@ -976,7 +991,7 @@ +@@ -991,7 +991,7 @@ "step": 10 }, { -- "expr": "sum(container_memory_swap{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\", container != \"\", container != \"POD\"}) by (container)", +- "expr": "sum(container_memory_swap{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\", container != \"\", container != \"POD\"}) by (container)", + "expr": "sum(container_memory_swap{namespace=\"$namespace\", pod=\"$pod\", container != \"\", container != \"POD\"}) by (container)", "format": "table", "instant": true, "intervalFactor": 2, -@@ -993,7 +1008,7 @@ - "title": "Memory Quota", - "tooltip": { - "shared": false, -- "sort": 0, -+ "sort": 2, - "value_type": "individual" - }, - "transform": "table", -@@ -1050,10 +1065,12 @@ - "id": 6, - "interval": "1m", - "legend": { -+ "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, -+ "rightSide": true, - "show": true, - "total": false, - "values": false -@@ -1077,7 +1094,7 @@ +@@ -1094,7 +1094,7 @@ "steppedLine": false, "targets": [ { -- "expr": "sum(irate(container_network_receive_bytes_total{cluster=\"$cluster\", namespace=~\"$namespace\", pod=~\"$pod\"}[$__rate_interval])) by (pod)", +- "expr": "sum(irate(container_network_receive_bytes_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=\"$namespace\", pod=~\"$pod\"}[$__rate_interval])) by (pod)", + "expr": "sum(irate(container_network_receive_bytes_total{namespace=\"$namespace\", pod=~\"$pod\"}[$__rate_interval])) by (pod)", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}pod{{`}}`}}", -@@ -1093,7 +1110,7 @@ - "title": "Receive Bandwidth", - "tooltip": { - "shared": false, -- "sort": 0, -+ "sort": 2, - "value_type": "individual" - }, - "type": "graph", -@@ -1137,10 +1154,12 @@ - "id": 7, - "interval": "1m", - "legend": { -+ "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, -+ "rightSide": true, - "show": true, - "total": false, - "values": false -@@ -1164,7 +1183,7 @@ +@@ -1183,7 +1183,7 @@ "steppedLine": false, "targets": [ { -- "expr": "sum(irate(container_network_transmit_bytes_total{cluster=\"$cluster\", namespace=~\"$namespace\", pod=~\"$pod\"}[$__rate_interval])) by (pod)", +- "expr": "sum(irate(container_network_transmit_bytes_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=\"$namespace\", pod=~\"$pod\"}[$__rate_interval])) by (pod)", + "expr": "sum(irate(container_network_transmit_bytes_total{namespace=\"$namespace\", pod=~\"$pod\"}[$__rate_interval])) by (pod)", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}pod{{`}}`}}", -@@ -1180,7 +1199,7 @@ - "title": "Transmit Bandwidth", - "tooltip": { - "shared": false, -- "sort": 0, -+ "sort": 2, - "value_type": "individual" - }, - "type": "graph", -@@ -1236,10 +1255,12 @@ - "id": 8, - "interval": "1m", - "legend": { -+ "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, -+ "rightSide": true, - "show": true, - "total": false, - "values": false -@@ -1263,7 +1284,7 @@ +@@ -1284,7 +1284,7 @@ "steppedLine": false, "targets": [ { -- "expr": "sum(irate(container_network_receive_packets_total{cluster=\"$cluster\", namespace=~\"$namespace\", pod=~\"$pod\"}[$__rate_interval])) by (pod)", +- "expr": "sum(irate(container_network_receive_packets_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=\"$namespace\", pod=~\"$pod\"}[$__rate_interval])) by (pod)", + "expr": "sum(irate(container_network_receive_packets_total{namespace=\"$namespace\", pod=~\"$pod\"}[$__rate_interval])) by (pod)", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}pod{{`}}`}}", -@@ -1279,7 +1300,7 @@ - "title": "Rate of Received Packets", - "tooltip": { - "shared": false, -- "sort": 0, -+ "sort": 2, - "value_type": "individual" - }, - "type": "graph", -@@ -1323,10 +1344,12 @@ - "id": 9, - "interval": "1m", - "legend": { -+ "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, -+ "rightSide": true, - "show": true, - "total": false, - "values": false -@@ -1350,7 +1373,7 @@ +@@ -1373,7 +1373,7 @@ "steppedLine": false, "targets": [ { -- "expr": "sum(irate(container_network_transmit_packets_total{cluster=\"$cluster\", namespace=~\"$namespace\", pod=~\"$pod\"}[$__rate_interval])) by (pod)", +- "expr": "sum(irate(container_network_transmit_packets_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=\"$namespace\", pod=~\"$pod\"}[$__rate_interval])) by (pod)", + "expr": "sum(irate(container_network_transmit_packets_total{namespace=\"$namespace\", pod=~\"$pod\"}[$__rate_interval])) by (pod)", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}pod{{`}}`}}", -@@ -1366,7 +1389,7 @@ - "title": "Rate of Transmitted Packets", - "tooltip": { - "shared": false, -- "sort": 0, -+ "sort": 2, - "value_type": "individual" - }, - "type": "graph", -@@ -1422,10 +1445,12 @@ - "id": 10, - "interval": "1m", - "legend": { -+ "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, -+ "rightSide": true, - "show": true, - "total": false, - "values": false -@@ -1449,7 +1474,7 @@ +@@ -1474,7 +1474,7 @@ "steppedLine": false, "targets": [ { -- "expr": "sum(irate(container_network_receive_packets_dropped_total{cluster=\"$cluster\", namespace=~\"$namespace\", pod=~\"$pod\"}[$__rate_interval])) by (pod)", +- "expr": "sum(irate(container_network_receive_packets_dropped_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=\"$namespace\", pod=~\"$pod\"}[$__rate_interval])) by (pod)", + "expr": "sum(irate(container_network_receive_packets_dropped_total{namespace=\"$namespace\", pod=~\"$pod\"}[$__rate_interval])) by (pod)", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}pod{{`}}`}}", -@@ -1465,7 +1490,7 @@ - "title": "Rate of Received Packets Dropped", - "tooltip": { - "shared": false, -- "sort": 0, -+ "sort": 2, - "value_type": "individual" - }, - "type": "graph", -@@ -1509,10 +1534,12 @@ - "id": 11, - "interval": "1m", - "legend": { -+ "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, -+ "rightSide": true, - "show": true, - "total": false, - "values": false -@@ -1536,7 +1563,7 @@ +@@ -1563,7 +1563,7 @@ "steppedLine": false, "targets": [ { -- "expr": "sum(irate(container_network_transmit_packets_dropped_total{cluster=\"$cluster\", namespace=~\"$namespace\", pod=~\"$pod\"}[$__rate_interval])) by (pod)", +- "expr": "sum(irate(container_network_transmit_packets_dropped_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=\"$namespace\", pod=~\"$pod\"}[$__rate_interval])) by (pod)", + "expr": "sum(irate(container_network_transmit_packets_dropped_total{namespace=\"$namespace\", pod=~\"$pod\"}[$__rate_interval])) by (pod)", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}pod{{`}}`}}", -@@ -1552,7 +1579,7 @@ - "title": "Rate of Transmitted Packets Dropped", - "tooltip": { - "shared": false, -- "sort": 0, -+ "sort": 2, - "value_type": "individual" - }, - "type": "graph", -@@ -1607,11 +1634,14 @@ - "decimals": -1, - "fill": 10, - "id": 12, -+ "interval": "1m", - "legend": { -+ "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, -+ "rightSide": true, - "show": true, - "total": false, - "values": false -@@ -1635,7 +1665,7 @@ +@@ -1665,7 +1665,7 @@ "steppedLine": false, "targets": [ { -- "expr": "ceil(sum by(pod) (rate(container_fs_reads_total{container!=\"\", cluster=\"$cluster\",namespace=~\"$namespace\", pod=~\"$pod\"}[5m])))", +- "expr": "ceil(sum by(pod) (rate(container_fs_reads_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", container!=\"\", cluster=\"$cluster\", namespace=\"$namespace\", pod=~\"$pod\"}[$__rate_interval])))", + "expr": "ceil(sum by(pod) (rate(container_fs_reads_total{device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", container!=\"\", namespace=\"$namespace\", pod=~\"$pod\"}[$__rate_interval])))", "format": "time_series", "intervalFactor": 2, "legendFormat": "Reads", -@@ -1643,7 +1673,7 @@ +@@ -1673,7 +1673,7 @@ "step": 10 }, { -- "expr": "ceil(sum by(pod) (rate(container_fs_writes_total{container!=\"\", cluster=\"$cluster\",namespace=~\"$namespace\", pod=~\"$pod\"}[5m])))", +- "expr": "ceil(sum by(pod) (rate(container_fs_writes_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", container!=\"\", cluster=\"$cluster\",namespace=\"$namespace\", pod=~\"$pod\"}[$__rate_interval])))", + "expr": "ceil(sum by(pod) (rate(container_fs_writes_total{device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", container!=\"\", namespace=\"$namespace\", pod=~\"$pod\"}[$__rate_interval])))", "format": "time_series", "intervalFactor": 2, "legendFormat": "Writes", -@@ -1659,7 +1689,7 @@ - "title": "IOPS", - "tooltip": { - "shared": false, -- "sort": 0, -+ "sort": 2, - "value_type": "individual" - }, - "type": "graph", -@@ -1701,11 +1731,14 @@ - "datasource": "$datasource", - "fill": 10, - "id": 13, -+ "interval": "1m", - "legend": { -+ "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, -+ "rightSide": true, - "show": true, - "total": false, - "values": false -@@ -1729,7 +1762,7 @@ +@@ -1762,7 +1762,7 @@ "steppedLine": false, "targets": [ { -- "expr": "sum by(pod) (rate(container_fs_reads_bytes_total{container!=\"\", cluster=\"$cluster\",namespace=~\"$namespace\", pod=~\"$pod\"}[5m]))", +- "expr": "sum by(pod) (rate(container_fs_reads_bytes_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", container!=\"\", cluster=\"$cluster\", namespace=\"$namespace\", pod=~\"$pod\"}[$__rate_interval]))", + "expr": "sum by(pod) (rate(container_fs_reads_bytes_total{device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", container!=\"\", namespace=\"$namespace\", pod=~\"$pod\"}[$__rate_interval]))", "format": "time_series", "intervalFactor": 2, "legendFormat": "Reads", -@@ -1737,7 +1770,7 @@ +@@ -1770,7 +1770,7 @@ "step": 10 }, { -- "expr": "sum by(pod) (rate(container_fs_writes_bytes_total{container!=\"\", cluster=\"$cluster\",namespace=~\"$namespace\", pod=~\"$pod\"}[5m]))", +- "expr": "sum by(pod) (rate(container_fs_writes_bytes_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", container!=\"\", cluster=\"$cluster\", namespace=\"$namespace\", pod=~\"$pod\"}[$__rate_interval]))", + "expr": "sum by(pod) (rate(container_fs_writes_bytes_total{device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", container!=\"\", namespace=\"$namespace\", pod=~\"$pod\"}[$__rate_interval]))", "format": "time_series", "intervalFactor": 2, "legendFormat": "Writes", -@@ -1753,7 +1786,7 @@ - "title": "ThroughPut", - "tooltip": { - "shared": false, -- "sort": 0, -+ "sort": 2, - "value_type": "individual" - }, - "type": "graph", -@@ -1808,11 +1841,14 @@ - "decimals": -1, - "fill": 10, - "id": 14, -+ "interval": "1m", - "legend": { -+ "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, -+ "rightSide": true, - "show": true, - "total": false, - "values": false -@@ -1836,7 +1872,7 @@ +@@ -1872,7 +1872,7 @@ "steppedLine": false, "targets": [ { -- "expr": "ceil(sum by(container) (rate(container_fs_reads_total{container!=\"\", cluster=\"$cluster\",namespace=~\"$namespace\", pod=\"$pod\"}[5m]) + rate(container_fs_writes_total{container!=\"\", cluster=\"$cluster\",namespace=~\"$namespace\", pod=\"$pod\"}[5m])))", +- "expr": "ceil(sum by(container) (rate(container_fs_reads_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", container!=\"\", cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}[$__rate_interval]) + rate(container_fs_writes_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", container!=\"\", cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}[$__rate_interval])))", + "expr": "ceil(sum by(container) (rate(container_fs_reads_total{container!=\"\", namespace=\"$namespace\", pod=\"$pod\"}[$__rate_interval]) + rate(container_fs_writes_total{container!=\"\", namespace=\"$namespace\", pod=\"$pod\"}[$__rate_interval])))", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}container{{`}}`}}", -@@ -1852,7 +1888,7 @@ - "title": "IOPS(Reads+Writes)", - "tooltip": { - "shared": false, -- "sort": 0, -+ "sort": 2, - "value_type": "individual" - }, - "type": "graph", -@@ -1894,11 +1930,14 @@ - "datasource": "$datasource", - "fill": 10, - "id": 15, -+ "interval": "1m", - "legend": { -+ "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, -+ "rightSide": true, - "show": true, - "total": false, - "values": false -@@ -1922,7 +1961,7 @@ +@@ -1961,7 +1961,7 @@ "steppedLine": false, "targets": [ { -- "expr": "sum by(container) (rate(container_fs_reads_bytes_total{container!=\"\", cluster=\"$cluster\",namespace=~\"$namespace\", pod=\"$pod\"}[5m]) + rate(container_fs_writes_bytes_total{container!=\"\", cluster=\"$cluster\",namespace=~\"$namespace\", pod=\"$pod\"}[5m]))", +- "expr": "sum by(container) (rate(container_fs_reads_bytes_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", container!=\"\", cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}[$__rate_interval]) + rate(container_fs_writes_bytes_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", container!=\"\", cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}[$__rate_interval]))", + "expr": "sum by(container) (rate(container_fs_reads_bytes_total{container!=\"\", namespace=\"$namespace\", pod=\"$pod\"}[$__rate_interval]) + rate(container_fs_writes_bytes_total{container!=\"\", namespace=\"$namespace\", pod=\"$pod\"}[$__rate_interval]))", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}container{{`}}`}}", -@@ -1938,7 +1977,7 @@ - "title": "ThroughPut(Read+Write)", - "tooltip": { - "shared": false, -- "sort": 0, -+ "sort": 2, - "value_type": "individual" - }, - "type": "graph", -@@ -1992,11 +2031,14 @@ - "datasource": "$datasource", - "fill": 1, - "id": 16, -+ "interval": "1m", - "legend": { -+ "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, -+ "rightSide": true, - "show": true, - "total": false, - "values": false -@@ -2180,7 +2222,7 @@ +@@ -2222,7 +2222,7 @@ ], "targets": [ { -- "expr": "sum by(container) (rate(container_fs_reads_total{container!=\"\", cluster=\"$cluster\",namespace=~\"$namespace\", pod=\"$pod\"}[5m]))", +- "expr": "sum by(container) (rate(container_fs_reads_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", container!=\"\", cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}[$__rate_interval]))", + "expr": "sum by(container) (rate(container_fs_reads_total{device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", container!=\"\", namespace=\"$namespace\", pod=\"$pod\"}[$__rate_interval]))", "format": "table", "instant": true, "intervalFactor": 2, -@@ -2189,7 +2231,7 @@ +@@ -2231,7 +2231,7 @@ "step": 10 }, { -- "expr": "sum by(container) (rate(container_fs_writes_total{container!=\"\", cluster=\"$cluster\",namespace=~\"$namespace\", pod=\"$pod\"}[5m]))", +- "expr": "sum by(container) (rate(container_fs_writes_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\",device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", container!=\"\", cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}[$__rate_interval]))", + "expr": "sum by(container) (rate(container_fs_writes_total{device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", container!=\"\", namespace=\"$namespace\", pod=\"$pod\"}[$__rate_interval]))", "format": "table", "instant": true, "intervalFactor": 2, -@@ -2198,7 +2240,7 @@ +@@ -2240,7 +2240,7 @@ "step": 10 }, { -- "expr": "sum by(container) (rate(container_fs_reads_total{container!=\"\", cluster=\"$cluster\",namespace=~\"$namespace\", pod=\"$pod\"}[5m]) + rate(container_fs_writes_total{container!=\"\", cluster=\"$cluster\",namespace=~\"$namespace\", pod=\"$pod\"}[5m]))", +- "expr": "sum by(container) (rate(container_fs_reads_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", container!=\"\", cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}[$__rate_interval]) + rate(container_fs_writes_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", container!=\"\", cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}[$__rate_interval]))", + "expr": "sum by(container) (rate(container_fs_reads_total{device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", container!=\"\", namespace=\"$namespace\", pod=\"$pod\"}[$__rate_interval]) + rate(container_fs_writes_total{container!=\"\", namespace=\"$namespace\", pod=\"$pod\"}[$__rate_interval]))", "format": "table", "instant": true, "intervalFactor": 2, -@@ -2207,7 +2249,7 @@ +@@ -2249,7 +2249,7 @@ "step": 10 }, { -- "expr": "sum by(container) (rate(container_fs_reads_bytes_total{container!=\"\", cluster=\"$cluster\",namespace=~\"$namespace\", pod=\"$pod\"}[5m]))", +- "expr": "sum by(container) (rate(container_fs_reads_bytes_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", container!=\"\", cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}[$__rate_interval]))", + "expr": "sum by(container) (rate(container_fs_reads_bytes_total{device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", container!=\"\", namespace=\"$namespace\", pod=\"$pod\"}[$__rate_interval]))", "format": "table", "instant": true, "intervalFactor": 2, -@@ -2216,7 +2258,7 @@ +@@ -2258,7 +2258,7 @@ "step": 10 }, { -- "expr": "sum by(container) (rate(container_fs_writes_bytes_total{container!=\"\", cluster=\"$cluster\",namespace=~\"$namespace\", pod=\"$pod\"}[5m]))", +- "expr": "sum by(container) (rate(container_fs_writes_bytes_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", container!=\"\", cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}[$__rate_interval]))", + "expr": "sum by(container) (rate(container_fs_writes_bytes_total{device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", container!=\"\", namespace=\"$namespace\", pod=\"$pod\"}[$__rate_interval]))", "format": "table", "instant": true, "intervalFactor": 2, -@@ -2225,7 +2267,7 @@ +@@ -2267,7 +2267,7 @@ "step": 10 }, { -- "expr": "sum by(container) (rate(container_fs_reads_bytes_total{container!=\"\", cluster=\"$cluster\",namespace=~\"$namespace\", pod=\"$pod\"}[5m]) + rate(container_fs_writes_bytes_total{container!=\"\", cluster=\"$cluster\",namespace=~\"$namespace\", pod=\"$pod\"}[5m]))", +- "expr": "sum by(container) (rate(container_fs_reads_bytes_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", container!=\"\", cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}[$__rate_interval]) + rate(container_fs_writes_bytes_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", container!=\"\", cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}[$__rate_interval]))", + "expr": "sum by(container) (rate(container_fs_reads_bytes_total{device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", container!=\"\", namespace=\"$namespace\", pod=\"$pod\"}[$__rate_interval]) + rate(container_fs_writes_bytes_total{container!=\"\", namespace=\"$namespace\", pod=\"$pod\"}[$__rate_interval]))", "format": "table", "instant": true, "intervalFactor": 2, -@@ -2242,7 +2284,7 @@ - "title": "Current Storage IO", - "tooltip": { - "shared": false, -- "sort": 0, -+ "sort": 2, - "value_type": "individual" - }, - "transform": "table", -@@ -2293,11 +2335,11 @@ - "list": [ - { - "current": { -- "text": "default", -- "value": "default" -+ "text": "Prometheus", -+ "value": "Prometheus" - }, - "hide": 0, -- "label": null, -+ "label": "Data Source", - "name": "datasource", - "options": [ - -@@ -2314,33 +2356,6 @@ +@@ -2356,33 +2356,6 @@ "value": "" }, "datasource": "$datasource", @@ -771,7 +383,7 @@ - "options": [ - - ], -- "query": "label_values(kube_pod_info, cluster)", +- "query": "label_values(up{job=\"kube-state-metrics\"}, cluster)", - "refresh": 2, - "regex": "", - "sort": 1, @@ -793,20 +405,20 @@ "hide": 0, "includeAll": false, "label": null, -@@ -2349,7 +2364,7 @@ +@@ -2391,7 +2364,7 @@ "options": [ ], -- "query": "label_values(kube_pod_info{cluster=\"$cluster\"}, namespace)", +- "query": "label_values(kube_namespace_status_phase{job=\"kube-state-metrics\", cluster=\"$cluster\"}, namespace)", + "query": "label_values(kube_pod_info, namespace)", "refresh": 2, "regex": "", "sort": 1, -@@ -2376,7 +2391,7 @@ +@@ -2418,7 +2391,7 @@ "options": [ ], -- "query": "label_values(kube_pod_info{cluster=\"$cluster\", namespace=\"$namespace\"}, pod)", +- "query": "label_values(kube_pod_info{job=\"kube-state-metrics\", cluster=\"$cluster\", namespace=\"$namespace\"}, pod)", + "query": "label_values(kube_pod_info{namespace=\"$namespace\"}, pod)", "refresh": 2, "regex": "", diff --git a/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-resources-workload.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-resources-workload.yaml.patch index e989c366..5aa32848 100644 --- a/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-resources-workload.yaml.patch +++ b/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-resources-workload.yaml.patch @@ -20,8 +20,7 @@ {{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} labels: {{- if $.Values.grafana.sidecar.dashboards.label }} -- {{ $.Values.grafana.sidecar.dashboards.label }}: "1" -+ {{ $.Values.grafana.sidecar.dashboards.label }}: {{ ternary $.Values.grafana.sidecar.dashboards.labelValue "1" (not (empty $.Values.grafana.sidecar.dashboards.labelValue)) | quote }} + {{ $.Values.grafana.sidecar.dashboards.label }}: {{ ternary $.Values.grafana.sidecar.dashboards.labelValue "1" (not (empty $.Values.grafana.sidecar.dashboards.labelValue)) | quote }} {{- end }} - app: {{ template "kube-prometheus-stack.name" $ }}-grafana -{{ include "kube-prometheus-stack.labels" $ | indent 4 }} @@ -30,22 +29,7 @@ data: k8s-resources-workload.json: |- { -@@ -49,11 +49,14 @@ - "datasource": "$datasource", - "fill": 10, - "id": 1, -+ "interval": "1m", - "legend": { -+ "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, -+ "rightSide": true, - "show": true, - "total": false, - "values": false -@@ -77,7 +80,7 @@ +@@ -80,7 +80,7 @@ "steppedLine": false, "targets": [ { @@ -54,40 +38,7 @@ "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}pod{{`}}`}}", -@@ -93,7 +96,7 @@ - "title": "CPU Usage", - "tooltip": { - "shared": false, -- "sort": 0, -+ "sort": 2, - "value_type": "individual" - }, - "type": "graph", -@@ -147,11 +150,14 @@ - "datasource": "$datasource", - "fill": 1, - "id": 2, -+ "interval": "1m", - "legend": { -+ "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, -+ "rightSide": true, - "show": true, - "total": false, - "values": false -@@ -286,7 +292,7 @@ - "link": true, - "linkTargetBlank": false, - "linkTooltip": "Drill down", -- "linkUrl": "/d/6581e46e4e5c7ba40a07646395ef7b23/k8s-resources-pod?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$namespace&var-pod=$__cell", -+ "linkUrl": "d/6581e46e4e5c7ba40a07646395ef7b23/k8s-resources-pod?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$namespace&var-pod=$__cell", - "pattern": "pod", - "thresholds": [ - -@@ -312,7 +318,7 @@ +@@ -318,7 +318,7 @@ ], "targets": [ { @@ -96,67 +47,43 @@ "format": "table", "instant": true, "intervalFactor": 2, -@@ -321,7 +327,7 @@ +@@ -327,7 +327,7 @@ "step": 10 }, { -- "expr": "sum(\n kube_pod_container_resource_requests{cluster=\"$cluster\", namespace=\"$namespace\", resource=\"cpu\"}\n * on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n", +- "expr": "sum(\n kube_pod_container_resource_requests{job=\"kube-state-metrics\", cluster=\"$cluster\", namespace=\"$namespace\", resource=\"cpu\"}\n * on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n", + "expr": "sum(\n kube_pod_container_resource_requests{namespace=\"$namespace\", resource=\"cpu\"}\n * on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n", "format": "table", "instant": true, "intervalFactor": 2, -@@ -330,7 +336,7 @@ +@@ -336,7 +336,7 @@ "step": 10 }, { -- "expr": "sum(\n node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate{cluster=\"$cluster\", namespace=\"$namespace\"}\n * on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n/sum(\n kube_pod_container_resource_requests{cluster=\"$cluster\", namespace=\"$namespace\", resource=\"cpu\"}\n * on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n", +- "expr": "sum(\n node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate{cluster=\"$cluster\", namespace=\"$namespace\"}\n * on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n/sum(\n kube_pod_container_resource_requests{job=\"kube-state-metrics\", cluster=\"$cluster\", namespace=\"$namespace\", resource=\"cpu\"}\n * on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n", + "expr": "sum(\n node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate{namespace=\"$namespace\"}\n * on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n/sum(\n kube_pod_container_resource_requests{namespace=\"$namespace\", resource=\"cpu\"}\n * on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n", "format": "table", "instant": true, "intervalFactor": 2, -@@ -339,7 +345,7 @@ +@@ -345,7 +345,7 @@ "step": 10 }, { -- "expr": "sum(\n kube_pod_container_resource_limits{cluster=\"$cluster\", namespace=\"$namespace\", resource=\"cpu\"}\n * on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n", +- "expr": "sum(\n kube_pod_container_resource_limits{job=\"kube-state-metrics\", cluster=\"$cluster\", namespace=\"$namespace\", resource=\"cpu\"}\n * on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n", + "expr": "sum(\n kube_pod_container_resource_limits{namespace=\"$namespace\", resource=\"cpu\"}\n * on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n", "format": "table", "instant": true, "intervalFactor": 2, -@@ -348,7 +354,7 @@ +@@ -354,7 +354,7 @@ "step": 10 }, { -- "expr": "sum(\n node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate{cluster=\"$cluster\", namespace=\"$namespace\"}\n * on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n/sum(\n kube_pod_container_resource_limits{cluster=\"$cluster\", namespace=\"$namespace\", resource=\"cpu\"}\n * on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n", +- "expr": "sum(\n node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate{cluster=\"$cluster\", namespace=\"$namespace\"}\n * on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n/sum(\n kube_pod_container_resource_limits{job=\"kube-state-metrics\", cluster=\"$cluster\", namespace=\"$namespace\", resource=\"cpu\"}\n * on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n", + "expr": "sum(\n node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate{namespace=\"$namespace\"}\n * on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n/sum(\n kube_pod_container_resource_limits{namespace=\"$namespace\", resource=\"cpu\"}\n * on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n", "format": "table", "instant": true, "intervalFactor": 2, -@@ -365,7 +371,7 @@ - "title": "CPU Quota", - "tooltip": { - "shared": false, -- "sort": 0, -+ "sort": 2, - "value_type": "individual" - }, - "transform": "table", -@@ -420,11 +426,14 @@ - "datasource": "$datasource", - "fill": 10, - "id": 3, -+ "interval": "1m", - "legend": { -+ "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, -+ "rightSide": true, - "show": true, - "total": false, - "values": false -@@ -448,7 +457,7 @@ +@@ -457,7 +457,7 @@ "steppedLine": false, "targets": [ { @@ -165,40 +92,7 @@ "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}pod{{`}}`}}", -@@ -464,7 +473,7 @@ - "title": "Memory Usage", - "tooltip": { - "shared": false, -- "sort": 0, -+ "sort": 2, - "value_type": "individual" - }, - "type": "graph", -@@ -518,11 +527,14 @@ - "datasource": "$datasource", - "fill": 1, - "id": 4, -+ "interval": "1m", - "legend": { -+ "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, -+ "rightSide": true, - "show": true, - "total": false, - "values": false -@@ -657,7 +669,7 @@ - "link": true, - "linkTargetBlank": false, - "linkTooltip": "Drill down", -- "linkUrl": "/d/6581e46e4e5c7ba40a07646395ef7b23/k8s-resources-pod?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$namespace&var-pod=$__cell", -+ "linkUrl": "d/6581e46e4e5c7ba40a07646395ef7b23/k8s-resources-pod?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$namespace&var-pod=$__cell", - "pattern": "pod", - "thresholds": [ - -@@ -683,7 +695,7 @@ +@@ -695,7 +695,7 @@ ], "targets": [ { @@ -207,416 +101,169 @@ "format": "table", "instant": true, "intervalFactor": 2, -@@ -692,7 +704,7 @@ +@@ -704,7 +704,7 @@ "step": 10 }, { -- "expr": "sum(\n kube_pod_container_resource_requests{cluster=\"$cluster\", namespace=\"$namespace\", resource=\"memory\"}\n * on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n", +- "expr": "sum(\n kube_pod_container_resource_requests{job=\"kube-state-metrics\", cluster=\"$cluster\", namespace=\"$namespace\", resource=\"memory\"}\n * on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n", + "expr": "sum(\n kube_pod_container_resource_requests{namespace=\"$namespace\", resource=\"memory\"}\n * on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n", "format": "table", "instant": true, "intervalFactor": 2, -@@ -701,7 +713,7 @@ +@@ -713,7 +713,7 @@ "step": 10 }, { -- "expr": "sum(\n container_memory_working_set_bytes{cluster=\"$cluster\", namespace=\"$namespace\", container!=\"\", image!=\"\"}\n * on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n/sum(\n kube_pod_container_resource_requests{cluster=\"$cluster\", namespace=\"$namespace\", resource=\"memory\"}\n * on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n", +- "expr": "sum(\n container_memory_working_set_bytes{cluster=\"$cluster\", namespace=\"$namespace\", container!=\"\", image!=\"\"}\n * on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n/sum(\n kube_pod_container_resource_requests{job=\"kube-state-metrics\", cluster=\"$cluster\", namespace=\"$namespace\", resource=\"memory\"}\n * on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n", + "expr": "sum(\n container_memory_working_set_bytes{namespace=\"$namespace\", container!=\"\", image!=\"\"}\n * on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n/sum(\n kube_pod_container_resource_requests{namespace=\"$namespace\", resource=\"memory\"}\n * on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n", "format": "table", "instant": true, "intervalFactor": 2, -@@ -710,7 +722,7 @@ +@@ -722,7 +722,7 @@ "step": 10 }, { -- "expr": "sum(\n kube_pod_container_resource_limits{cluster=\"$cluster\", namespace=\"$namespace\", resource=\"memory\"}\n * on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n", +- "expr": "sum(\n kube_pod_container_resource_limits{job=\"kube-state-metrics\", cluster=\"$cluster\", namespace=\"$namespace\", resource=\"memory\"}\n * on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n", + "expr": "sum(\n kube_pod_container_resource_limits{namespace=\"$namespace\", resource=\"memory\"}\n * on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n", "format": "table", "instant": true, "intervalFactor": 2, -@@ -719,7 +731,7 @@ +@@ -731,7 +731,7 @@ "step": 10 }, { -- "expr": "sum(\n container_memory_working_set_bytes{cluster=\"$cluster\", namespace=\"$namespace\", container!=\"\", image!=\"\"}\n * on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n/sum(\n kube_pod_container_resource_limits{cluster=\"$cluster\", namespace=\"$namespace\", resource=\"memory\"}\n * on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n", +- "expr": "sum(\n container_memory_working_set_bytes{cluster=\"$cluster\", namespace=\"$namespace\", container!=\"\", image!=\"\"}\n * on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n/sum(\n kube_pod_container_resource_limits{job=\"kube-state-metrics\", cluster=\"$cluster\", namespace=\"$namespace\", resource=\"memory\"}\n * on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n", + "expr": "sum(\n container_memory_working_set_bytes{namespace=\"$namespace\", container!=\"\", image!=\"\"}\n * on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n/sum(\n kube_pod_container_resource_limits{namespace=\"$namespace\", resource=\"memory\"}\n * on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n", "format": "table", "instant": true, "intervalFactor": 2, -@@ -736,7 +748,7 @@ - "title": "Memory Quota", - "tooltip": { - "shared": false, -- "sort": 0, -+ "sort": 2, - "value_type": "individual" - }, - "transform": "table", -@@ -793,10 +805,12 @@ - "id": 5, - "interval": "1m", - "legend": { -+ "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, -+ "rightSide": true, - "show": true, - "total": false, - "values": false -@@ -950,7 +964,7 @@ - "link": true, - "linkTargetBlank": false, - "linkTooltip": "Drill down", -- "linkUrl": "/d/6581e46e4e5c7ba40a07646395ef7b23/k8s-resources-pod?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$namespace&var-pod=$__cell", -+ "linkUrl": "d/6581e46e4e5c7ba40a07646395ef7b23/k8s-resources-pod?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$namespace&var-pod=$__cell", - "pattern": "pod", - "thresholds": [ - -@@ -976,7 +990,7 @@ +@@ -990,7 +990,7 @@ ], "targets": [ { -- "expr": "(sum(irate(container_network_receive_bytes_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=~\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", +- "expr": "(sum(irate(container_network_receive_bytes_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", + "expr": "(sum(irate(container_network_receive_bytes_total{namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", "format": "table", "instant": true, "intervalFactor": 2, -@@ -985,7 +999,7 @@ +@@ -999,7 +999,7 @@ "step": 10 }, { -- "expr": "(sum(irate(container_network_transmit_bytes_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=~\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", +- "expr": "(sum(irate(container_network_transmit_bytes_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", + "expr": "(sum(irate(container_network_transmit_bytes_total{namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", "format": "table", "instant": true, "intervalFactor": 2, -@@ -994,7 +1008,7 @@ +@@ -1008,7 +1008,7 @@ "step": 10 }, { -- "expr": "(sum(irate(container_network_receive_packets_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=~\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", +- "expr": "(sum(irate(container_network_receive_packets_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", + "expr": "(sum(irate(container_network_receive_packets_total{namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", "format": "table", "instant": true, "intervalFactor": 2, -@@ -1003,7 +1017,7 @@ +@@ -1017,7 +1017,7 @@ "step": 10 }, { -- "expr": "(sum(irate(container_network_transmit_packets_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=~\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", +- "expr": "(sum(irate(container_network_transmit_packets_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", + "expr": "(sum(irate(container_network_transmit_packets_total{namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", "format": "table", "instant": true, "intervalFactor": 2, -@@ -1012,7 +1026,7 @@ +@@ -1026,7 +1026,7 @@ "step": 10 }, { -- "expr": "(sum(irate(container_network_receive_packets_dropped_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=~\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", +- "expr": "(sum(irate(container_network_receive_packets_dropped_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", + "expr": "(sum(irate(container_network_receive_packets_dropped_total{namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", "format": "table", "instant": true, "intervalFactor": 2, -@@ -1021,7 +1035,7 @@ +@@ -1035,7 +1035,7 @@ "step": 10 }, { -- "expr": "(sum(irate(container_network_transmit_packets_dropped_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=~\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", +- "expr": "(sum(irate(container_network_transmit_packets_dropped_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", + "expr": "(sum(irate(container_network_transmit_packets_dropped_total{namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", "format": "table", "instant": true, "intervalFactor": 2, -@@ -1038,7 +1052,7 @@ - "title": "Current Network Usage", - "tooltip": { - "shared": false, -- "sort": 0, -+ "sort": 2, - "value_type": "individual" - }, - "transform": "table", -@@ -1093,11 +1107,14 @@ - "datasource": "$datasource", - "fill": 10, - "id": 6, -+ "interval": "1m", - "legend": { -+ "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, -+ "rightSide": true, - "show": true, - "total": false, - "values": false -@@ -1121,7 +1138,7 @@ +@@ -1138,7 +1138,7 @@ "steppedLine": false, "targets": [ { -- "expr": "(sum(irate(container_network_receive_bytes_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=~\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", +- "expr": "(sum(irate(container_network_receive_bytes_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", + "expr": "(sum(irate(container_network_receive_bytes_total{namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}pod{{`}}`}}", -@@ -1137,7 +1154,7 @@ - "title": "Receive Bandwidth", - "tooltip": { - "shared": false, -- "sort": 0, -+ "sort": 2, - "value_type": "individual" - }, - "type": "graph", -@@ -1179,11 +1196,14 @@ - "datasource": "$datasource", - "fill": 10, - "id": 7, -+ "interval": "1m", - "legend": { -+ "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, -+ "rightSide": true, - "show": true, - "total": false, - "values": false -@@ -1207,7 +1227,7 @@ +@@ -1227,7 +1227,7 @@ "steppedLine": false, "targets": [ { -- "expr": "(sum(irate(container_network_transmit_bytes_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=~\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", +- "expr": "(sum(irate(container_network_transmit_bytes_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", + "expr": "(sum(irate(container_network_transmit_bytes_total{namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}pod{{`}}`}}", -@@ -1223,7 +1243,7 @@ - "title": "Transmit Bandwidth", - "tooltip": { - "shared": false, -- "sort": 0, -+ "sort": 2, - "value_type": "individual" - }, - "type": "graph", -@@ -1277,11 +1297,14 @@ - "datasource": "$datasource", - "fill": 10, - "id": 8, -+ "interval": "1m", - "legend": { -+ "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, -+ "rightSide": true, - "show": true, - "total": false, - "values": false -@@ -1305,7 +1328,7 @@ +@@ -1328,7 +1328,7 @@ "steppedLine": false, "targets": [ { -- "expr": "(avg(irate(container_network_receive_bytes_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=~\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", +- "expr": "(avg(irate(container_network_receive_bytes_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", + "expr": "(avg(irate(container_network_receive_bytes_total{namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}pod{{`}}`}}", -@@ -1321,7 +1344,7 @@ - "title": "Average Container Bandwidth by Pod: Received", - "tooltip": { - "shared": false, -- "sort": 0, -+ "sort": 2, - "value_type": "individual" - }, - "type": "graph", -@@ -1363,11 +1386,14 @@ - "datasource": "$datasource", - "fill": 10, - "id": 9, -+ "interval": "1m", - "legend": { -+ "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, -+ "rightSide": true, - "show": true, - "total": false, - "values": false -@@ -1391,7 +1417,7 @@ +@@ -1417,7 +1417,7 @@ "steppedLine": false, "targets": [ { -- "expr": "(avg(irate(container_network_transmit_bytes_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=~\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", +- "expr": "(avg(irate(container_network_transmit_bytes_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", + "expr": "(avg(irate(container_network_transmit_bytes_total{namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}pod{{`}}`}}", -@@ -1407,7 +1433,7 @@ - "title": "Average Container Bandwidth by Pod: Transmitted", - "tooltip": { - "shared": false, -- "sort": 0, -+ "sort": 2, - "value_type": "individual" - }, - "type": "graph", -@@ -1461,11 +1487,14 @@ - "datasource": "$datasource", - "fill": 10, - "id": 10, -+ "interval": "1m", - "legend": { -+ "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, -+ "rightSide": true, - "show": true, - "total": false, - "values": false -@@ -1489,7 +1518,7 @@ +@@ -1518,7 +1518,7 @@ "steppedLine": false, "targets": [ { -- "expr": "(sum(irate(container_network_receive_packets_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=~\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", +- "expr": "(sum(irate(container_network_receive_packets_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", + "expr": "(sum(irate(container_network_receive_packets_total{namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}pod{{`}}`}}", -@@ -1505,7 +1534,7 @@ - "title": "Rate of Received Packets", - "tooltip": { - "shared": false, -- "sort": 0, -+ "sort": 2, - "value_type": "individual" - }, - "type": "graph", -@@ -1547,11 +1576,14 @@ - "datasource": "$datasource", - "fill": 10, - "id": 11, -+ "interval": "1m", - "legend": { -+ "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, -+ "rightSide": true, - "show": true, - "total": false, - "values": false -@@ -1575,7 +1607,7 @@ +@@ -1607,7 +1607,7 @@ "steppedLine": false, "targets": [ { -- "expr": "(sum(irate(container_network_transmit_packets_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=~\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", +- "expr": "(sum(irate(container_network_transmit_packets_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", + "expr": "(sum(irate(container_network_transmit_packets_total{namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}pod{{`}}`}}", -@@ -1591,7 +1623,7 @@ - "title": "Rate of Transmitted Packets", - "tooltip": { - "shared": false, -- "sort": 0, -+ "sort": 2, - "value_type": "individual" - }, - "type": "graph", -@@ -1645,11 +1677,14 @@ - "datasource": "$datasource", - "fill": 10, - "id": 12, -+ "interval": "1m", - "legend": { -+ "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, -+ "rightSide": true, - "show": true, - "total": false, - "values": false -@@ -1673,7 +1708,7 @@ +@@ -1708,7 +1708,7 @@ "steppedLine": false, "targets": [ { -- "expr": "(sum(irate(container_network_receive_packets_dropped_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=~\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", +- "expr": "(sum(irate(container_network_receive_packets_dropped_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", + "expr": "(sum(irate(container_network_receive_packets_dropped_total{namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}pod{{`}}`}}", -@@ -1689,7 +1724,7 @@ - "title": "Rate of Received Packets Dropped", - "tooltip": { - "shared": false, -- "sort": 0, -+ "sort": 2, - "value_type": "individual" - }, - "type": "graph", -@@ -1731,11 +1766,14 @@ - "datasource": "$datasource", - "fill": 10, - "id": 13, -+ "interval": "1m", - "legend": { -+ "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, -+ "rightSide": true, - "show": true, - "total": false, - "values": false -@@ -1759,7 +1797,7 @@ +@@ -1797,7 +1797,7 @@ "steppedLine": false, "targets": [ { -- "expr": "(sum(irate(container_network_transmit_packets_dropped_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=~\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", +- "expr": "(sum(irate(container_network_transmit_packets_dropped_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", + "expr": "(sum(irate(container_network_transmit_packets_dropped_total{namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}pod{{`}}`}}", -@@ -1775,7 +1813,7 @@ - "title": "Rate of Transmitted Packets Dropped", - "tooltip": { - "shared": false, -- "sort": 0, -+ "sort": 2, - "value_type": "individual" - }, - "type": "graph", -@@ -1825,11 +1863,11 @@ - "list": [ - { - "current": { -- "text": "default", -- "value": "default" -+ "text": "Prometheus", -+ "value": "Prometheus" - }, - "hide": 0, -- "label": null, -+ "label": "Data Source", - "name": "datasource", - "options": [ - -@@ -1846,33 +1884,6 @@ +@@ -1884,33 +1884,6 @@ "value": "" }, "datasource": "$datasource", @@ -628,7 +275,7 @@ - "options": [ - - ], -- "query": "label_values(kube_pod_info, cluster)", +- "query": "label_values(up{job=\"kube-state-metrics\"}, cluster)", - "refresh": 2, - "regex": "", - "sort": 1, @@ -650,29 +297,39 @@ "hide": 0, "includeAll": false, "label": null, -@@ -1881,7 +1892,7 @@ +@@ -1919,7 +1892,7 @@ "options": [ ], -- "query": "label_values(kube_pod_info{cluster=\"$cluster\"}, namespace)", +- "query": "label_values(kube_namespace_status_phase{job=\"kube-state-metrics\", cluster=\"$cluster\"}, namespace)", + "query": "label_values(kube_pod_info, namespace)", "refresh": 2, "regex": "", "sort": 1, -@@ -1908,7 +1919,7 @@ +@@ -1942,11 +1915,11 @@ + "includeAll": false, + "label": null, + "multi": false, +- "name": "type", ++ "name": "workload", "options": [ ], -- "query": "label_values(namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\"}, workload)", +- "query": "label_values(namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\"}, workload_type)", + "query": "label_values(namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\"}, workload)", "refresh": 2, "regex": "", "sort": 1, -@@ -1935,7 +1946,7 @@ +@@ -1969,11 +1942,11 @@ + "includeAll": false, + "label": null, + "multi": false, +- "name": "workload", ++ "name": "type", "options": [ ], -- "query": "label_values(namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload=\"$workload\"}, workload_type)", +- "query": "label_values(namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}, workload)", + "query": "label_values(namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=\"$workload\"}, workload_type)", "refresh": 2, "regex": "", diff --git a/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-resources-workloads-namespace.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-resources-workloads-namespace.yaml.patch index d718d477..c503e9c3 100644 --- a/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-resources-workloads-namespace.yaml.patch +++ b/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-resources-workloads-namespace.yaml.patch @@ -20,8 +20,7 @@ {{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} labels: {{- if $.Values.grafana.sidecar.dashboards.label }} -- {{ $.Values.grafana.sidecar.dashboards.label }}: "1" -+ {{ $.Values.grafana.sidecar.dashboards.label }}: {{ ternary $.Values.grafana.sidecar.dashboards.labelValue "1" (not (empty $.Values.grafana.sidecar.dashboards.labelValue)) | quote }} + {{ $.Values.grafana.sidecar.dashboards.label }}: {{ ternary $.Values.grafana.sidecar.dashboards.labelValue "1" (not (empty $.Values.grafana.sidecar.dashboards.labelValue)) | quote }} {{- end }} - app: {{ template "kube-prometheus-stack.name" $ }}-grafana -{{ include "kube-prometheus-stack.labels" $ | indent 4 }} @@ -30,22 +29,7 @@ data: k8s-resources-workloads-namespace.json: |- { -@@ -49,11 +49,14 @@ - "datasource": "$datasource", - "fill": 10, - "id": 1, -+ "interval": "1m", - "legend": { -+ "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, -+ "rightSide": true, - "show": true, - "total": false, - "values": false -@@ -98,7 +101,7 @@ +@@ -101,7 +101,7 @@ "steppedLine": false, "targets": [ { @@ -54,7 +38,7 @@ "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}workload{{`}}`}} - {{`{{`}}workload_type{{`}}`}}", -@@ -106,7 +109,7 @@ +@@ -109,7 +109,7 @@ "step": 10 }, { @@ -63,7 +47,7 @@ "format": "time_series", "intervalFactor": 2, "legendFormat": "quota - requests", -@@ -114,7 +117,7 @@ +@@ -117,7 +117,7 @@ "step": 10 }, { @@ -72,40 +56,7 @@ "format": "time_series", "intervalFactor": 2, "legendFormat": "quota - limits", -@@ -130,7 +133,7 @@ - "title": "CPU Usage", - "tooltip": { - "shared": false, -- "sort": 0, -+ "sort": 2, - "value_type": "individual" - }, - "type": "graph", -@@ -184,11 +187,14 @@ - "datasource": "$datasource", - "fill": 1, - "id": 2, -+ "interval": "1m", - "legend": { -+ "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, -+ "rightSide": true, - "show": true, - "total": false, - "values": false -@@ -342,7 +348,7 @@ - "link": true, - "linkTargetBlank": false, - "linkTooltip": "Drill down", -- "linkUrl": "/d/a164a7f0339f99e89cea5cb47e9be617/k8s-resources-workload?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$namespace&var-workload=$__cell&var-type=$__cell_2", -+ "linkUrl": "d/a164a7f0339f99e89cea5cb47e9be617/k8s-resources-workload?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$namespace&var-workload=$__cell&var-type=$__cell_2", - "pattern": "workload", - "thresholds": [ - -@@ -387,7 +393,7 @@ +@@ -393,7 +393,7 @@ ], "targets": [ { @@ -114,7 +65,7 @@ "format": "table", "instant": true, "intervalFactor": 2, -@@ -396,7 +402,7 @@ +@@ -402,7 +402,7 @@ "step": 10 }, { @@ -123,76 +74,52 @@ "format": "table", "instant": true, "intervalFactor": 2, -@@ -405,7 +411,7 @@ +@@ -411,7 +411,7 @@ "step": 10 }, { -- "expr": "sum(\n kube_pod_container_resource_requests{cluster=\"$cluster\", namespace=\"$namespace\", resource=\"cpu\"}\n* on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n", +- "expr": "sum(\n kube_pod_container_resource_requests{job=\"kube-state-metrics\", cluster=\"$cluster\", namespace=\"$namespace\", resource=\"cpu\"}\n* on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n", + "expr": "sum(\n kube_pod_container_resource_requests{namespace=\"$namespace\", resource=\"cpu\"}\n* on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n", "format": "table", "instant": true, "intervalFactor": 2, -@@ -414,7 +420,7 @@ +@@ -420,7 +420,7 @@ "step": 10 }, { -- "expr": "sum(\n node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate{cluster=\"$cluster\", namespace=\"$namespace\"}\n* on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n/sum(\n kube_pod_container_resource_requests{cluster=\"$cluster\", namespace=\"$namespace\", resource=\"cpu\"}\n* on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n", +- "expr": "sum(\n node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate{cluster=\"$cluster\", namespace=\"$namespace\"}\n* on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n/sum(\n kube_pod_container_resource_requests{job=\"kube-state-metrics\", cluster=\"$cluster\", namespace=\"$namespace\", resource=\"cpu\"}\n* on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n", + "expr": "sum(\n node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate{namespace=\"$namespace\"}\n* on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n/sum(\n kube_pod_container_resource_requests{namespace=\"$namespace\", resource=\"cpu\"}\n* on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n", "format": "table", "instant": true, "intervalFactor": 2, -@@ -423,7 +429,7 @@ +@@ -429,7 +429,7 @@ "step": 10 }, { -- "expr": "sum(\n kube_pod_container_resource_limits{cluster=\"$cluster\", namespace=\"$namespace\", resource=\"cpu\"}\n* on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n", +- "expr": "sum(\n kube_pod_container_resource_limits{job=\"kube-state-metrics\", cluster=\"$cluster\", namespace=\"$namespace\", resource=\"cpu\"}\n* on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n", + "expr": "sum(\n kube_pod_container_resource_limits{namespace=\"$namespace\", resource=\"cpu\"}\n* on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n", "format": "table", "instant": true, "intervalFactor": 2, -@@ -432,7 +438,7 @@ +@@ -438,7 +438,7 @@ "step": 10 }, { -- "expr": "sum(\n node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate{cluster=\"$cluster\", namespace=\"$namespace\"}\n* on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n/sum(\n kube_pod_container_resource_limits{cluster=\"$cluster\", namespace=\"$namespace\", resource=\"cpu\"}\n* on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n", +- "expr": "sum(\n node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate{cluster=\"$cluster\", namespace=\"$namespace\"}\n* on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n/sum(\n kube_pod_container_resource_limits{job=\"kube-state-metrics\", cluster=\"$cluster\", namespace=\"$namespace\", resource=\"cpu\"}\n* on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n", + "expr": "sum(\n node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate{namespace=\"$namespace\"}\n* on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n/sum(\n kube_pod_container_resource_limits{namespace=\"$namespace\", resource=\"cpu\"}\n* on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n", "format": "table", "instant": true, "intervalFactor": 2, -@@ -449,7 +455,7 @@ - "title": "CPU Quota", - "tooltip": { - "shared": false, -- "sort": 0, -+ "sort": 2, - "value_type": "individual" - }, - "transform": "table", -@@ -504,11 +510,14 @@ - "datasource": "$datasource", - "fill": 10, - "id": 3, -+ "interval": "1m", - "legend": { -+ "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, -+ "rightSide": true, - "show": true, - "total": false, - "values": false -@@ -553,7 +562,7 @@ +@@ -562,7 +562,7 @@ "steppedLine": false, "targets": [ { -- "expr": "sum(\n container_memory_working_set_bytes{cluster=\"$cluster\", namespace=\"$namespace\", container!=\"\", image!=\"\"}\n * on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n", +- "expr": "sum(\n container_memory_working_set_bytes{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=\"$namespace\", container!=\"\", image!=\"\"}\n * on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n", + "expr": "sum(\n container_memory_working_set_bytes{namespace=\"$namespace\", container!=\"\", image!=\"\"}\n * on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}workload{{`}}`}} - {{`{{`}}workload_type{{`}}`}}", -@@ -561,7 +570,7 @@ +@@ -570,7 +570,7 @@ "step": 10 }, { @@ -201,7 +128,7 @@ "format": "time_series", "intervalFactor": 2, "legendFormat": "quota - requests", -@@ -569,7 +578,7 @@ +@@ -578,7 +578,7 @@ "step": 10 }, { @@ -210,40 +137,7 @@ "format": "time_series", "intervalFactor": 2, "legendFormat": "quota - limits", -@@ -585,7 +594,7 @@ - "title": "Memory Usage", - "tooltip": { - "shared": false, -- "sort": 0, -+ "sort": 2, - "value_type": "individual" - }, - "type": "graph", -@@ -639,11 +648,14 @@ - "datasource": "$datasource", - "fill": 1, - "id": 4, -+ "interval": "1m", - "legend": { -+ "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, -+ "rightSide": true, - "show": true, - "total": false, - "values": false -@@ -797,7 +809,7 @@ - "link": true, - "linkTargetBlank": false, - "linkTooltip": "Drill down", -- "linkUrl": "/d/a164a7f0339f99e89cea5cb47e9be617/k8s-resources-workload?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$namespace&var-workload=$__cell&var-type=$__cell_2", -+ "linkUrl": "d/a164a7f0339f99e89cea5cb47e9be617/k8s-resources-workload?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$namespace&var-workload=$__cell&var-type=$__cell_2", - "pattern": "workload", - "thresholds": [ - -@@ -842,7 +854,7 @@ +@@ -854,7 +854,7 @@ ], "targets": [ { @@ -252,482 +146,253 @@ "format": "table", "instant": true, "intervalFactor": 2, -@@ -851,7 +863,7 @@ +@@ -863,7 +863,7 @@ "step": 10 }, { -- "expr": "sum(\n container_memory_working_set_bytes{cluster=\"$cluster\", namespace=\"$namespace\", container!=\"\", image!=\"\"}\n * on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n", +- "expr": "sum(\n container_memory_working_set_bytes{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=\"$namespace\", container!=\"\", image!=\"\"}\n * on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n", + "expr": "sum(\n container_memory_working_set_bytes{namespace=\"$namespace\", container!=\"\", image!=\"\"}\n * on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n", "format": "table", "instant": true, "intervalFactor": 2, -@@ -860,7 +872,7 @@ +@@ -872,7 +872,7 @@ "step": 10 }, { -- "expr": "sum(\n kube_pod_container_resource_requests{cluster=\"$cluster\", namespace=\"$namespace\", resource=\"memory\"}\n* on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n", +- "expr": "sum(\n kube_pod_container_resource_requests{job=\"kube-state-metrics\", cluster=\"$cluster\", namespace=\"$namespace\", resource=\"memory\"}\n* on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n", + "expr": "sum(\n kube_pod_container_resource_requests{namespace=\"$namespace\", resource=\"memory\"}\n* on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n", "format": "table", "instant": true, "intervalFactor": 2, -@@ -869,7 +881,7 @@ +@@ -881,7 +881,7 @@ "step": 10 }, { -- "expr": "sum(\n container_memory_working_set_bytes{cluster=\"$cluster\", namespace=\"$namespace\", container!=\"\", image!=\"\"}\n * on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n/sum(\n kube_pod_container_resource_requests{cluster=\"$cluster\", namespace=\"$namespace\", resource=\"memory\"}\n* on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n", +- "expr": "sum(\n container_memory_working_set_bytes{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=\"$namespace\", container!=\"\", image!=\"\"}\n * on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n/sum(\n kube_pod_container_resource_requests{job=\"kube-state-metrics\", cluster=\"$cluster\", namespace=\"$namespace\", resource=\"memory\"}\n* on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n", + "expr": "sum(\n container_memory_working_set_bytes{namespace=\"$namespace\", container!=\"\", image!=\"\"}\n * on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n/sum(\n kube_pod_container_resource_requests{namespace=\"$namespace\", resource=\"memory\"}\n* on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n", "format": "table", "instant": true, "intervalFactor": 2, -@@ -878,7 +890,7 @@ +@@ -890,7 +890,7 @@ "step": 10 }, { -- "expr": "sum(\n kube_pod_container_resource_limits{cluster=\"$cluster\", namespace=\"$namespace\", resource=\"memory\"}\n* on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n", +- "expr": "sum(\n kube_pod_container_resource_limits{job=\"kube-state-metrics\", cluster=\"$cluster\", namespace=\"$namespace\", resource=\"memory\"}\n* on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n", + "expr": "sum(\n kube_pod_container_resource_limits{namespace=\"$namespace\", resource=\"memory\"}\n* on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n", "format": "table", "instant": true, "intervalFactor": 2, -@@ -887,7 +899,7 @@ +@@ -899,7 +899,7 @@ "step": 10 }, { -- "expr": "sum(\n container_memory_working_set_bytes{cluster=\"$cluster\", namespace=\"$namespace\", container!=\"\", image!=\"\"}\n * on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n/sum(\n kube_pod_container_resource_limits{cluster=\"$cluster\", namespace=\"$namespace\", resource=\"memory\"}\n* on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n", +- "expr": "sum(\n container_memory_working_set_bytes{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=\"$namespace\", container!=\"\", image!=\"\"}\n * on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n/sum(\n kube_pod_container_resource_limits{job=\"kube-state-metrics\", cluster=\"$cluster\", namespace=\"$namespace\", resource=\"memory\"}\n* on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n", + "expr": "sum(\n container_memory_working_set_bytes{namespace=\"$namespace\", container!=\"\", image!=\"\"}\n * on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n/sum(\n kube_pod_container_resource_limits{namespace=\"$namespace\", resource=\"memory\"}\n* on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n", "format": "table", "instant": true, "intervalFactor": 2, -@@ -904,7 +916,7 @@ - "title": "Memory Quota", - "tooltip": { - "shared": false, -- "sort": 0, -+ "sort": 2, - "value_type": "individual" - }, - "transform": "table", -@@ -961,10 +973,12 @@ - "id": 5, - "interval": "1m", - "legend": { -+ "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, -+ "rightSide": true, - "show": true, - "total": false, - "values": false -@@ -1118,7 +1132,7 @@ - "link": true, - "linkTargetBlank": false, - "linkTooltip": "Drill down to pods", -- "linkUrl": "/d/a164a7f0339f99e89cea5cb47e9be617/k8s-resources-workload?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$namespace&var-workload=$__cell&var-type=$type", -+ "linkUrl": "d/a164a7f0339f99e89cea5cb47e9be617/k8s-resources-workload?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$namespace&var-workload=$__cell&var-type=$type", - "pattern": "workload", - "thresholds": [ - -@@ -1163,7 +1177,7 @@ +@@ -1177,7 +1177,7 @@ ], "targets": [ { -- "expr": "(sum(irate(container_network_receive_bytes_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=~\"$namespace\", workload_type=\"$type\"}) by (workload))\n", +- "expr": "(sum(irate(container_network_receive_bytes_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}) by (workload))\n", + "expr": "(sum(irate(container_network_receive_bytes_total{namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload_type=\"$type\"}) by (workload))\n", "format": "table", "instant": true, "intervalFactor": 2, -@@ -1172,7 +1186,7 @@ +@@ -1186,7 +1186,7 @@ "step": 10 }, { -- "expr": "(sum(irate(container_network_transmit_bytes_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=~\"$namespace\", workload_type=\"$type\"}) by (workload))\n", +- "expr": "(sum(irate(container_network_transmit_bytes_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}) by (workload))\n", + "expr": "(sum(irate(container_network_transmit_bytes_total{namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload_type=\"$type\"}) by (workload))\n", "format": "table", "instant": true, "intervalFactor": 2, -@@ -1181,7 +1195,7 @@ +@@ -1195,7 +1195,7 @@ "step": 10 }, { -- "expr": "(sum(irate(container_network_receive_packets_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=~\"$namespace\", workload_type=\"$type\"}) by (workload))\n", +- "expr": "(sum(irate(container_network_receive_packets_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}) by (workload))\n", + "expr": "(sum(irate(container_network_receive_packets_total{namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload_type=\"$type\"}) by (workload))\n", "format": "table", "instant": true, "intervalFactor": 2, -@@ -1190,7 +1204,7 @@ +@@ -1204,7 +1204,7 @@ "step": 10 }, { -- "expr": "(sum(irate(container_network_transmit_packets_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=~\"$namespace\", workload_type=\"$type\"}) by (workload))\n", +- "expr": "(sum(irate(container_network_transmit_packets_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}) by (workload))\n", + "expr": "(sum(irate(container_network_transmit_packets_total{namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload_type=\"$type\"}) by (workload))\n", "format": "table", "instant": true, "intervalFactor": 2, -@@ -1199,7 +1213,7 @@ +@@ -1213,7 +1213,7 @@ "step": 10 }, { -- "expr": "(sum(irate(container_network_receive_packets_dropped_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=~\"$namespace\", workload_type=\"$type\"}) by (workload))\n", +- "expr": "(sum(irate(container_network_receive_packets_dropped_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}) by (workload))\n", + "expr": "(sum(irate(container_network_receive_packets_dropped_total{namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload_type=\"$type\"}) by (workload))\n", "format": "table", "instant": true, "intervalFactor": 2, -@@ -1208,7 +1222,7 @@ +@@ -1222,7 +1222,7 @@ "step": 10 }, { -- "expr": "(sum(irate(container_network_transmit_packets_dropped_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=~\"$namespace\", workload_type=\"$type\"}) by (workload))\n", +- "expr": "(sum(irate(container_network_transmit_packets_dropped_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}) by (workload))\n", + "expr": "(sum(irate(container_network_transmit_packets_dropped_total{namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload_type=\"$type\"}) by (workload))\n", "format": "table", "instant": true, "intervalFactor": 2, -@@ -1225,7 +1239,7 @@ - "title": "Current Network Usage", - "tooltip": { - "shared": false, -- "sort": 0, -+ "sort": 2, - "value_type": "individual" - }, - "transform": "table", -@@ -1280,11 +1294,14 @@ - "datasource": "$datasource", - "fill": 10, - "id": 6, -+ "interval": "1m", - "legend": { -+ "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, -+ "rightSide": true, - "show": true, - "total": false, - "values": false -@@ -1308,7 +1325,7 @@ +@@ -1325,7 +1325,7 @@ "steppedLine": false, "targets": [ { -- "expr": "(sum(irate(container_network_receive_bytes_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=~\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", +- "expr": "(sum(irate(container_network_receive_bytes_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", + "expr": "(sum(irate(container_network_receive_bytes_total{namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}workload{{`}}`}}", -@@ -1324,7 +1341,7 @@ - "title": "Receive Bandwidth", - "tooltip": { - "shared": false, -- "sort": 0, -+ "sort": 2, - "value_type": "individual" - }, - "type": "graph", -@@ -1366,11 +1383,14 @@ - "datasource": "$datasource", - "fill": 10, - "id": 7, -+ "interval": "1m", - "legend": { -+ "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, -+ "rightSide": true, - "show": true, - "total": false, - "values": false -@@ -1394,7 +1414,7 @@ +@@ -1414,7 +1414,7 @@ "steppedLine": false, "targets": [ { -- "expr": "(sum(irate(container_network_transmit_bytes_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=~\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", +- "expr": "(sum(irate(container_network_transmit_bytes_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", + "expr": "(sum(irate(container_network_transmit_bytes_total{namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}workload{{`}}`}}", -@@ -1410,7 +1430,7 @@ - "title": "Transmit Bandwidth", - "tooltip": { - "shared": false, -- "sort": 0, -+ "sort": 2, - "value_type": "individual" - }, - "type": "graph", -@@ -1464,11 +1484,14 @@ - "datasource": "$datasource", - "fill": 10, - "id": 8, -+ "interval": "1m", - "legend": { -+ "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, -+ "rightSide": true, - "show": true, - "total": false, - "values": false -@@ -1492,7 +1515,7 @@ +@@ -1515,7 +1515,7 @@ "steppedLine": false, "targets": [ { -- "expr": "(avg(irate(container_network_receive_bytes_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=~\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", +- "expr": "(avg(irate(container_network_receive_bytes_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", + "expr": "(avg(irate(container_network_receive_bytes_total{namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}workload{{`}}`}}", -@@ -1508,7 +1531,7 @@ - "title": "Average Container Bandwidth by Workload: Received", - "tooltip": { - "shared": false, -- "sort": 0, -+ "sort": 2, - "value_type": "individual" - }, - "type": "graph", -@@ -1550,11 +1573,14 @@ - "datasource": "$datasource", - "fill": 10, - "id": 9, -+ "interval": "1m", - "legend": { -+ "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, -+ "rightSide": true, - "show": true, - "total": false, - "values": false -@@ -1578,7 +1604,7 @@ +@@ -1604,7 +1604,7 @@ "steppedLine": false, "targets": [ { -- "expr": "(avg(irate(container_network_transmit_bytes_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=~\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", +- "expr": "(avg(irate(container_network_transmit_bytes_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", + "expr": "(avg(irate(container_network_transmit_bytes_total{namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}workload{{`}}`}}", -@@ -1594,7 +1620,7 @@ - "title": "Average Container Bandwidth by Workload: Transmitted", - "tooltip": { - "shared": false, -- "sort": 0, -+ "sort": 2, - "value_type": "individual" - }, - "type": "graph", -@@ -1648,11 +1674,14 @@ - "datasource": "$datasource", - "fill": 10, - "id": 10, -+ "interval": "1m", - "legend": { -+ "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, -+ "rightSide": true, - "show": true, - "total": false, - "values": false -@@ -1676,7 +1705,7 @@ +@@ -1705,7 +1705,7 @@ "steppedLine": false, "targets": [ { -- "expr": "(sum(irate(container_network_receive_packets_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=~\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", +- "expr": "(sum(irate(container_network_receive_packets_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", + "expr": "(sum(irate(container_network_receive_packets_total{namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}workload{{`}}`}}", -@@ -1692,7 +1721,7 @@ - "title": "Rate of Received Packets", - "tooltip": { - "shared": false, -- "sort": 0, -+ "sort": 2, - "value_type": "individual" - }, - "type": "graph", -@@ -1734,11 +1763,14 @@ - "datasource": "$datasource", - "fill": 10, - "id": 11, -+ "interval": "1m", - "legend": { -+ "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, -+ "rightSide": true, - "show": true, - "total": false, - "values": false -@@ -1762,7 +1794,7 @@ +@@ -1794,7 +1794,7 @@ "steppedLine": false, "targets": [ { -- "expr": "(sum(irate(container_network_transmit_packets_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=~\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", +- "expr": "(sum(irate(container_network_transmit_packets_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", + "expr": "(sum(irate(container_network_transmit_packets_total{namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}workload{{`}}`}}", -@@ -1778,7 +1810,7 @@ - "title": "Rate of Transmitted Packets", - "tooltip": { - "shared": false, -- "sort": 0, -+ "sort": 2, - "value_type": "individual" - }, - "type": "graph", -@@ -1832,11 +1864,14 @@ - "datasource": "$datasource", - "fill": 10, - "id": 12, -+ "interval": "1m", - "legend": { -+ "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, -+ "rightSide": true, - "show": true, - "total": false, - "values": false -@@ -1860,7 +1895,7 @@ +@@ -1895,7 +1895,7 @@ "steppedLine": false, "targets": [ { -- "expr": "(sum(irate(container_network_receive_packets_dropped_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=~\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", +- "expr": "(sum(irate(container_network_receive_packets_dropped_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", + "expr": "(sum(irate(container_network_receive_packets_dropped_total{namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}workload{{`}}`}}", -@@ -1876,7 +1911,7 @@ - "title": "Rate of Received Packets Dropped", - "tooltip": { - "shared": false, -- "sort": 0, -+ "sort": 2, - "value_type": "individual" - }, - "type": "graph", -@@ -1918,11 +1953,14 @@ - "datasource": "$datasource", - "fill": 10, - "id": 13, -+ "interval": "1m", - "legend": { -+ "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, -+ "rightSide": true, - "show": true, - "total": false, - "values": false -@@ -1946,7 +1984,7 @@ +@@ -1984,7 +1984,7 @@ "steppedLine": false, "targets": [ { -- "expr": "(sum(irate(container_network_transmit_packets_dropped_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=~\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", +- "expr": "(sum(irate(container_network_transmit_packets_dropped_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", + "expr": "(sum(irate(container_network_transmit_packets_dropped_total{namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}workload{{`}}`}}", -@@ -1962,7 +2000,7 @@ - "title": "Rate of Transmitted Packets Dropped", - "tooltip": { - "shared": false, -- "sort": 0, -+ "sort": 2, - "value_type": "individual" - }, - "type": "graph", -@@ -2012,11 +2050,11 @@ - "list": [ - { - "current": { -- "text": "default", -- "value": "default" -+ "text": "Prometheus", -+ "value": "Prometheus" - }, - "hide": 0, -- "label": null, -+ "label": "Data Source", - "name": "datasource", - "options": [ - -@@ -2028,33 +2066,6 @@ +@@ -2066,23 +2066,28 @@ }, { "allValue": null, -- "current": { ++ "auto": false, ++ "auto_count": 30, ++ "auto_min": "10s", + "current": { - "text": "", - "value": "" -- }, -- "datasource": "$datasource", -- "hide": {{ if .Values.grafana.sidecar.dashboards.multicluster.global.enabled }}0{{ else }}2{{ end }}, -- "includeAll": false, -- "label": null, -- "multi": false, -- "name": "cluster", -- "options": [ -- -- ], -- "query": "label_values(kube_pod_info, cluster)", -- "refresh": 2, -- "regex": "", -- "sort": 1, -- "tagValuesQuery": "", -- "tags": [ -- -- ], -- "tagsQuery": "", -- "type": "query", -- "useTags": false -- }, -- { -- "allValue": null, - "auto": false, - "auto_count": 30, - "auto_min": "10s", -@@ -2063,7 +2074,7 @@ - "value": "deployment" ++ "text": "deployment", ++ "value": "deployment" }, "datasource": "$datasource", -- "definition": "label_values(namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=~\"$namespace\", workload=~\".+\"}, workload_type)", +- "hide": {{ if .Values.grafana.sidecar.dashboards.multicluster.global.enabled }}0{{ else }}2{{ end }}, + "definition": "label_values(namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\".+\"}, workload_type)", - "hide": 0, ++ "hide": 0, "includeAll": false, "label": null, -@@ -2072,7 +2083,7 @@ + "multi": false, +- "name": "cluster", ++ "name": "type", "options": [ ], -- "query": "label_values(namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=~\"$namespace\", workload=~\".+\"}, workload_type)", +- "query": "label_values(up{job=\"kube-state-metrics\"}, cluster)", + "query": "label_values(namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\".+\"}, workload_type)", "refresh": 2, "regex": "", - "skipUrlSync": false, -@@ -2100,7 +2111,7 @@ +- "sort": 1, ++ "skipUrlSync": false, ++ "sort": 0, + "tagValuesQuery": "", + "tags": [ + +@@ -2106,42 +2111,10 @@ "options": [ ], -- "query": "label_values(kube_pod_info{cluster=\"$cluster\"}, namespace)", +- "query": "label_values(kube_pod_info{job=\"kube-state-metrics\", cluster=\"$cluster\"}, namespace)", + "query": "label_values(kube_pod_info, namespace)", "refresh": 2, "regex": "", "sort": 1, +- "tagValuesQuery": "", +- "tags": [ +- +- ], +- "tagsQuery": "", +- "type": "query", +- "useTags": false +- }, +- { +- "allValue": null, +- "auto": false, +- "auto_count": 30, +- "auto_min": "10s", +- "current": { +- "text": "deployment", +- "value": "deployment" +- }, +- "datasource": "$datasource", +- "definition": "label_values(namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload=~\".+\"}, workload_type)", +- "hide": 0, +- "includeAll": false, +- "label": null, +- "multi": false, +- "name": "type", +- "options": [ +- +- ], +- "query": "label_values(namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload=~\".+\"}, workload_type)", +- "refresh": 2, +- "regex": "", +- "skipUrlSync": false, +- "sort": 0, + "tagValuesQuery": "", + "tags": [ + diff --git a/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/namespace-by-pod.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/namespace-by-pod.yaml.patch index 90c82999..80feb3bd 100644 --- a/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/namespace-by-pod.yaml.patch +++ b/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/namespace-by-pod.yaml.patch @@ -20,8 +20,7 @@ {{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} labels: {{- if $.Values.grafana.sidecar.dashboards.label }} -- {{ $.Values.grafana.sidecar.dashboards.label }}: "1" -+ {{ $.Values.grafana.sidecar.dashboards.label }}: {{ ternary $.Values.grafana.sidecar.dashboards.labelValue "1" (not (empty $.Values.grafana.sidecar.dashboards.labelValue)) | quote }} + {{ $.Values.grafana.sidecar.dashboards.label }}: {{ ternary $.Values.grafana.sidecar.dashboards.labelValue "1" (not (empty $.Values.grafana.sidecar.dashboards.labelValue)) | quote }} {{- end }} - app: {{ template "kube-prometheus-stack.name" $ }}-grafana -{{ include "kube-prometheus-stack.labels" $ | indent 4 }} @@ -156,21 +155,6 @@ "format": "time_series", "intervalFactor": 1, "legendFormat": "{{`{{`}}pod{{`}}`}}", -@@ -1273,11 +1273,11 @@ - "list": [ - { - "current": { -- "text": "default", -- "value": "default" -+ "text": "Prometheus", -+ "value": "Prometheus" - }, - "hide": 0, -- "label": null, -+ "label": "Data Source", - "name": "datasource", - "options": [ - @@ -1288,32 +1288,6 @@ "type": "datasource" }, diff --git a/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/namespace-by-workload.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/namespace-by-workload.yaml.patch index bb2d069d..ff92404f 100644 --- a/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/namespace-by-workload.yaml.patch +++ b/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/namespace-by-workload.yaml.patch @@ -20,8 +20,7 @@ {{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} labels: {{- if $.Values.grafana.sidecar.dashboards.label }} -- {{ $.Values.grafana.sidecar.dashboards.label }}: "1" -+ {{ $.Values.grafana.sidecar.dashboards.label }}: {{ ternary $.Values.grafana.sidecar.dashboards.labelValue "1" (not (empty $.Values.grafana.sidecar.dashboards.labelValue)) | quote }} + {{ $.Values.grafana.sidecar.dashboards.label }}: {{ ternary $.Values.grafana.sidecar.dashboards.labelValue "1" (not (empty $.Values.grafana.sidecar.dashboards.labelValue)) | quote }} {{- end }} - app: {{ template "kube-prometheus-stack.name" $ }}-grafana -{{ include "kube-prometheus-stack.labels" $ | indent 4 }} @@ -34,7 +33,7 @@ "steppedLine": false, "targets": [ { -- "expr": "sort_desc(sum(irate(container_network_receive_bytes_total{cluster=\"$cluster\",namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\",namespace=~\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", +- "expr": "sort_desc(sum(irate(container_network_receive_bytes_total{cluster=\"$cluster\",namespace=\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\",namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", + "expr": "sort_desc(sum(irate(container_network_receive_bytes_total{namespace=\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", "format": "time_series", "intervalFactor": 1, @@ -43,7 +42,7 @@ "steppedLine": false, "targets": [ { -- "expr": "sort_desc(sum(irate(container_network_transmit_bytes_total{cluster=\"$cluster\",namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\",namespace=~\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", +- "expr": "sort_desc(sum(irate(container_network_transmit_bytes_total{cluster=\"$cluster\",namespace=\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\",namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", + "expr": "sort_desc(sum(irate(container_network_transmit_bytes_total{namespace=\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", "format": "time_series", "intervalFactor": 1, @@ -52,7 +51,7 @@ ], "targets": [ { -- "expr": "sort_desc(sum(irate(container_network_receive_bytes_total{cluster=\"$cluster\",namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\",namespace=~\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", +- "expr": "sort_desc(sum(irate(container_network_receive_bytes_total{cluster=\"$cluster\",namespace=\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\",namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", + "expr": "sort_desc(sum(irate(container_network_receive_bytes_total{namespace=\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", "format": "table", "instant": true, @@ -61,7 +60,7 @@ "step": 10 }, { -- "expr": "sort_desc(sum(irate(container_network_transmit_bytes_total{cluster=\"$cluster\",namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\",namespace=~\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", +- "expr": "sort_desc(sum(irate(container_network_transmit_bytes_total{cluster=\"$cluster\",namespace=\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\",namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", + "expr": "sort_desc(sum(irate(container_network_transmit_bytes_total{namespace=\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", "format": "table", "instant": true, @@ -70,7 +69,7 @@ "step": 10 }, { -- "expr": "sort_desc(avg(irate(container_network_receive_bytes_total{cluster=\"$cluster\",namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\",namespace=~\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", +- "expr": "sort_desc(avg(irate(container_network_receive_bytes_total{cluster=\"$cluster\",namespace=\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\",namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", + "expr": "sort_desc(avg(irate(container_network_receive_bytes_total{namespace=\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", "format": "table", "instant": true, @@ -79,7 +78,7 @@ "step": 10 }, { -- "expr": "sort_desc(avg(irate(container_network_transmit_bytes_total{cluster=\"$cluster\",namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\",namespace=~\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", +- "expr": "sort_desc(avg(irate(container_network_transmit_bytes_total{cluster=\"$cluster\",namespace=\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\",namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", + "expr": "sort_desc(avg(irate(container_network_transmit_bytes_total{namespace=\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", "format": "table", "instant": true, @@ -88,7 +87,7 @@ "step": 10 }, { -- "expr": "sort_desc(sum(irate(container_network_receive_packets_total{cluster=\"$cluster\",namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\",namespace=~\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", +- "expr": "sort_desc(sum(irate(container_network_receive_packets_total{cluster=\"$cluster\",namespace=\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\",namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", + "expr": "sort_desc(sum(irate(container_network_receive_packets_total{namespace=\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", "format": "table", "instant": true, @@ -97,7 +96,7 @@ "step": 10 }, { -- "expr": "sort_desc(sum(irate(container_network_transmit_packets_total{cluster=\"$cluster\",namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\",namespace=~\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", +- "expr": "sort_desc(sum(irate(container_network_transmit_packets_total{cluster=\"$cluster\",namespace=\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\",namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", + "expr": "sort_desc(sum(irate(container_network_transmit_packets_total{namespace=\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", "format": "table", "instant": true, @@ -106,7 +105,7 @@ "step": 10 }, { -- "expr": "sort_desc(sum(irate(container_network_receive_packets_dropped_total{cluster=\"$cluster\",namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\",namespace=~\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", +- "expr": "sort_desc(sum(irate(container_network_receive_packets_dropped_total{cluster=\"$cluster\",namespace=\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\",namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", + "expr": "sort_desc(sum(irate(container_network_receive_packets_dropped_total{namespace=\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", "format": "table", "instant": true, @@ -115,7 +114,7 @@ "step": 10 }, { -- "expr": "sort_desc(sum(irate(container_network_transmit_packets_dropped_total{cluster=\"$cluster\",namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\",namespace=~\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", +- "expr": "sort_desc(sum(irate(container_network_transmit_packets_dropped_total{cluster=\"$cluster\",namespace=\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\",namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", + "expr": "sort_desc(sum(irate(container_network_transmit_packets_dropped_total{namespace=\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", "format": "table", "instant": true, @@ -124,7 +123,7 @@ "steppedLine": false, "targets": [ { -- "expr": "sort_desc(avg(irate(container_network_receive_bytes_total{cluster=\"$cluster\",namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\",namespace=~\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", +- "expr": "sort_desc(avg(irate(container_network_receive_bytes_total{cluster=\"$cluster\",namespace=\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\",namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", + "expr": "sort_desc(avg(irate(container_network_receive_bytes_total{namespace=\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", "format": "time_series", "intervalFactor": 1, @@ -133,7 +132,7 @@ "steppedLine": false, "targets": [ { -- "expr": "sort_desc(avg(irate(container_network_transmit_bytes_total{cluster=\"$cluster\",namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\",namespace=~\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", +- "expr": "sort_desc(avg(irate(container_network_transmit_bytes_total{cluster=\"$cluster\",namespace=\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\",namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", + "expr": "sort_desc(avg(irate(container_network_transmit_bytes_total{namespace=\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", "format": "time_series", "intervalFactor": 1, @@ -142,7 +141,7 @@ "steppedLine": false, "targets": [ { -- "expr": "sort_desc(sum(irate(container_network_receive_bytes_total{cluster=\"$cluster\",namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\",namespace=~\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", +- "expr": "sort_desc(sum(irate(container_network_receive_bytes_total{cluster=\"$cluster\",namespace=\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\",namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", + "expr": "sort_desc(sum(irate(container_network_receive_bytes_total{namespace=\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", "format": "time_series", "intervalFactor": 1, @@ -151,7 +150,7 @@ "steppedLine": false, "targets": [ { -- "expr": "sort_desc(sum(irate(container_network_transmit_bytes_total{cluster=\"$cluster\",namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\",namespace=~\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", +- "expr": "sort_desc(sum(irate(container_network_transmit_bytes_total{cluster=\"$cluster\",namespace=\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\",namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", + "expr": "sort_desc(sum(irate(container_network_transmit_bytes_total{namespace=\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", "format": "time_series", "intervalFactor": 1, @@ -160,7 +159,7 @@ "steppedLine": false, "targets": [ { -- "expr": "sort_desc(sum(irate(container_network_receive_packets_total{cluster=\"$cluster\",namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\",namespace=~\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", +- "expr": "sort_desc(sum(irate(container_network_receive_packets_total{cluster=\"$cluster\",namespace=\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\",namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", + "expr": "sort_desc(sum(irate(container_network_receive_packets_total{namespace=\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", "format": "time_series", "intervalFactor": 1, @@ -169,7 +168,7 @@ "steppedLine": false, "targets": [ { -- "expr": "sort_desc(sum(irate(container_network_transmit_packets_total{cluster=\"$cluster\",namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\",namespace=~\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", +- "expr": "sort_desc(sum(irate(container_network_transmit_packets_total{cluster=\"$cluster\",namespace=\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\",namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", + "expr": "sort_desc(sum(irate(container_network_transmit_packets_total{namespace=\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", "format": "time_series", "intervalFactor": 1, @@ -178,7 +177,7 @@ "steppedLine": false, "targets": [ { -- "expr": "sort_desc(sum(irate(container_network_receive_packets_dropped_total{cluster=\"$cluster\",namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\",namespace=~\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", +- "expr": "sort_desc(sum(irate(container_network_receive_packets_dropped_total{cluster=\"$cluster\",namespace=\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\",namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", + "expr": "sort_desc(sum(irate(container_network_receive_packets_dropped_total{namespace=\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", "format": "time_series", "intervalFactor": 1, @@ -187,26 +186,11 @@ "steppedLine": false, "targets": [ { -- "expr": "sort_desc(sum(irate(container_network_transmit_packets_dropped_total{cluster=\"$cluster\",namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\",namespace=~\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", +- "expr": "sort_desc(sum(irate(container_network_transmit_packets_dropped_total{cluster=\"$cluster\",namespace=\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\",namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", + "expr": "sort_desc(sum(irate(container_network_transmit_packets_dropped_total{namespace=\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", "format": "time_series", "intervalFactor": 1, "legendFormat": "{{`{{`}}workload{{`}}`}}", -@@ -1513,11 +1513,11 @@ - "list": [ - { - "current": { -- "text": "default", -- "value": "default" -+ "text": "Prometheus", -+ "value": "Prometheus" - }, - "hide": 0, -- "label": null, -+ "label": "Data Source", - "name": "datasource", - "options": [ - @@ -1529,32 +1529,6 @@ }, { @@ -262,7 +246,7 @@ "value": "deployment" }, "datasource": "$datasource", -- "definition": "label_values(namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\",namespace=~\"$namespace\", workload=~\".+\"}, workload_type)", +- "definition": "label_values(namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\",namespace=\"$namespace\", workload=~\".+\"}, workload_type)", + "definition": "label_values(namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\".+\"}, workload_type)", "hide": 0, "includeAll": false, @@ -271,7 +255,7 @@ "options": [ ], -- "query": "label_values(namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\",namespace=~\"$namespace\", workload=~\".+\"}, workload_type)", +- "query": "label_values(namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\",namespace=\"$namespace\", workload=~\".+\"}, workload_type)", + "query": "label_values(namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\".+\"}, workload_type)", "refresh": 2, "regex": "", diff --git a/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/persistentvolumesusage.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/persistentvolumesusage.yaml.patch index fe2af625..c0a5de3a 100644 --- a/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/persistentvolumesusage.yaml.patch +++ b/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/persistentvolumesusage.yaml.patch @@ -20,8 +20,7 @@ {{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} labels: {{- if $.Values.grafana.sidecar.dashboards.label }} -- {{ $.Values.grafana.sidecar.dashboards.label }}: "1" -+ {{ $.Values.grafana.sidecar.dashboards.label }}: {{ ternary $.Values.grafana.sidecar.dashboards.labelValue "1" (not (empty $.Values.grafana.sidecar.dashboards.labelValue)) | quote }} + {{ $.Values.grafana.sidecar.dashboards.label }}: {{ ternary $.Values.grafana.sidecar.dashboards.labelValue "1" (not (empty $.Values.grafana.sidecar.dashboards.labelValue)) | quote }} {{- end }} - app: {{ template "kube-prometheus-stack.name" $ }}-grafana -{{ include "kube-prometheus-stack.labels" $ | indent 4 }} @@ -30,23 +29,7 @@ data: persistentvolumesusage.json: |- { -@@ -60,13 +60,14 @@ - - }, - "id": 2, -+ "interval": "1m", - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": true, -- "rightSide": false, -+ "rightSide": true, - "show": true, - "sideWidth": null, - "total": false, -@@ -92,14 +93,14 @@ +@@ -93,14 +93,14 @@ "steppedLine": false, "targets": [ { @@ -63,20 +46,7 @@ "format": "time_series", "intervalFactor": 1, "legendFormat": "Free Space", -@@ -168,7 +169,11 @@ - - }, - "id": 3, -- "interval": null, -+ "interval": "1m", -+ "legend": { -+ "alignAsTable": true, -+ "rightSide": true -+ }, - "links": [ - - ], -@@ -207,7 +212,7 @@ +@@ -212,7 +212,7 @@ "tableColumn": "", "targets": [ { @@ -85,23 +55,7 @@ "format": "time_series", "intervalFactor": 2, "legendFormat": "", -@@ -257,13 +262,14 @@ - - }, - "id": 4, -+ "interval": "1m", - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": true, -- "rightSide": false, -+ "rightSide": true, - "show": true, - "sideWidth": null, - "total": false, -@@ -289,14 +295,14 @@ +@@ -295,14 +295,14 @@ "steppedLine": false, "targets": [ { @@ -118,20 +72,7 @@ "format": "time_series", "intervalFactor": 1, "legendFormat": " Free inodes", -@@ -365,7 +371,11 @@ - - }, - "id": 5, -- "interval": null, -+ "interval": "1m", -+ "legend": { -+ "alignAsTable": true, -+ "rightSide": true -+ }, - "links": [ - - ], -@@ -404,7 +414,7 @@ +@@ -414,7 +414,7 @@ "tableColumn": "", "targets": [ { @@ -140,22 +81,7 @@ "format": "time_series", "intervalFactor": 2, "legendFormat": "", -@@ -446,11 +456,11 @@ - "list": [ - { - "current": { -- "text": "default", -- "value": "default" -+ "text": "Prometheus", -+ "value": "Prometheus" - }, - "hide": 0, -- "label": null, -+ "label": "Data Source", - "name": "datasource", - "options": [ - -@@ -466,32 +476,6 @@ +@@ -476,32 +476,6 @@ }, "datasource": "$datasource", @@ -167,7 +93,7 @@ - "options": [ - - ], -- "query": "label_values(kubelet_volume_stats_capacity_bytes, cluster)", +- "query": "label_values(kubelet_volume_stats_capacity_bytes{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics\"}, cluster)", - "refresh": 2, - "regex": "", - "sort": 1, @@ -188,7 +114,7 @@ "hide": 0, "includeAll": false, "label": "Namespace", -@@ -500,7 +484,7 @@ +@@ -510,7 +484,7 @@ "options": [ ], @@ -197,7 +123,7 @@ "refresh": 2, "regex": "", "sort": 1, -@@ -526,7 +510,7 @@ +@@ -536,7 +510,7 @@ "options": [ ], diff --git a/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/pod-total.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/pod-total.yaml.patch index 25c5b19f..a257c6e9 100644 --- a/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/pod-total.yaml.patch +++ b/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/pod-total.yaml.patch @@ -20,8 +20,7 @@ {{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} labels: {{- if $.Values.grafana.sidecar.dashboards.label }} -- {{ $.Values.grafana.sidecar.dashboards.label }}: "1" -+ {{ $.Values.grafana.sidecar.dashboards.label }}: {{ ternary $.Values.grafana.sidecar.dashboards.labelValue "1" (not (empty $.Values.grafana.sidecar.dashboards.labelValue)) | quote }} + {{ $.Values.grafana.sidecar.dashboards.label }}: {{ ternary $.Values.grafana.sidecar.dashboards.labelValue "1" (not (empty $.Values.grafana.sidecar.dashboards.labelValue)) | quote }} {{- end }} - app: {{ template "kube-prometheus-stack.name" $ }}-grafana -{{ include "kube-prometheus-stack.labels" $ | indent 4 }} @@ -102,21 +101,6 @@ "format": "time_series", "intervalFactor": 1, "legendFormat": "{{`{{`}}pod{{`}}`}}", -@@ -1005,11 +1005,11 @@ - "list": [ - { - "current": { -- "text": "default", -- "value": "default" -+ "text": "Prometheus", -+ "value": "Prometheus" - }, - "hide": 0, -- "label": null, -+ "label": "Data Source", - "name": "datasource", - "options": [ - @@ -1020,32 +1020,6 @@ "type": "datasource" }, diff --git a/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/prometheus.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/prometheus.yaml.patch index af7754ef..45eaec01 100644 --- a/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/prometheus.yaml.patch +++ b/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/prometheus.yaml.patch @@ -20,8 +20,7 @@ {{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} labels: {{- if $.Values.grafana.sidecar.dashboards.label }} -- {{ $.Values.grafana.sidecar.dashboards.label }}: "1" -+ {{ $.Values.grafana.sidecar.dashboards.label }}: {{ ternary $.Values.grafana.sidecar.dashboards.labelValue "1" (not (empty $.Values.grafana.sidecar.dashboards.labelValue)) | quote }} + {{ $.Values.grafana.sidecar.dashboards.label }}: {{ ternary $.Values.grafana.sidecar.dashboards.labelValue "1" (not (empty $.Values.grafana.sidecar.dashboards.labelValue)) | quote }} {{- end }} - app: {{ template "kube-prometheus-stack.name" $ }}-grafana -{{ include "kube-prometheus-stack.labels" $ | indent 4 }} @@ -30,128 +29,3 @@ data: prometheus.json: |- { -@@ -220,8 +220,8 @@ - "timeShift": null, - "title": "Prometheus Stats", - "tooltip": { -- "shared": false, -- "sort": 0, -+ "shared": true, -+ "sort": 2, - "value_type": "individual" - }, - "transform": "table", -@@ -319,8 +319,8 @@ - "timeShift": null, - "title": "Target Sync", - "tooltip": { -- "shared": false, -- "sort": 0, -+ "shared": true, -+ "sort": 2, - "value_type": "individual" - }, - "type": "graph", -@@ -405,8 +405,8 @@ - "timeShift": null, - "title": "Targets", - "tooltip": { -- "shared": false, -- "sort": 0, -+ "shared": true, -+ "sort": 2, - "value_type": "individual" - }, - "type": "graph", -@@ -503,8 +503,8 @@ - "timeShift": null, - "title": "Average Scrape Interval Duration", - "tooltip": { -- "shared": false, -- "sort": 0, -+ "shared": true, -+ "sort": 2, - "value_type": "individual" - }, - "type": "graph", -@@ -621,8 +621,8 @@ - "timeShift": null, - "title": "Scrape failures", - "tooltip": { -- "shared": false, -- "sort": 0, -+ "shared": true, -+ "sort": 2, - "value_type": "individual" - }, - "type": "graph", -@@ -707,8 +707,8 @@ - "timeShift": null, - "title": "Appended Samples", - "tooltip": { -- "shared": false, -- "sort": 0, -+ "shared": true, -+ "sort": 2, - "value_type": "individual" - }, - "type": "graph", -@@ -805,8 +805,8 @@ - "timeShift": null, - "title": "Head Series", - "tooltip": { -- "shared": false, -- "sort": 0, -+ "shared": true, -+ "sort": 2, - "value_type": "individual" - }, - "type": "graph", -@@ -891,8 +891,8 @@ - "timeShift": null, - "title": "Head Chunks", - "tooltip": { -- "shared": false, -- "sort": 0, -+ "shared": true, -+ "sort": 2, - "value_type": "individual" - }, - "type": "graph", -@@ -989,8 +989,8 @@ - "timeShift": null, - "title": "Query Rate", - "tooltip": { -- "shared": false, -- "sort": 0, -+ "shared": true, -+ "sort": 2, - "value_type": "individual" - }, - "type": "graph", -@@ -1075,8 +1075,8 @@ - "timeShift": null, - "title": "Stage Duration", - "tooltip": { -- "shared": false, -- "sort": 0, -+ "shared": true, -+ "sort": 2, - "value_type": "individual" - }, - "type": "graph", -@@ -1126,11 +1126,11 @@ - "list": [ - { - "current": { -- "text": "default", -- "value": "default" -+ "text": "Prometheus", -+ "value": "Prometheus" - }, - "hide": 0, -- "label": null, -+ "label": "Data Source", - "name": "datasource", - "options": [ - diff --git a/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/workload-total.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/workload-total.yaml.patch index 0e5e39e5..fdc41543 100644 --- a/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/workload-total.yaml.patch +++ b/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/workload-total.yaml.patch @@ -20,8 +20,7 @@ {{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} labels: {{- if $.Values.grafana.sidecar.dashboards.label }} -- {{ $.Values.grafana.sidecar.dashboards.label }}: "1" -+ {{ $.Values.grafana.sidecar.dashboards.label }}: {{ ternary $.Values.grafana.sidecar.dashboards.labelValue "1" (not (empty $.Values.grafana.sidecar.dashboards.labelValue)) | quote }} + {{ $.Values.grafana.sidecar.dashboards.label }}: {{ ternary $.Values.grafana.sidecar.dashboards.labelValue "1" (not (empty $.Values.grafana.sidecar.dashboards.labelValue)) | quote }} {{- end }} - app: {{ template "kube-prometheus-stack.name" $ }}-grafana -{{ include "kube-prometheus-stack.labels" $ | indent 4 }} @@ -34,7 +33,7 @@ "steppedLine": false, "targets": [ { -- "expr": "sort_desc(sum(irate(container_network_receive_bytes_total{cluster=\"$cluster\",namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\",namespace=~\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", +- "expr": "sort_desc(sum(irate(container_network_receive_bytes_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\",namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\",namespace=~\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", + "expr": "sort_desc(sum(irate(container_network_receive_bytes_total{namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=~\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", "format": "time_series", "intervalFactor": 1, @@ -43,7 +42,7 @@ "steppedLine": false, "targets": [ { -- "expr": "sort_desc(sum(irate(container_network_transmit_bytes_total{cluster=\"$cluster\",namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\",namespace=~\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", +- "expr": "sort_desc(sum(irate(container_network_transmit_bytes_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\",namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\",namespace=~\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", + "expr": "sort_desc(sum(irate(container_network_transmit_bytes_total{namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=~\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", "format": "time_series", "intervalFactor": 1, @@ -52,7 +51,7 @@ "steppedLine": false, "targets": [ { -- "expr": "sort_desc(avg(irate(container_network_receive_bytes_total{cluster=\"$cluster\",namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\",namespace=~\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", +- "expr": "sort_desc(avg(irate(container_network_receive_bytes_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\",namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\",namespace=~\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", + "expr": "sort_desc(avg(irate(container_network_receive_bytes_total{namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=~\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", "format": "time_series", "intervalFactor": 1, @@ -61,7 +60,7 @@ "steppedLine": false, "targets": [ { -- "expr": "sort_desc(avg(irate(container_network_transmit_bytes_total{cluster=\"$cluster\",namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\",namespace=~\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", +- "expr": "sort_desc(avg(irate(container_network_transmit_bytes_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\",namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\",namespace=~\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", + "expr": "sort_desc(avg(irate(container_network_transmit_bytes_total{namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=~\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", "format": "time_series", "intervalFactor": 1, @@ -70,7 +69,7 @@ "steppedLine": false, "targets": [ { -- "expr": "sort_desc(sum(irate(container_network_receive_bytes_total{cluster=\"$cluster\",namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\",namespace=~\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", +- "expr": "sort_desc(sum(irate(container_network_receive_bytes_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\",namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\",namespace=~\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", + "expr": "sort_desc(sum(irate(container_network_receive_bytes_total{namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=~\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", "format": "time_series", "intervalFactor": 1, @@ -79,7 +78,7 @@ "steppedLine": false, "targets": [ { -- "expr": "sort_desc(sum(irate(container_network_transmit_bytes_total{cluster=\"$cluster\",namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\",namespace=~\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", +- "expr": "sort_desc(sum(irate(container_network_transmit_bytes_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\",namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\",namespace=~\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", + "expr": "sort_desc(sum(irate(container_network_transmit_bytes_total{namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=~\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", "format": "time_series", "intervalFactor": 1, @@ -88,7 +87,7 @@ "steppedLine": false, "targets": [ { -- "expr": "sort_desc(sum(irate(container_network_receive_packets_total{cluster=\"$cluster\",namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\",namespace=~\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", +- "expr": "sort_desc(sum(irate(container_network_receive_packets_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\",namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\",namespace=~\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", + "expr": "sort_desc(sum(irate(container_network_receive_packets_total{namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=~\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", "format": "time_series", "intervalFactor": 1, @@ -97,7 +96,7 @@ "steppedLine": false, "targets": [ { -- "expr": "sort_desc(sum(irate(container_network_transmit_packets_total{cluster=\"$cluster\",namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\",namespace=~\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", +- "expr": "sort_desc(sum(irate(container_network_transmit_packets_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\",namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\",namespace=~\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", + "expr": "sort_desc(sum(irate(container_network_transmit_packets_total{namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=~\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", "format": "time_series", "intervalFactor": 1, @@ -106,7 +105,7 @@ "steppedLine": false, "targets": [ { -- "expr": "sort_desc(sum(irate(container_network_receive_packets_dropped_total{cluster=\"$cluster\",namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\",namespace=~\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", +- "expr": "sort_desc(sum(irate(container_network_receive_packets_dropped_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\",namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\",namespace=~\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", + "expr": "sort_desc(sum(irate(container_network_receive_packets_dropped_total{namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=~\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", "format": "time_series", "intervalFactor": 1, @@ -115,26 +114,11 @@ "steppedLine": false, "targets": [ { -- "expr": "sort_desc(sum(irate(container_network_transmit_packets_dropped_total{cluster=\"$cluster\",namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\",namespace=~\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", +- "expr": "sort_desc(sum(irate(container_network_transmit_packets_dropped_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\",namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\",namespace=~\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", + "expr": "sort_desc(sum(irate(container_network_transmit_packets_dropped_total{namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=~\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", "format": "time_series", "intervalFactor": 1, "legendFormat": "{{`{{`}}pod{{`}}`}}", -@@ -1183,11 +1183,11 @@ - "list": [ - { - "current": { -- "text": "default", -- "value": "default" -+ "text": "Prometheus", -+ "value": "Prometheus" - }, - "hide": 0, -- "label": null, -+ "label": "Data Source", - "name": "datasource", - "options": [ - @@ -1198,32 +1198,6 @@ "type": "datasource" }, @@ -152,7 +136,7 @@ - "options": [ - - ], -- "query": "label_values(kube_pod_info, cluster)", +- "query": "label_values(kube_pod_info{job=\"kube-state-metrics\"}, cluster)", - "refresh": 2, - "regex": "", - "sort": 0, @@ -172,7 +156,7 @@ "value": "kube-system" }, "datasource": "$datasource", -- "definition": "label_values(container_network_receive_packets_total{cluster=\"$cluster\"}, namespace)", +- "definition": "label_values(container_network_receive_packets_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\"}, namespace)", + "definition": "label_values(container_network_receive_packets_total, namespace)", "hide": 0, "includeAll": true, @@ -181,7 +165,7 @@ "options": [ ], -- "query": "label_values(container_network_receive_packets_total{cluster=\"$cluster\"}, namespace)", +- "query": "label_values(container_network_receive_packets_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\"}, namespace)", + "query": "label_values(container_network_receive_packets_total, namespace)", "refresh": 2, "regex": "", diff --git a/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/_rules.tpl.patch b/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/_rules.tpl.patch index 7d94de55..89f45aa6 100644 --- a/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/_rules.tpl.patch +++ b/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/_rules.tpl.patch @@ -1,6 +1,6 @@ --- charts-original/templates/prometheus/_rules.tpl +++ charts/templates/prometheus/_rules.tpl -@@ -1,38 +1,8 @@ +@@ -1,36 +1,8 @@ -{{- /* -Generated file. Do not change in-place! In order to change this file first read following link: -https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack @@ -8,22 +8,24 @@ {{- define "rules.names" }} rules: - "alertmanager.rules" +- - "config-reloaders" +- - "etcd" - "general.rules" - - "k8s.rules" -- - "kube-apiserver.rules" - - "kube-apiserver-availability.rules" -- - "kube-apiserver-error" +- - "kube-apiserver-burnrate.rules" +- - "kube-apiserver-histogram.rules" - - "kube-apiserver-slos" - - "kube-prometheus-general.rules" -- - "kube-prometheus-node-alerting.rules" - - "kube-prometheus-node-recording.rules" - - "kube-scheduler.rules" - - "kube-state-metrics" - - "kubelet.rules" -- - "kubernetes-absent" +- - "kubernetes-apps" - - "kubernetes-resources" - "kubernetes-storage" - - "kubernetes-system" +- - "kubernetes-system-kube-proxy" - - "kubernetes-system-apiserver" - - "kubernetes-system-kubelet" - - "kubernetes-system-controller-manager" @@ -32,11 +34,8 @@ - - "node-exporter" - - "node.rules" - - "node-network" -- - "node-time" - - "prometheus-operator" -- - "prometheus.rules" - "prometheus" - - "kubernetes-apps" -- - "etcd" ++ - "kubernetes-apps" {{- end }} \ No newline at end of file diff --git a/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/ingress.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/ingress.yaml.patch index 74d383e9..f73d7bab 100644 --- a/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/ingress.yaml.patch +++ b/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/ingress.yaml.patch @@ -4,9 +4,8 @@ {{- if and .Values.prometheus.enabled .Values.prometheus.ingress.enabled -}} {{- $pathType := .Values.prometheus.ingress.pathType | default "ImplementationSpecific" -}} - {{- $serviceName := printf "%s-%s" (include "kube-prometheus-stack.fullname" .) "prometheus" -}} -- {{- $servicePort := .Values.prometheus.service.port -}} + {{- $serviceName := printf "%s-%s" (include "project-prometheus-stack.fullname" .) "prometheus" -}} -+ {{- $servicePort := .Values.prometheus.ingress.servicePort | default .Values.prometheus.service.port -}} + {{- $servicePort := .Values.prometheus.ingress.servicePort | default .Values.prometheus.service.port -}} {{- $routePrefix := list .Values.prometheus.prometheusSpec.routePrefix -}} {{- $paths := .Values.prometheus.ingress.paths | default $routePrefix -}} - {{- $apiIsStable := eq (include "kube-prometheus-stack.ingress.isStable" .) "true" -}} diff --git a/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/nginx-config.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/nginx-config.yaml.patch index 73957ef5..de44c36b 100644 --- a/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/nginx-config.yaml.patch +++ b/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/nginx-config.yaml.patch @@ -14,11 +14,3 @@ {{- if .Values.prometheus.annotations }} annotations: {{ toYaml .Values.prometheus.annotations | indent 4 }} -@@ -54,7 +54,6 @@ - - proxy_pass http://localhost:9090/; - -- sub_filter_types text/html; - sub_filter_once off; - sub_filter 'var PATH_PREFIX = "";' 'var PATH_PREFIX = ".";'; - diff --git a/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/podDisruptionBudget.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/podDisruptionBudget.yaml.patch index f75fed5b..953af239 100644 --- a/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/podDisruptionBudget.yaml.patch +++ b/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/podDisruptionBudget.yaml.patch @@ -22,6 +22,6 @@ selector: matchLabels: app.kubernetes.io/name: prometheus -- prometheus: {{ template "kube-prometheus-stack.fullname" . }}-prometheus +- prometheus: {{ template "kube-prometheus-stack.prometheus.crname" . }} + prometheus: {{ template "project-prometheus-stack.prometheus.crname" . }} {{- end }} diff --git a/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/prometheus.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/prometheus.yaml.patch index e577b95f..6d18c9f4 100644 --- a/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/prometheus.yaml.patch +++ b/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/prometheus.yaml.patch @@ -4,7 +4,7 @@ apiVersion: monitoring.coreos.com/v1 kind: Prometheus metadata: -- name: {{ template "kube-prometheus-stack.fullname" . }}-prometheus +- name: {{ template "kube-prometheus-stack.prometheus.crname" . }} - namespace: {{ template "kube-prometheus-stack.namespace" . }} + name: {{ template "project-prometheus-stack.prometheus.crname" . }} + namespace: {{ template "project-prometheus-stack.namespace" . }} @@ -27,7 +27,7 @@ port: {{ .Values.alertmanager.alertmanagerSpec.portName }} {{- if .Values.alertmanager.alertmanagerSpec.routePrefix }} pathPrefix: "{{ .Values.alertmanager.alertmanagerSpec.routePrefix }}" -@@ -55,19 +55,17 @@ +@@ -55,11 +55,6 @@ {{- else if .Values.prometheus.prometheusSpec.prometheusExternalLabelName }} prometheusExternalLabelName: "{{ .Values.prometheus.prometheusSpec.prometheusExternalLabelName }}" {{- end }} @@ -35,15 +35,15 @@ - replicaExternalLabelName: "" -{{- else if .Values.prometheus.prometheusSpec.replicaExternalLabelName }} - replicaExternalLabelName: "{{ .Values.prometheus.prometheusSpec.replicaExternalLabelName }}" -+{{- if .Values.prometheus.prometheusSpec.enableRemoteWriteReceiver }} -+ enableRemoteWriteReceiver: {{ .Values.prometheus.prometheusSpec.enableRemoteWriteReceiver }} +-{{- end }} + {{- if .Values.prometheus.prometheusSpec.enableRemoteWriteReceiver }} + enableRemoteWriteReceiver: {{ .Values.prometheus.prometheusSpec.enableRemoteWriteReceiver }} {{- end }} - {{- if .Values.prometheus.prometheusSpec.externalUrl }} - externalUrl: "{{ tpl .Values.prometheus.prometheusSpec.externalUrl . }}" +@@ -68,9 +63,9 @@ {{- else if and .Values.prometheus.ingress.enabled .Values.prometheus.ingress.hosts }} externalUrl: "http://{{ tpl (index .Values.prometheus.ingress.hosts 0) . }}{{ .Values.prometheus.prometheusSpec.routePrefix }}" {{- else if not (or (kindIs "invalid" .Values.global.cattle.url) (kindIs "invalid" .Values.global.cattle.clusterId)) }} -- externalUrl: "{{ .Values.global.cattle.url }}/k8s/clusters/{{ .Values.global.cattle.clusterId }}/api/v1/namespaces/{{ .Values.namespaceOverride }}/services/http:{{ template "kube-prometheus-stack.fullname" . }}-prometheus:{{ .Values.prometheus.service.port }}/proxy" +- externalUrl: "{{ .Values.global.cattle.url }}/k8s/clusters/{{ .Values.global.cattle.clusterId }}/api/v1/namespaces/{{ template "kube-prometheus-stack.namespace" . }}/services/http:{{ template "kube-prometheus-stack.fullname" . }}-prometheus:{{ .Values.prometheus.service.port }}/proxy" + externalUrl: "{{ .Values.global.cattle.url }}/k8s/clusters/{{ .Values.global.cattle.clusterId }}/api/v1/namespaces/{{ template "project-prometheus-stack.namespace" . }}/services/http:{{ template "project-prometheus-stack.fullname" . }}-prometheus:{{ .Values.prometheus.service.port }}/proxy" {{- else }} - externalUrl: http://{{ template "kube-prometheus-stack.fullname" . }}-prometheus.{{ template "kube-prometheus-stack.namespace" . }}:{{ .Values.prometheus.service.port }} @@ -51,31 +51,7 @@ {{- end }} nodeSelector: {{ include "linux-node-selector" . | nindent 4 }} {{- if .Values.prometheus.prometheusSpec.nodeSelector }} -@@ -84,6 +82,10 @@ - web: - {{ toYaml .Values.prometheus.prometheusSpec.web | indent 4 }} - {{- end }} -+{{- if .Values.prometheus.prometheusSpec.exemplars }} -+ exemplars: -+ {{ toYaml .Values.prometheus.prometheusSpec.exemplars | indent 4 }} -+{{- end }} - {{- if .Values.prometheus.prometheusSpec.enableFeatures }} - enableFeatures: - {{- range $enableFeatures := .Values.prometheus.prometheusSpec.enableFeatures }} -@@ -107,8 +109,10 @@ - {{- if .Values.prometheus.prometheusSpec.retentionSize }} - retentionSize: {{ .Values.prometheus.prometheusSpec.retentionSize | quote }} - {{- end }} --{{- if .Values.prometheus.prometheusSpec.walCompression }} -- walCompression: {{ .Values.prometheus.prometheusSpec.walCompression }} -+{{- if eq .Values.prometheus.prometheusSpec.walCompression false }} -+ walCompression: false -+{{ else }} -+ walCompression: true - {{- end }} - {{- if .Values.prometheus.prometheusSpec.routePrefix }} - routePrefix: {{ .Values.prometheus.prometheusSpec.routePrefix | quote }} -@@ -121,7 +125,7 @@ +@@ -130,7 +125,7 @@ configMaps: {{ toYaml .Values.prometheus.prometheusSpec.configMaps | indent 4 }} {{- end }} @@ -84,7 +60,7 @@ {{- if .Values.prometheus.prometheusSpec.serviceMonitorSelector }} serviceMonitorSelector: {{ toYaml .Values.prometheus.prometheusSpec.serviceMonitorSelector | indent 4 }} -@@ -132,12 +136,7 @@ +@@ -141,12 +136,7 @@ {{ else }} serviceMonitorSelector: {} {{- end }} @@ -98,7 +74,7 @@ {{- if .Values.prometheus.prometheusSpec.podMonitorSelector }} podMonitorSelector: {{ toYaml .Values.prometheus.prometheusSpec.podMonitorSelector | indent 4 }} -@@ -148,12 +147,7 @@ +@@ -157,12 +147,7 @@ {{ else }} podMonitorSelector: {} {{- end }} @@ -112,7 +88,7 @@ {{- if .Values.prometheus.prometheusSpec.probeSelector }} probeSelector: {{ toYaml .Values.prometheus.prometheusSpec.probeSelector | indent 4 }} -@@ -164,54 +158,25 @@ +@@ -173,40 +158,12 @@ {{ else }} probeSelector: {} {{- end }} @@ -155,22 +131,7 @@ {{- if .Values.prometheus.prometheusSpec.ruleSelector }} ruleSelector: {{ toYaml .Values.prometheus.prometheusSpec.ruleSelector | indent 4}} - {{- else if .Values.prometheus.prometheusSpec.ruleSelectorNilUsesHelmValues }} - ruleSelector: - matchLabels: -- app: {{ template "kube-prometheus-stack.name" . }} - release: {{ $.Release.Name | quote }} - {{ else }} - ruleSelector: {} - {{- end }} - {{- if .Values.prometheus.prometheusSpec.storageSpec }} - storage: --{{ toYaml .Values.prometheus.prometheusSpec.storageSpec | indent 4 }} -+{{ tpl (toYaml .Values.prometheus.prometheusSpec.storageSpec | indent 4) . }} - {{- end }} - {{- if .Values.prometheus.prometheusSpec.podMetadata }} - podMetadata: -@@ -233,7 +198,7 @@ +@@ -241,7 +198,7 @@ labelSelector: matchExpressions: - {key: app.kubernetes.io/name, operator: In, values: [prometheus]} @@ -179,7 +140,7 @@ {{- else if eq .Values.prometheus.prometheusSpec.podAntiAffinity "soft" }} podAntiAffinity: preferredDuringSchedulingIgnoredDuringExecution: -@@ -243,7 +208,7 @@ +@@ -251,7 +208,7 @@ labelSelector: matchExpressions: - {key: app.kubernetes.io/name, operator: In, values: [prometheus]} @@ -188,11 +149,11 @@ {{- end }} {{- end }} tolerations: {{ include "linux-node-tolerations" . | nindent 4 }} -@@ -256,34 +221,13 @@ +@@ -264,45 +221,16 @@ {{- end }} {{- if .Values.global.imagePullSecrets }} imagePullSecrets: --{{ toYaml .Values.global.imagePullSecrets | indent 4 }} +-{{ include "kube-prometheus-stack.imagePullSecrets" . | trim | indent 4 }} +{{ include "project-prometheus-stack.imagePullSecrets" . | trim | indent 4 }} {{- end }} -{{- if .Values.prometheus.prometheusSpec.additionalScrapeConfigs }} @@ -217,17 +178,29 @@ -{{- if .Values.prometheus.prometheusSpec.additionalAlertManagerConfigsSecret }} - name: {{ .Values.prometheus.prometheusSpec.additionalAlertManagerConfigsSecret.name }} - key: {{ .Values.prometheus.prometheusSpec.additionalAlertManagerConfigsSecret.key }} +- {{- if hasKey .Values.prometheus.prometheusSpec.additionalAlertManagerConfigsSecret "optional" }} +- optional: {{ .Values.prometheus.prometheusSpec.additionalAlertManagerConfigsSecret.optional }} +- {{- end }} -{{- end }} -{{- end }} -{{- if .Values.prometheus.prometheusSpec.additionalAlertRelabelConfigs }} - additionalAlertRelabelConfigs: - name: {{ template "kube-prometheus-stack.fullname" . }}-prometheus-am-relabel-confg - key: additional-alert-relabel-configs.yaml +-{{- end }} +-{{- if .Values.prometheus.prometheusSpec.additionalAlertRelabelConfigsSecret }} +- additionalAlertRelabelConfigs: +- name: {{ .Values.prometheus.prometheusSpec.additionalAlertRelabelConfigsSecret.name }} +- key: {{ .Values.prometheus.prometheusSpec.additionalAlertRelabelConfigsSecret.key }} -{{- end }} {{- if .Values.prometheus.prometheusSpec.containers }} containers: - {{ tpl .Values.prometheus.prometheusSpec.containers $ | indent 4 }} -@@ -295,16 +239,10 @@ +-{{ toYaml .Values.prometheus.prometheusSpec.containers | indent 4 }} ++{{ tpl .Values.prometheus.prometheusSpec.containers $ | indent 4 }} + {{- end }} + {{- if .Values.prometheus.prometheusSpec.initContainers }} + initContainers: +@@ -311,10 +239,6 @@ {{- if .Values.prometheus.prometheusSpec.priorityClassName }} priorityClassName: {{ .Values.prometheus.prometheusSpec.priorityClassName }} {{- end }} @@ -238,13 +211,7 @@ {{- if .Values.prometheus.prometheusSpec.disableCompaction }} disableCompaction: {{ .Values.prometheus.prometheusSpec.disableCompaction }} {{- end }} --{{- if .Values.prometheus.prometheusSpec.portName }} - portName: {{ .Values.prometheus.prometheusSpec.portName }} --{{- end }} - {{- if .Values.prometheus.prometheusSpec.volumes }} - volumes: - {{ toYaml .Values.prometheus.prometheusSpec.volumes | indent 4 }} -@@ -323,21 +261,28 @@ +@@ -337,16 +261,14 @@ {{- if .Values.prometheus.prometheusSpec.overrideHonorTimestamps }} overrideHonorTimestamps: {{ .Values.prometheus.prometheusSpec.overrideHonorTimestamps }} {{- end }} @@ -264,28 +231,3 @@ {{- end }} {{- if .Values.prometheus.prometheusSpec.prometheusRulesExcludedFromEnforce }} {{ toYaml .Values.prometheus.prometheusSpec.prometheusRulesExcludedFromEnforce | indent 4 }} - {{- end }} -+ excludedFromEnforcement: -+{{- range $prometheusDefaultRulesExcludedFromEnforce.rules }} -+ - resource: prometheusrules -+ namespace: "{{ template "kube-prometheus-stack.namespace" $ }}" -+ name: "{{ printf "%s-%s" (include "kube-prometheus-stack.fullname" $) . | trunc 63 | trimSuffix "-" }}" - {{- end }} -+{{- if .Values.prometheus.prometheusSpec.excludedFromEnforcement }} -+{{ tpl (toYaml .Values.prometheus.prometheusSpec.excludedFromEnforcement | indent 4) . }} -+{{- end }} -+{{- end }} - {{- if .Values.prometheus.prometheusSpec.queryLogFile }} - queryLogFile: {{ .Values.prometheus.prometheusSpec.queryLogFile }} - {{- end }} -@@ -358,5 +303,8 @@ - {{- end }} - {{- if .Values.prometheus.prometheusSpec.allowOverlappingBlocks }} - allowOverlappingBlocks: {{ .Values.prometheus.prometheusSpec.allowOverlappingBlocks }} -+{{- end }} -+{{- if .Values.prometheus.prometheusSpec.minReadySeconds }} -+ minReadySeconds: {{ .Values.prometheus.prometheusSpec.minReadySeconds }} - {{- end }} --{{- end }} -+{{- end }} -\ No newline at end of file diff --git a/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/psp.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/psp.yaml.patch index 072c5397..ba6ac1dd 100644 --- a/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/psp.yaml.patch +++ b/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/psp.yaml.patch @@ -1,6 +1,6 @@ --- charts-original/templates/prometheus/psp.yaml +++ charts/templates/prometheus/psp.yaml -@@ -2,22 +2,16 @@ +@@ -2,14 +2,14 @@ apiVersion: policy/v1beta1 kind: PodSecurityPolicy metadata: @@ -17,31 +17,8 @@ +{{ include "project-prometheus-stack.labels" . | indent 4 }} spec: privileged: false -- # Required to prevent escalations to root. -- # allowPrivilegeEscalation: false -- # This is redundant with non-root + disallow privilege escalation, -- # but we can provide it for defense in depth. -- #requiredDropCapabilities: -- # - ALL # Allow core volume types. - volumes: - - 'configMap' -@@ -41,22 +35,18 @@ - supplementalGroups: - rule: 'MustRunAs' - ranges: -- # Forbid adding the root group. -+ # Allow adding the root group. - - min: 0 - max: 65535 - fsGroup: - rule: 'MustRunAs' - ranges: -- # Forbid adding the root group. -+ # Allow adding the root group. - - min: 0 - max: 65535 - readOnlyRootFilesystem: false +@@ -48,9 +48,5 @@ {{- if .Values.prometheus.podSecurityPolicy.allowedCapabilities }} allowedCapabilities: {{ toYaml .Values.prometheus.podSecurityPolicy.allowedCapabilities | indent 4 }} diff --git a/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/rules-1.14/alertmanager.rules.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/rules-1.14/alertmanager.rules.yaml.patch index c173343d..cac8c8c3 100644 --- a/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/rules-1.14/alertmanager.rules.yaml.patch +++ b/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/rules-1.14/alertmanager.rules.yaml.patch @@ -1,6 +1,6 @@ --- charts-original/templates/prometheus/rules-1.14/alertmanager.rules.yaml +++ charts/templates/prometheus/rules-1.14/alertmanager.rules.yaml -@@ -1,21 +1,21 @@ +@@ -1,20 +1,21 @@ {{- /* Generated from 'alertmanager.rules' group from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/alertmanager-prometheusRule.yaml Do not change in-place! In order to change this file first read following link: @@ -13,7 +13,7 @@ -{{- $namespace := printf "%s" (include "kube-prometheus-stack.namespace" .) }} +{{- $alertmanagerJob := printf "%s-%s" (include "project-prometheus-stack.fullname" .) "alertmanager" }} +{{- $namespace := printf "%s" (include "project-prometheus-stack.namespace" .) }} - {{- if and .Values.alertmanager.enabled .Values.alertmanager.serviceMonitor.selfMonitor }} ++{{- if and .Values.alertmanager.enabled .Values.alertmanager.serviceMonitor.selfMonitor }} apiVersion: monitoring.coreos.com/v1 kind: PrometheusRule metadata: @@ -29,138 +29,10 @@ {{- if .Values.defaultRules.labels }} {{ toYaml .Values.defaultRules.labels | indent 4 }} {{- end }} -@@ -27,10 +27,14 @@ - groups: - - name: alertmanager.rules - rules: -+{{- if not (.Values.defaultRules.disabled.AlertmanagerFailedReload | default false) }} - - alert: AlertmanagerFailedReload - annotations: -+{{- if .Values.defaultRules.additionalRuleAnnotations }} -+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} -+{{- end }} - description: Configuration has failed to load for {{`{{`}} $labels.namespace {{`}}`}}/{{`{{`}} $labels.pod{{`}}`}}. -- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-alertmanagerfailedreload -+ runbook_url: {{ .Values.defaultRules.runbookUrl }}/alertmanager/alertmanagerfailedreload - summary: Reloading an Alertmanager configuration has failed. - expr: |- - # Without max_over_time, failed scrapes could create false negatives, see -@@ -42,10 +46,15 @@ - {{- if .Values.defaultRules.additionalRuleLabels }} +@@ -212,4 +213,4 @@ {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} {{- end }} -+{{- end }} -+{{- if not (.Values.defaultRules.disabled.AlertmanagerMembersInconsistent | default false) }} - - alert: AlertmanagerMembersInconsistent - annotations: -+{{- if .Values.defaultRules.additionalRuleAnnotations }} -+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} -+{{- end }} - description: Alertmanager {{`{{`}} $labels.namespace {{`}}`}}/{{`{{`}} $labels.pod{{`}}`}} has only found {{`{{`}} $value {{`}}`}} members of the {{`{{`}}$labels.job{{`}}`}} cluster. -- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-alertmanagermembersinconsistent -+ runbook_url: {{ .Values.defaultRules.runbookUrl }}/alertmanager/alertmanagermembersinconsistent - summary: A member of an Alertmanager cluster has not found all other cluster members. - expr: |- - # Without max_over_time, failed scrapes could create false negatives, see -@@ -59,10 +68,15 @@ - {{- if .Values.defaultRules.additionalRuleLabels }} - {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} {{- end }} +-{{- end }} +\ No newline at end of file +{{- end }} -+{{- if not (.Values.defaultRules.disabled.AlertmanagerFailedToSendAlerts | default false) }} - - alert: AlertmanagerFailedToSendAlerts - annotations: -+{{- if .Values.defaultRules.additionalRuleAnnotations }} -+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} -+{{- end }} - description: Alertmanager {{`{{`}} $labels.namespace {{`}}`}}/{{`{{`}} $labels.pod{{`}}`}} failed to send {{`{{`}} $value | humanizePercentage {{`}}`}} of notifications to {{`{{`}} $labels.integration {{`}}`}}. -- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-alertmanagerfailedtosendalerts -+ runbook_url: {{ .Values.defaultRules.runbookUrl }}/alertmanager/alertmanagerfailedtosendalerts - summary: An Alertmanager instance failed to send notifications. - expr: |- - ( -@@ -77,10 +91,15 @@ - {{- if .Values.defaultRules.additionalRuleLabels }} - {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} - {{- end }} -+{{- end }} -+{{- if not (.Values.defaultRules.disabled.AlertmanagerClusterFailedToSendAlerts | default false) }} - - alert: AlertmanagerClusterFailedToSendAlerts - annotations: -+{{- if .Values.defaultRules.additionalRuleAnnotations }} -+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} -+{{- end }} - description: The minimum notification failure rate to {{`{{`}} $labels.integration {{`}}`}} sent from any instance in the {{`{{`}}$labels.job{{`}}`}} cluster is {{`{{`}} $value | humanizePercentage {{`}}`}}. -- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-alertmanagerclusterfailedtosendalerts -+ runbook_url: {{ .Values.defaultRules.runbookUrl }}/alertmanager/alertmanagerclusterfailedtosendalerts - summary: All Alertmanager instances in a cluster failed to send notifications to a critical integration. - expr: |- - min by (namespace,service, integration) ( -@@ -95,10 +114,15 @@ - {{- if .Values.defaultRules.additionalRuleLabels }} - {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} - {{- end }} -+{{- end }} -+{{- if not (.Values.defaultRules.disabled.AlertmanagerClusterFailedToSendAlerts | default false) }} - - alert: AlertmanagerClusterFailedToSendAlerts - annotations: -+{{- if .Values.defaultRules.additionalRuleAnnotations }} -+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} -+{{- end }} - description: The minimum notification failure rate to {{`{{`}} $labels.integration {{`}}`}} sent from any instance in the {{`{{`}}$labels.job{{`}}`}} cluster is {{`{{`}} $value | humanizePercentage {{`}}`}}. -- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-alertmanagerclusterfailedtosendalerts -+ runbook_url: {{ .Values.defaultRules.runbookUrl }}/alertmanager/alertmanagerclusterfailedtosendalerts - summary: All Alertmanager instances in a cluster failed to send notifications to a non-critical integration. - expr: |- - min by (namespace,service, integration) ( -@@ -113,10 +137,15 @@ - {{- if .Values.defaultRules.additionalRuleLabels }} - {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} - {{- end }} -+{{- end }} -+{{- if not (.Values.defaultRules.disabled.AlertmanagerConfigInconsistent | default false) }} - - alert: AlertmanagerConfigInconsistent - annotations: -+{{- if .Values.defaultRules.additionalRuleAnnotations }} -+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} -+{{- end }} - description: Alertmanager instances within the {{`{{`}}$labels.job{{`}}`}} cluster have different configurations. -- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-alertmanagerconfiginconsistent -+ runbook_url: {{ .Values.defaultRules.runbookUrl }}/alertmanager/alertmanagerconfiginconsistent - summary: Alertmanager instances within the same cluster have different configurations. - expr: |- - count by (namespace,service) ( -@@ -129,10 +158,15 @@ - {{- if .Values.defaultRules.additionalRuleLabels }} - {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} - {{- end }} -+{{- end }} -+{{- if not (.Values.defaultRules.disabled.AlertmanagerClusterDown | default false) }} - - alert: AlertmanagerClusterDown - annotations: -+{{- if .Values.defaultRules.additionalRuleAnnotations }} -+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} -+{{- end }} - description: '{{`{{`}} $value | humanizePercentage {{`}}`}} of Alertmanager instances within the {{`{{`}}$labels.job{{`}}`}} cluster have been up for less than half of the last 5m.' -- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-alertmanagerclusterdown -+ runbook_url: {{ .Values.defaultRules.runbookUrl }}/alertmanager/alertmanagerclusterdown - summary: Half or more of the Alertmanager instances within the same cluster are down. - expr: |- - ( -@@ -151,10 +185,15 @@ - {{- if .Values.defaultRules.additionalRuleLabels }} - {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} - {{- end }} -+{{- end }} -+{{- if not (.Values.defaultRules.disabled.AlertmanagerClusterCrashlooping | default false) }} - - alert: AlertmanagerClusterCrashlooping - annotations: -+{{- if .Values.defaultRules.additionalRuleAnnotations }} -+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} -+{{- end }} - description: '{{`{{`}} $value | humanizePercentage {{`}}`}} of Alertmanager instances within the {{`{{`}}$labels.job{{`}}`}} cluster have restarted at least 5 times in the last 10m.' -- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-alertmanagerclustercrashlooping -+ runbook_url: {{ .Values.defaultRules.runbookUrl }}/alertmanager/alertmanagerclustercrashlooping - summary: Half or more of the Alertmanager instances within the same cluster are crashlooping. - expr: |- - ( diff --git a/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/rules-1.14/general.rules.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/rules-1.14/general.rules.yaml.patch index da80c12c..8b613726 100644 --- a/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/rules-1.14/general.rules.yaml.patch +++ b/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/rules-1.14/general.rules.yaml.patch @@ -2,8 +2,7 @@ +++ charts/templates/prometheus/rules-1.14/general.rules.yaml @@ -1,18 +1,18 @@ {{- /* --Generated from 'general.rules' group from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/kube-prometheus-prometheusRule.yaml -+Generated from 'general.rules' group from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/kubePrometheus-prometheusRule.yaml + Generated from 'general.rules' group from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/kubePrometheus-prometheusRule.yaml Do not change in-place! In order to change this file first read following link: -https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack +https://github.com/prometheus-community/helm-charts/tree/main/charts/project-prometheus-stack/hack @@ -25,77 +24,3 @@ {{- if .Values.defaultRules.labels }} {{ toYaml .Values.defaultRules.labels | indent 4 }} {{- end }} -@@ -24,10 +24,14 @@ - groups: - - name: general.rules - rules: -+{{- if not (.Values.defaultRules.disabled.TargetDown | default false) }} - - alert: TargetDown - annotations: -+{{- if .Values.defaultRules.additionalRuleAnnotations }} -+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} -+{{- end }} - description: '{{`{{`}} printf "%.4g" $value {{`}}`}}% of the {{`{{`}} $labels.job {{`}}`}}/{{`{{`}} $labels.service {{`}}`}} targets in {{`{{`}} $labels.namespace {{`}}`}} namespace are down.' -- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-targetdown -+ runbook_url: {{ .Values.defaultRules.runbookUrl }}/general/targetdown - summary: One or more targets are unreachable. - expr: 100 * (count(up == 0) BY (job, namespace, service) / count(up) BY (job, namespace, service)) > 10 - for: 10m -@@ -36,8 +40,13 @@ - {{- if .Values.defaultRules.additionalRuleLabels }} - {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} - {{- end }} -+{{- end }} -+{{- if not (.Values.defaultRules.disabled.Watchdog | default false) }} - - alert: Watchdog - annotations: -+{{- if .Values.defaultRules.additionalRuleAnnotations }} -+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} -+{{- end }} - description: 'This is an alert meant to ensure that the entire alerting pipeline is functional. - - This alert is always firing, therefore it should always be firing in Alertmanager -@@ -49,12 +58,41 @@ - "DeadMansSnitch" integration in PagerDuty. - - ' -- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-watchdog -+ runbook_url: {{ .Values.defaultRules.runbookUrl }}/general/watchdog - summary: An alert that should always be firing to certify that Alertmanager is working properly. - expr: vector(1) - labels: - severity: none - {{- if .Values.defaultRules.additionalRuleLabels }} - {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} -+{{- end }} -+{{- end }} -+{{- if not (.Values.defaultRules.disabled.InfoInhibitor | default false) }} -+ - alert: InfoInhibitor -+ annotations: -+{{- if .Values.defaultRules.additionalRuleAnnotations }} -+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} -+{{- end }} -+ description: 'This is an alert that is used to inhibit info alerts. -+ -+ By themselves, the info-level alerts are sometimes very noisy, but they are relevant when combined with -+ -+ other alerts. -+ -+ This alert fires whenever there''s a severity="info" alert, and stops firing when another alert with a -+ -+ severity of ''warning'' or ''critical'' starts firing on the same namespace. -+ -+ This alert should be routed to a null receiver and configured to inhibit alerts with severity="info". -+ -+ ' -+ runbook_url: {{ .Values.defaultRules.runbookUrl }}/general/infoinhibitor -+ summary: Info-level alert inhibition. -+ expr: ALERTS{severity = "info"} == 1 unless on(namespace) ALERTS{alertname != "InfoInhibitor", severity =~ "warning|critical", alertstate="firing"} == 1 -+ labels: -+ severity: none -+{{- if .Values.defaultRules.additionalRuleLabels }} -+{{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} -+{{- end }} - {{- end }} - {{- end }} -\ No newline at end of file diff --git a/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/rules-1.14/kubernetes-apps.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/rules-1.14/kubernetes-apps.yaml.patch index 788fd89d..188f524a 100644 --- a/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/rules-1.14/kubernetes-apps.yaml.patch +++ b/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/rules-1.14/kubernetes-apps.yaml.patch @@ -2,8 +2,7 @@ +++ charts/templates/prometheus/rules-1.14/kubernetes-apps.yaml @@ -1,7 +1,7 @@ {{- /* --Generated from 'kubernetes-apps' group from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/kubernetes-prometheusRule.yaml -+Generated from 'kubernetes-apps' group from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/kubernetesControlPlane-prometheusRule.yaml + Generated from 'kubernetes-apps' group from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/kubernetesControlPlane-prometheusRule.yaml Do not change in-place! In order to change this file first read following link: -https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack +https://github.com/prometheus-community/helm-charts/tree/main/charts/project-prometheus-stack/hack @@ -26,312 +25,3 @@ {{- if .Values.defaultRules.labels }} {{ toYaml .Values.defaultRules.labels | indent 4 }} {{- end }} -@@ -25,32 +25,38 @@ - groups: - - name: kubernetes-apps - rules: -+{{- if not (.Values.defaultRules.disabled.KubePodCrashLooping | default false) }} - - alert: KubePodCrashLooping - annotations: -- description: Pod {{`{{`}} $labels.namespace {{`}}`}}/{{`{{`}} $labels.pod {{`}}`}} ({{`{{`}} $labels.container {{`}}`}}) is restarting {{`{{`}} printf "%.2f" $value {{`}}`}} times / 10 minutes. -- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubepodcrashlooping -+{{- if .Values.defaultRules.additionalRuleAnnotations }} -+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} -+{{- end }} -+ description: 'Pod {{`{{`}} $labels.namespace {{`}}`}}/{{`{{`}} $labels.pod {{`}}`}} ({{`{{`}} $labels.container {{`}}`}}) is in waiting state (reason: "CrashLoopBackOff").' -+ runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubepodcrashlooping - summary: Pod is crash looping. -- expr: |- -- increase(kube_pod_container_status_restarts_total{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"}[10m]) > 0 -- and -- kube_pod_container_status_waiting{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"} == 1 -+ expr: max_over_time(kube_pod_container_status_waiting_reason{reason="CrashLoopBackOff", job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"}[5m]) >= 1 - for: 15m - labels: - severity: warning - {{- if .Values.defaultRules.additionalRuleLabels }} - {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} - {{- end }} -+{{- end }} -+{{- if not (.Values.defaultRules.disabled.KubePodNotReady | default false) }} - - alert: KubePodNotReady - annotations: -+{{- if .Values.defaultRules.additionalRuleAnnotations }} -+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} -+{{- end }} - description: Pod {{`{{`}} $labels.namespace {{`}}`}}/{{`{{`}} $labels.pod {{`}}`}} has been in a non-ready state for longer than 15 minutes. -- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubepodnotready -+ runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubepodnotready - summary: Pod has been in a non-ready state for more than 15 minutes. - expr: |- -- sum by (namespace, pod) ( -- max by(namespace, pod) ( -+ sum by (namespace, pod, cluster) ( -+ max by(namespace, pod, cluster) ( - kube_pod_status_phase{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}", phase=~"Pending|Unknown"} -- ) * on(namespace, pod) group_left(owner_kind) topk by(namespace, pod) ( -- 1, max by(namespace, pod, owner_kind) (kube_pod_owner{owner_kind!="Job"}) -+ ) * on(namespace, pod, cluster) group_left(owner_kind) topk by(namespace, pod, cluster) ( -+ 1, max by(namespace, pod, owner_kind, cluster) (kube_pod_owner{owner_kind!="Job"}) - ) - ) > 0 - for: 15m -@@ -59,10 +65,15 @@ - {{- if .Values.defaultRules.additionalRuleLabels }} - {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} - {{- end }} -+{{- end }} -+{{- if not (.Values.defaultRules.disabled.KubeDeploymentGenerationMismatch | default false) }} - - alert: KubeDeploymentGenerationMismatch - annotations: -+{{- if .Values.defaultRules.additionalRuleAnnotations }} -+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} -+{{- end }} - description: Deployment generation for {{`{{`}} $labels.namespace {{`}}`}}/{{`{{`}} $labels.deployment {{`}}`}} does not match, this indicates that the Deployment has failed but has not been rolled back. -- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubedeploymentgenerationmismatch -+ runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubedeploymentgenerationmismatch - summary: Deployment generation mismatch due to possible roll-back - expr: |- - kube_deployment_status_observed_generation{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"} -@@ -74,10 +85,15 @@ - {{- if .Values.defaultRules.additionalRuleLabels }} - {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} - {{- end }} -+{{- end }} -+{{- if not (.Values.defaultRules.disabled.KubeDeploymentReplicasMismatch | default false) }} - - alert: KubeDeploymentReplicasMismatch - annotations: -+{{- if .Values.defaultRules.additionalRuleAnnotations }} -+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} -+{{- end }} - description: Deployment {{`{{`}} $labels.namespace {{`}}`}}/{{`{{`}} $labels.deployment {{`}}`}} has not matched the expected number of replicas for longer than 15 minutes. -- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubedeploymentreplicasmismatch -+ runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubedeploymentreplicasmismatch - summary: Deployment has not matched the expected number of replicas. - expr: |- - ( -@@ -95,10 +111,15 @@ - {{- if .Values.defaultRules.additionalRuleLabels }} - {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} - {{- end }} -+{{- end }} -+{{- if not (.Values.defaultRules.disabled.KubeStatefulSetReplicasMismatch | default false) }} - - alert: KubeStatefulSetReplicasMismatch - annotations: -+{{- if .Values.defaultRules.additionalRuleAnnotations }} -+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} -+{{- end }} - description: StatefulSet {{`{{`}} $labels.namespace {{`}}`}}/{{`{{`}} $labels.statefulset {{`}}`}} has not matched the expected number of replicas for longer than 15 minutes. -- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubestatefulsetreplicasmismatch -+ runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubestatefulsetreplicasmismatch - summary: Deployment has not matched the expected number of replicas. - expr: |- - ( -@@ -116,10 +137,15 @@ - {{- if .Values.defaultRules.additionalRuleLabels }} - {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} - {{- end }} -+{{- end }} -+{{- if not (.Values.defaultRules.disabled.KubeStatefulSetGenerationMismatch | default false) }} - - alert: KubeStatefulSetGenerationMismatch - annotations: -+{{- if .Values.defaultRules.additionalRuleAnnotations }} -+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} -+{{- end }} - description: StatefulSet generation for {{`{{`}} $labels.namespace {{`}}`}}/{{`{{`}} $labels.statefulset {{`}}`}} does not match, this indicates that the StatefulSet has failed but has not been rolled back. -- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubestatefulsetgenerationmismatch -+ runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubestatefulsetgenerationmismatch - summary: StatefulSet generation mismatch due to possible roll-back - expr: |- - kube_statefulset_status_observed_generation{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"} -@@ -131,10 +157,15 @@ - {{- if .Values.defaultRules.additionalRuleLabels }} - {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} - {{- end }} -+{{- end }} -+{{- if not (.Values.defaultRules.disabled.KubeStatefulSetUpdateNotRolledOut | default false) }} - - alert: KubeStatefulSetUpdateNotRolledOut - annotations: -+{{- if .Values.defaultRules.additionalRuleAnnotations }} -+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} -+{{- end }} - description: StatefulSet {{`{{`}} $labels.namespace {{`}}`}}/{{`{{`}} $labels.statefulset {{`}}`}} update has not been rolled out. -- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubestatefulsetupdatenotrolledout -+ runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubestatefulsetupdatenotrolledout - summary: StatefulSet update has not been rolled out. - expr: |- - ( -@@ -160,10 +191,15 @@ - {{- if .Values.defaultRules.additionalRuleLabels }} - {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} - {{- end }} -+{{- end }} -+{{- if not (.Values.defaultRules.disabled.KubeDaemonSetRolloutStuck | default false) }} - - alert: KubeDaemonSetRolloutStuck - annotations: -+{{- if .Values.defaultRules.additionalRuleAnnotations }} -+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} -+{{- end }} - description: DaemonSet {{`{{`}} $labels.namespace {{`}}`}}/{{`{{`}} $labels.daemonset {{`}}`}} has not finished or progressed for at least 15 minutes. -- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubedaemonsetrolloutstuck -+ runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubedaemonsetrolloutstuck - summary: DaemonSet rollout is stuck. - expr: |- - ( -@@ -176,7 +212,7 @@ - != - 0 - ) or ( -- kube_daemonset_updated_number_scheduled{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"} -+ kube_daemonset_status_updated_number_scheduled{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"} - != - kube_daemonset_status_desired_number_scheduled{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"} - ) or ( -@@ -185,7 +221,7 @@ - kube_daemonset_status_desired_number_scheduled{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"} - ) - ) and ( -- changes(kube_daemonset_updated_number_scheduled{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"}[5m]) -+ changes(kube_daemonset_status_updated_number_scheduled{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"}[5m]) - == - 0 - ) -@@ -195,22 +231,32 @@ - {{- if .Values.defaultRules.additionalRuleLabels }} - {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} - {{- end }} -+{{- end }} -+{{- if not (.Values.defaultRules.disabled.KubeContainerWaiting | default false) }} - - alert: KubeContainerWaiting - annotations: -- description: Pod {{`{{`}} $labels.namespace {{`}}`}}/{{`{{`}} $labels.pod {{`}}`}} container {{`{{`}} $labels.container{{`}}`}} has been in waiting state for longer than 1 hour. -- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubecontainerwaiting -+{{- if .Values.defaultRules.additionalRuleAnnotations }} -+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} -+{{- end }} -+ description: pod/{{`{{`}} $labels.pod {{`}}`}} in namespace {{`{{`}} $labels.namespace {{`}}`}} on container {{`{{`}} $labels.container{{`}}`}} has been in waiting state for longer than 1 hour. -+ runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubecontainerwaiting - summary: Pod container waiting longer than 1 hour -- expr: sum by (namespace, pod, container) (kube_pod_container_status_waiting_reason{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"}) > 0 -+ expr: sum by (namespace, pod, container, cluster) (kube_pod_container_status_waiting_reason{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"}) > 0 - for: 1h - labels: - severity: warning - {{- if .Values.defaultRules.additionalRuleLabels }} - {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} - {{- end }} -+{{- end }} -+{{- if not (.Values.defaultRules.disabled.KubeDaemonSetNotScheduled | default false) }} - - alert: KubeDaemonSetNotScheduled - annotations: -+{{- if .Values.defaultRules.additionalRuleAnnotations }} -+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} -+{{- end }} - description: '{{`{{`}} $value {{`}}`}} Pods of DaemonSet {{`{{`}} $labels.namespace {{`}}`}}/{{`{{`}} $labels.daemonset {{`}}`}} are not scheduled.' -- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubedaemonsetnotscheduled -+ runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubedaemonsetnotscheduled - summary: DaemonSet pods are not scheduled. - expr: |- - kube_daemonset_status_desired_number_scheduled{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"} -@@ -222,10 +268,15 @@ - {{- if .Values.defaultRules.additionalRuleLabels }} - {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} - {{- end }} -+{{- end }} -+{{- if not (.Values.defaultRules.disabled.KubeDaemonSetMisScheduled | default false) }} - - alert: KubeDaemonSetMisScheduled - annotations: -+{{- if .Values.defaultRules.additionalRuleAnnotations }} -+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} -+{{- end }} - description: '{{`{{`}} $value {{`}}`}} Pods of DaemonSet {{`{{`}} $labels.namespace {{`}}`}}/{{`{{`}} $labels.daemonset {{`}}`}} are running where they are not supposed to run.' -- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubedaemonsetmisscheduled -+ runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubedaemonsetmisscheduled - summary: DaemonSet pods are misscheduled. - expr: kube_daemonset_status_number_misscheduled{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"} > 0 - for: 15m -@@ -234,22 +285,34 @@ - {{- if .Values.defaultRules.additionalRuleLabels }} - {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} - {{- end }} -- - alert: KubeJobCompletion -+{{- end }} -+{{- if not (.Values.defaultRules.disabled.KubeJobNotCompleted | default false) }} -+ - alert: KubeJobNotCompleted - annotations: -- description: Job {{`{{`}} $labels.namespace {{`}}`}}/{{`{{`}} $labels.job_name {{`}}`}} is taking more than 12 hours to complete. -- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubejobcompletion -+{{- if .Values.defaultRules.additionalRuleAnnotations }} -+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} -+{{- end }} -+ description: Job {{`{{`}} $labels.namespace {{`}}`}}/{{`{{`}} $labels.job_name {{`}}`}} is taking more than {{`{{`}} "43200" | humanizeDuration {{`}}`}} to complete. -+ runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubejobnotcompleted - summary: Job did not complete in time -- expr: kube_job_spec_completions{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"} - kube_job_status_succeeded{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"} > 0 -- for: 12h -+ expr: |- -+ time() - max by(namespace, job_name, cluster) (kube_job_status_start_time{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"} -+ and -+ kube_job_status_active{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"} > 0) > 43200 - labels: - severity: warning - {{- if .Values.defaultRules.additionalRuleLabels }} - {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} - {{- end }} -+{{- end }} -+{{- if not (.Values.defaultRules.disabled.KubeJobFailed | default false) }} - - alert: KubeJobFailed - annotations: -+{{- if .Values.defaultRules.additionalRuleAnnotations }} -+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} -+{{- end }} - description: Job {{`{{`}} $labels.namespace {{`}}`}}/{{`{{`}} $labels.job_name {{`}}`}} failed to complete. Removing failed job after investigation should clear this alert. -- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubejobfailed -+ runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubejobfailed - summary: Job failed to complete. - expr: kube_job_failed{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"} > 0 - for: 15m -@@ -258,11 +321,16 @@ - {{- if .Values.defaultRules.additionalRuleLabels }} - {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} - {{- end }} -+{{- end }} -+{{- if not (.Values.defaultRules.disabled.KubeHpaReplicasMismatch | default false) }} - - alert: KubeHpaReplicasMismatch - annotations: -+{{- if .Values.defaultRules.additionalRuleAnnotations }} -+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} -+{{- end }} - description: HPA {{`{{`}} $labels.namespace {{`}}`}}/{{`{{`}} $labels.horizontalpodautoscaler {{`}}`}} has not matched the desired number of replicas for longer than 15 minutes. -- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubehpareplicasmismatch -- summary: HPA has not matched descired number of replicas. -+ runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubehpareplicasmismatch -+ summary: HPA has not matched desired number of replicas. - expr: |- - (kube_horizontalpodautoscaler_status_desired_replicas{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"} - != -@@ -283,10 +351,15 @@ - {{- if .Values.defaultRules.additionalRuleLabels }} - {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} - {{- end }} -+{{- end }} -+{{- if not (.Values.defaultRules.disabled.KubeHpaMaxedOut | default false) }} - - alert: KubeHpaMaxedOut - annotations: -+{{- if .Values.defaultRules.additionalRuleAnnotations }} -+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} -+{{- end }} - description: HPA {{`{{`}} $labels.namespace {{`}}`}}/{{`{{`}} $labels.horizontalpodautoscaler {{`}}`}} has been running at max replicas for longer than 15 minutes. -- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubehpamaxedout -+ runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubehpamaxedout - summary: HPA is running at max replicas - expr: |- - kube_horizontalpodautoscaler_status_current_replicas{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"} -@@ -297,5 +370,6 @@ - severity: warning - {{- if .Values.defaultRules.additionalRuleLabels }} - {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} -+{{- end }} - {{- end }} - {{- end }} -\ No newline at end of file diff --git a/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/rules-1.14/kubernetes-storage.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/rules-1.14/kubernetes-storage.yaml.patch index 743abfa9..42a4b35d 100644 --- a/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/rules-1.14/kubernetes-storage.yaml.patch +++ b/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/rules-1.14/kubernetes-storage.yaml.patch @@ -2,8 +2,7 @@ +++ charts/templates/prometheus/rules-1.14/kubernetes-storage.yaml @@ -1,7 +1,7 @@ {{- /* --Generated from 'kubernetes-storage' group from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/kubernetes-prometheusRule.yaml -+Generated from 'kubernetes-storage' group from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/kubernetesControlPlane-prometheusRule.yaml + Generated from 'kubernetes-storage' group from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/kubernetesControlPlane-prometheusRule.yaml Do not change in-place! In order to change this file first read following link: -https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack +https://github.com/prometheus-community/helm-charts/tree/main/charts/project-prometheus-stack/hack @@ -26,19 +25,8 @@ {{- if .Values.defaultRules.labels }} {{ toYaml .Values.defaultRules.labels | indent 4 }} {{- end }} -@@ -25,49 +25,129 @@ - groups: - - name: kubernetes-storage - rules: -+{{- if not (.Values.defaultRules.disabled.KubePersistentVolumeFillingUp | default false) }} - - alert: KubePersistentVolumeFillingUp - annotations: -+{{- if .Values.defaultRules.additionalRuleAnnotations }} -+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} -+{{- end }} - description: The PersistentVolume claimed by {{`{{`}} $labels.persistentvolumeclaim {{`}}`}} in Namespace {{`{{`}} $labels.namespace {{`}}`}} is only {{`{{`}} $value | humanizePercentage {{`}}`}} free. -- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubepersistentvolumefillingup -+ runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubepersistentvolumefillingup +@@ -35,12 +35,12 @@ + runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubepersistentvolumefillingup summary: PersistentVolume is filling up. expr: |- - kubelet_volume_stats_available_bytes{job="{{ include "exporter.kubelet.jobName" . }}", namespace=~"{{ $targetNamespace }}", metrics_path="/metrics"} @@ -50,26 +38,10 @@ and - kubelet_volume_stats_used_bytes{job="{{ include "exporter.kubelet.jobName" . }}", namespace=~"{{ $targetNamespace }}", metrics_path="/metrics"} > 0 + kubelet_volume_stats_used_bytes{namespace=~"{{ $targetNamespace }}", metrics_path="/metrics"} > 0 -+ unless on(namespace, persistentvolumeclaim) -+ kube_persistentvolumeclaim_access_mode{ access_mode="ReadOnlyMany"} == 1 -+ unless on(namespace, persistentvolumeclaim) -+ kube_persistentvolumeclaim_labels{label_excluded_from_alerts="true"} == 1 - for: 1m - labels: - severity: critical - {{- if .Values.defaultRules.additionalRuleLabels }} - {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} - {{- end }} -+{{- end }} -+{{- if not (.Values.defaultRules.disabled.KubePersistentVolumeFillingUp | default false) }} - - alert: KubePersistentVolumeFillingUp - annotations: -+{{- if .Values.defaultRules.additionalRuleAnnotations }} -+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} -+{{- end }} - description: Based on recent sampling, the PersistentVolume claimed by {{`{{`}} $labels.persistentvolumeclaim {{`}}`}} in Namespace {{`{{`}} $labels.namespace {{`}}`}} is expected to fill up within four days. Currently {{`{{`}} $value | humanizePercentage {{`}}`}} is available. -- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubepersistentvolumefillingup -+ runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubepersistentvolumefillingup + unless on(namespace, persistentvolumeclaim) + kube_persistentvolumeclaim_access_mode{ access_mode="ReadOnlyMany"} == 1 + unless on(namespace, persistentvolumeclaim) +@@ -63,14 +63,14 @@ summary: PersistentVolume is filling up. expr: |- ( @@ -85,92 +57,6 @@ and - predict_linear(kubelet_volume_stats_available_bytes{job="{{ include "exporter.kubelet.jobName" . }}", namespace=~"{{ $targetNamespace }}", metrics_path="/metrics"}[6h], 4 * 24 * 3600) < 0 + predict_linear(kubelet_volume_stats_available_bytes{namespace=~"{{ $targetNamespace }}", metrics_path="/metrics"}[6h], 4 * 24 * 3600) < 0 -+ unless on(namespace, persistentvolumeclaim) -+ kube_persistentvolumeclaim_access_mode{ access_mode="ReadOnlyMany"} == 1 -+ unless on(namespace, persistentvolumeclaim) -+ kube_persistentvolumeclaim_labels{label_excluded_from_alerts="true"} == 1 - for: 1h - labels: - severity: warning - {{- if .Values.defaultRules.additionalRuleLabels }} - {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} - {{- end }} -+{{- end }} -+{{- if not (.Values.defaultRules.disabled.KubePersistentVolumeInodesFillingUp | default false) }} -+ - alert: KubePersistentVolumeInodesFillingUp -+ annotations: -+{{- if .Values.defaultRules.additionalRuleAnnotations }} -+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} -+{{- end }} -+ description: The PersistentVolume claimed by {{`{{`}} $labels.persistentvolumeclaim {{`}}`}} in Namespace {{`{{`}} $labels.namespace {{`}}`}} only has {{`{{`}} $value | humanizePercentage {{`}}`}} free inodes. -+ runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubepersistentvolumeinodesfillingup -+ summary: PersistentVolumeInodes are filling up. -+ expr: |- -+ ( -+ kubelet_volume_stats_inodes_free{job="{{ include "exporter.kubelet.jobName" . }}", namespace=~"{{ $targetNamespace }}", metrics_path="/metrics"} -+ / -+ kubelet_volume_stats_inodes{job="{{ include "exporter.kubelet.jobName" . }}", namespace=~"{{ $targetNamespace }}", metrics_path="/metrics"} -+ ) < 0.03 -+ and -+ kubelet_volume_stats_inodes_used{job="{{ include "exporter.kubelet.jobName" . }}", namespace=~"{{ $targetNamespace }}", metrics_path="/metrics"} > 0 -+ unless on(namespace, persistentvolumeclaim) -+ kube_persistentvolumeclaim_access_mode{ access_mode="ReadOnlyMany"} == 1 -+ unless on(namespace, persistentvolumeclaim) -+ kube_persistentvolumeclaim_labels{label_excluded_from_alerts="true"} == 1 -+ for: 1m -+ labels: -+ severity: critical -+{{- if .Values.defaultRules.additionalRuleLabels }} -+{{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} -+{{- end }} -+{{- end }} -+{{- if not (.Values.defaultRules.disabled.KubePersistentVolumeInodesFillingUp | default false) }} -+ - alert: KubePersistentVolumeInodesFillingUp -+ annotations: -+{{- if .Values.defaultRules.additionalRuleAnnotations }} -+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} -+{{- end }} -+ description: Based on recent sampling, the PersistentVolume claimed by {{`{{`}} $labels.persistentvolumeclaim {{`}}`}} in Namespace {{`{{`}} $labels.namespace {{`}}`}} is expected to run out of inodes within four days. Currently {{`{{`}} $value | humanizePercentage {{`}}`}} of its inodes are free. -+ runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubepersistentvolumeinodesfillingup -+ summary: PersistentVolumeInodes are filling up. -+ expr: |- -+ ( -+ kubelet_volume_stats_inodes_free{job="{{ include "exporter.kubelet.jobName" . }}", namespace=~"{{ $targetNamespace }}", metrics_path="/metrics"} -+ / -+ kubelet_volume_stats_inodes{job="{{ include "exporter.kubelet.jobName" . }}", namespace=~"{{ $targetNamespace }}", metrics_path="/metrics"} -+ ) < 0.15 -+ and -+ kubelet_volume_stats_inodes_used{job="{{ include "exporter.kubelet.jobName" . }}", namespace=~"{{ $targetNamespace }}", metrics_path="/metrics"} > 0 -+ and -+ predict_linear(kubelet_volume_stats_inodes_free{job="{{ include "exporter.kubelet.jobName" . }}", namespace=~"{{ $targetNamespace }}", metrics_path="/metrics"}[6h], 4 * 24 * 3600) < 0 -+ unless on(namespace, persistentvolumeclaim) -+ kube_persistentvolumeclaim_access_mode{ access_mode="ReadOnlyMany"} == 1 -+ unless on(namespace, persistentvolumeclaim) -+ kube_persistentvolumeclaim_labels{label_excluded_from_alerts="true"} == 1 -+ for: 1h -+ labels: -+ severity: warning -+{{- if .Values.defaultRules.additionalRuleLabels }} -+{{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} -+{{- end }} -+{{- end }} -+{{- if not (.Values.defaultRules.disabled.KubePersistentVolumeErrors | default false) }} - - alert: KubePersistentVolumeErrors - annotations: -+{{- if .Values.defaultRules.additionalRuleAnnotations }} -+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} -+{{- end }} - description: The persistent volume {{`{{`}} $labels.persistentvolume {{`}}`}} has status {{`{{`}} $labels.phase {{`}}`}}. -- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubepersistentvolumeerrors -+ runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubepersistentvolumeerrors - summary: PersistentVolume is having issues with provisioning. - expr: kube_persistentvolume_status_phase{phase=~"Failed|Pending",job="kube-state-metrics"} > 0 - for: 5m -@@ -75,5 +155,6 @@ - severity: critical - {{- if .Values.defaultRules.additionalRuleLabels }} - {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} -+{{- end }} - {{- end }} - {{- end }} -\ No newline at end of file + unless on(namespace, persistentvolumeclaim) + kube_persistentvolumeclaim_access_mode{ access_mode="ReadOnlyMany"} == 1 + unless on(namespace, persistentvolumeclaim) diff --git a/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/rules-1.14/prometheus.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/rules-1.14/prometheus.yaml.patch index dc7f28c8..1cf29947 100644 --- a/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/rules-1.14/prometheus.yaml.patch +++ b/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/rules-1.14/prometheus.yaml.patch @@ -28,367 +28,3 @@ {{- if .Values.defaultRules.labels }} {{ toYaml .Values.defaultRules.labels | indent 4 }} {{- end }} -@@ -26,10 +26,14 @@ - groups: - - name: prometheus - rules: -+{{- if not (.Values.defaultRules.disabled.PrometheusBadConfig | default false) }} - - alert: PrometheusBadConfig - annotations: -+{{- if .Values.defaultRules.additionalRuleAnnotations }} -+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} -+{{- end }} - description: Prometheus {{`{{`}}$labels.namespace{{`}}`}}/{{`{{`}}$labels.pod{{`}}`}} has failed to reload its configuration. -- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-prometheusbadconfig -+ runbook_url: {{ .Values.defaultRules.runbookUrl }}/prometheus/prometheusbadconfig - summary: Failed Prometheus configuration reload. - expr: |- - # Without max_over_time, failed scrapes could create false negatives, see -@@ -41,10 +45,15 @@ - {{- if .Values.defaultRules.additionalRuleLabels }} - {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} - {{- end }} -+{{- end }} -+{{- if not (.Values.defaultRules.disabled.PrometheusNotificationQueueRunningFull | default false) }} - - alert: PrometheusNotificationQueueRunningFull - annotations: -+{{- if .Values.defaultRules.additionalRuleAnnotations }} -+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} -+{{- end }} - description: Alert notification queue of Prometheus {{`{{`}}$labels.namespace{{`}}`}}/{{`{{`}}$labels.pod{{`}}`}} is running full. -- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-prometheusnotificationqueuerunningfull -+ runbook_url: {{ .Values.defaultRules.runbookUrl }}/prometheus/prometheusnotificationqueuerunningfull - summary: Prometheus alert notification queue predicted to run full in less than 30m. - expr: |- - # Without min_over_time, failed scrapes could create false negatives, see -@@ -60,10 +69,15 @@ - {{- if .Values.defaultRules.additionalRuleLabels }} - {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} - {{- end }} -+{{- end }} -+{{- if not (.Values.defaultRules.disabled.PrometheusErrorSendingAlertsToSomeAlertmanagers | default false) }} - - alert: PrometheusErrorSendingAlertsToSomeAlertmanagers - annotations: -+{{- if .Values.defaultRules.additionalRuleAnnotations }} -+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} -+{{- end }} - description: '{{`{{`}} printf "%.1f" $value {{`}}`}}% errors while sending alerts from Prometheus {{`{{`}}$labels.namespace{{`}}`}}/{{`{{`}}$labels.pod{{`}}`}} to Alertmanager {{`{{`}}$labels.alertmanager{{`}}`}}.' -- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-prometheuserrorsendingalertstosomealertmanagers -+ runbook_url: {{ .Values.defaultRules.runbookUrl }}/prometheus/prometheuserrorsendingalertstosomealertmanagers - summary: Prometheus has encountered more than 1% errors sending alerts to a specific Alertmanager. - expr: |- - ( -@@ -79,10 +93,15 @@ - {{- if .Values.defaultRules.additionalRuleLabels }} - {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} - {{- end }} -+{{- end }} -+{{- if not (.Values.defaultRules.disabled.PrometheusNotConnectedToAlertmanagers | default false) }} - - alert: PrometheusNotConnectedToAlertmanagers - annotations: -+{{- if .Values.defaultRules.additionalRuleAnnotations }} -+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} -+{{- end }} - description: Prometheus {{`{{`}}$labels.namespace{{`}}`}}/{{`{{`}}$labels.pod{{`}}`}} is not connected to any Alertmanagers. -- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-prometheusnotconnectedtoalertmanagers -+ runbook_url: {{ .Values.defaultRules.runbookUrl }}/prometheus/prometheusnotconnectedtoalertmanagers - summary: Prometheus is not connected to any Alertmanagers. - expr: |- - # Without max_over_time, failed scrapes could create false negatives, see -@@ -94,10 +113,15 @@ - {{- if .Values.defaultRules.additionalRuleLabels }} - {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} - {{- end }} -+{{- end }} -+{{- if not (.Values.defaultRules.disabled.PrometheusTSDBReloadsFailing | default false) }} - - alert: PrometheusTSDBReloadsFailing - annotations: -+{{- if .Values.defaultRules.additionalRuleAnnotations }} -+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} -+{{- end }} - description: Prometheus {{`{{`}}$labels.namespace{{`}}`}}/{{`{{`}}$labels.pod{{`}}`}} has detected {{`{{`}}$value | humanize{{`}}`}} reload failures over the last 3h. -- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-prometheustsdbreloadsfailing -+ runbook_url: {{ .Values.defaultRules.runbookUrl }}/prometheus/prometheustsdbreloadsfailing - summary: Prometheus has issues reloading blocks from disk. - expr: increase(prometheus_tsdb_reloads_failures_total{job="{{ $prometheusJob }}",namespace="{{ $namespace }}"}[3h]) > 0 - for: 4h -@@ -106,10 +130,15 @@ - {{- if .Values.defaultRules.additionalRuleLabels }} - {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} - {{- end }} -+{{- end }} -+{{- if not (.Values.defaultRules.disabled.PrometheusTSDBCompactionsFailing | default false) }} - - alert: PrometheusTSDBCompactionsFailing - annotations: -+{{- if .Values.defaultRules.additionalRuleAnnotations }} -+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} -+{{- end }} - description: Prometheus {{`{{`}}$labels.namespace{{`}}`}}/{{`{{`}}$labels.pod{{`}}`}} has detected {{`{{`}}$value | humanize{{`}}`}} compaction failures over the last 3h. -- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-prometheustsdbcompactionsfailing -+ runbook_url: {{ .Values.defaultRules.runbookUrl }}/prometheus/prometheustsdbcompactionsfailing - summary: Prometheus has issues compacting blocks. - expr: increase(prometheus_tsdb_compactions_failed_total{job="{{ $prometheusJob }}",namespace="{{ $namespace }}"}[3h]) > 0 - for: 4h -@@ -118,10 +147,15 @@ - {{- if .Values.defaultRules.additionalRuleLabels }} - {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} - {{- end }} -+{{- end }} -+{{- if not (.Values.defaultRules.disabled.PrometheusNotIngestingSamples | default false) }} - - alert: PrometheusNotIngestingSamples - annotations: -+{{- if .Values.defaultRules.additionalRuleAnnotations }} -+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} -+{{- end }} - description: Prometheus {{`{{`}}$labels.namespace{{`}}`}}/{{`{{`}}$labels.pod{{`}}`}} is not ingesting samples. -- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-prometheusnotingestingsamples -+ runbook_url: {{ .Values.defaultRules.runbookUrl }}/prometheus/prometheusnotingestingsamples - summary: Prometheus is not ingesting samples. - expr: |- - ( -@@ -139,10 +173,15 @@ - {{- if .Values.defaultRules.additionalRuleLabels }} - {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} - {{- end }} -+{{- end }} -+{{- if not (.Values.defaultRules.disabled.PrometheusDuplicateTimestamps | default false) }} - - alert: PrometheusDuplicateTimestamps - annotations: -+{{- if .Values.defaultRules.additionalRuleAnnotations }} -+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} -+{{- end }} - description: Prometheus {{`{{`}}$labels.namespace{{`}}`}}/{{`{{`}}$labels.pod{{`}}`}} is dropping {{`{{`}} printf "%.4g" $value {{`}}`}} samples/s with different values but duplicated timestamp. -- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-prometheusduplicatetimestamps -+ runbook_url: {{ .Values.defaultRules.runbookUrl }}/prometheus/prometheusduplicatetimestamps - summary: Prometheus is dropping samples with duplicate timestamps. - expr: rate(prometheus_target_scrapes_sample_duplicate_timestamp_total{job="{{ $prometheusJob }}",namespace="{{ $namespace }}"}[5m]) > 0 - for: 10m -@@ -151,10 +190,15 @@ - {{- if .Values.defaultRules.additionalRuleLabels }} - {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} - {{- end }} -+{{- end }} -+{{- if not (.Values.defaultRules.disabled.PrometheusOutOfOrderTimestamps | default false) }} - - alert: PrometheusOutOfOrderTimestamps - annotations: -+{{- if .Values.defaultRules.additionalRuleAnnotations }} -+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} -+{{- end }} - description: Prometheus {{`{{`}}$labels.namespace{{`}}`}}/{{`{{`}}$labels.pod{{`}}`}} is dropping {{`{{`}} printf "%.4g" $value {{`}}`}} samples/s with timestamps arriving out of order. -- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-prometheusoutofordertimestamps -+ runbook_url: {{ .Values.defaultRules.runbookUrl }}/prometheus/prometheusoutofordertimestamps - summary: Prometheus drops samples with out-of-order timestamps. - expr: rate(prometheus_target_scrapes_sample_out_of_order_total{job="{{ $prometheusJob }}",namespace="{{ $namespace }}"}[5m]) > 0 - for: 10m -@@ -163,10 +207,15 @@ - {{- if .Values.defaultRules.additionalRuleLabels }} - {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} - {{- end }} -+{{- end }} -+{{- if not (.Values.defaultRules.disabled.PrometheusRemoteStorageFailures | default false) }} - - alert: PrometheusRemoteStorageFailures - annotations: -+{{- if .Values.defaultRules.additionalRuleAnnotations }} -+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} -+{{- end }} - description: Prometheus {{`{{`}}$labels.namespace{{`}}`}}/{{`{{`}}$labels.pod{{`}}`}} failed to send {{`{{`}} printf "%.1f" $value {{`}}`}}% of the samples to {{`{{`}} $labels.remote_name{{`}}`}}:{{`{{`}} $labels.url {{`}}`}} -- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-prometheusremotestoragefailures -+ runbook_url: {{ .Values.defaultRules.runbookUrl }}/prometheus/prometheusremotestoragefailures - summary: Prometheus fails to send samples to remote storage. - expr: |- - ( -@@ -186,10 +235,15 @@ - {{- if .Values.defaultRules.additionalRuleLabels }} - {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} - {{- end }} -+{{- end }} -+{{- if not (.Values.defaultRules.disabled.PrometheusRemoteWriteBehind | default false) }} - - alert: PrometheusRemoteWriteBehind - annotations: -+{{- if .Values.defaultRules.additionalRuleAnnotations }} -+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} -+{{- end }} - description: Prometheus {{`{{`}}$labels.namespace{{`}}`}}/{{`{{`}}$labels.pod{{`}}`}} remote write is {{`{{`}} printf "%.1f" $value {{`}}`}}s behind for {{`{{`}} $labels.remote_name{{`}}`}}:{{`{{`}} $labels.url {{`}}`}}. -- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-prometheusremotewritebehind -+ runbook_url: {{ .Values.defaultRules.runbookUrl }}/prometheus/prometheusremotewritebehind - summary: Prometheus remote write is behind. - expr: |- - # Without max_over_time, failed scrapes could create false negatives, see -@@ -206,10 +260,15 @@ - {{- if .Values.defaultRules.additionalRuleLabels }} - {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} - {{- end }} -+{{- end }} -+{{- if not (.Values.defaultRules.disabled.PrometheusRemoteWriteDesiredShards | default false) }} - - alert: PrometheusRemoteWriteDesiredShards - annotations: -+{{- if .Values.defaultRules.additionalRuleAnnotations }} -+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} -+{{- end }} - description: Prometheus {{`{{`}}$labels.namespace{{`}}`}}/{{`{{`}}$labels.pod{{`}}`}} remote write desired shards calculation wants to run {{`{{`}} $value {{`}}`}} shards for queue {{`{{`}} $labels.remote_name{{`}}`}}:{{`{{`}} $labels.url {{`}}`}}, which is more than the max of {{`{{`}} printf `prometheus_remote_storage_shards_max{instance="%s",job="{{ $prometheusJob }}",namespace="{{ $namespace }}"}` $labels.instance | query | first | value {{`}}`}}. -- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-prometheusremotewritedesiredshards -+ runbook_url: {{ .Values.defaultRules.runbookUrl }}/prometheus/prometheusremotewritedesiredshards - summary: Prometheus remote write desired shards calculation wants to run more than configured max shards. - expr: |- - # Without max_over_time, failed scrapes could create false negatives, see -@@ -225,10 +284,15 @@ - {{- if .Values.defaultRules.additionalRuleLabels }} - {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} - {{- end }} -+{{- end }} -+{{- if not (.Values.defaultRules.disabled.PrometheusRuleFailures | default false) }} - - alert: PrometheusRuleFailures - annotations: -+{{- if .Values.defaultRules.additionalRuleAnnotations }} -+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} -+{{- end }} - description: Prometheus {{`{{`}}$labels.namespace{{`}}`}}/{{`{{`}}$labels.pod{{`}}`}} has failed to evaluate {{`{{`}} printf "%.0f" $value {{`}}`}} rules in the last 5m. -- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-prometheusrulefailures -+ runbook_url: {{ .Values.defaultRules.runbookUrl }}/prometheus/prometheusrulefailures - summary: Prometheus is failing rule evaluations. - expr: increase(prometheus_rule_evaluation_failures_total{job="{{ $prometheusJob }}",namespace="{{ $namespace }}"}[5m]) > 0 - for: 15m -@@ -237,10 +301,15 @@ - {{- if .Values.defaultRules.additionalRuleLabels }} - {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} - {{- end }} -+{{- end }} -+{{- if not (.Values.defaultRules.disabled.PrometheusMissingRuleEvaluations | default false) }} - - alert: PrometheusMissingRuleEvaluations - annotations: -+{{- if .Values.defaultRules.additionalRuleAnnotations }} -+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} -+{{- end }} - description: Prometheus {{`{{`}}$labels.namespace{{`}}`}}/{{`{{`}}$labels.pod{{`}}`}} has missed {{`{{`}} printf "%.0f" $value {{`}}`}} rule group evaluations in the last 5m. -- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-prometheusmissingruleevaluations -+ runbook_url: {{ .Values.defaultRules.runbookUrl }}/prometheus/prometheusmissingruleevaluations - summary: Prometheus is missing rule evaluations due to slow rule group evaluation. - expr: increase(prometheus_rule_group_iterations_missed_total{job="{{ $prometheusJob }}",namespace="{{ $namespace }}"}[5m]) > 0 - for: 15m -@@ -249,10 +318,15 @@ - {{- if .Values.defaultRules.additionalRuleLabels }} - {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} - {{- end }} -+{{- end }} -+{{- if not (.Values.defaultRules.disabled.PrometheusTargetLimitHit | default false) }} - - alert: PrometheusTargetLimitHit - annotations: -+{{- if .Values.defaultRules.additionalRuleAnnotations }} -+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} -+{{- end }} - description: Prometheus {{`{{`}}$labels.namespace{{`}}`}}/{{`{{`}}$labels.pod{{`}}`}} has dropped {{`{{`}} printf "%.0f" $value {{`}}`}} targets because the number of targets exceeded the configured target_limit. -- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-prometheustargetlimithit -+ runbook_url: {{ .Values.defaultRules.runbookUrl }}/prometheus/prometheustargetlimithit - summary: Prometheus has dropped targets because some scrape configs have exceeded the targets limit. - expr: increase(prometheus_target_scrape_pool_exceeded_target_limit_total{job="{{ $prometheusJob }}",namespace="{{ $namespace }}"}[5m]) > 0 - for: 15m -@@ -261,10 +335,15 @@ - {{- if .Values.defaultRules.additionalRuleLabels }} - {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} - {{- end }} -+{{- end }} -+{{- if not (.Values.defaultRules.disabled.PrometheusLabelLimitHit | default false) }} - - alert: PrometheusLabelLimitHit - annotations: -+{{- if .Values.defaultRules.additionalRuleAnnotations }} -+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} -+{{- end }} - description: Prometheus {{`{{`}}$labels.namespace{{`}}`}}/{{`{{`}}$labels.pod{{`}}`}} has dropped {{`{{`}} printf "%.0f" $value {{`}}`}} targets because some samples exceeded the configured label_limit, label_name_length_limit or label_value_length_limit. -- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-prometheuslabellimithit -+ runbook_url: {{ .Values.defaultRules.runbookUrl }}/prometheus/prometheuslabellimithit - summary: Prometheus has dropped targets because some scrape configs have exceeded the labels limit. - expr: increase(prometheus_target_scrape_pool_exceeded_label_limits_total{job="{{ $prometheusJob }}",namespace="{{ $namespace }}"}[5m]) > 0 - for: 15m -@@ -273,10 +352,49 @@ - {{- if .Values.defaultRules.additionalRuleLabels }} - {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} - {{- end }} -+{{- end }} -+{{- if not (.Values.defaultRules.disabled.PrometheusScrapeBodySizeLimitHit | default false) }} -+ - alert: PrometheusScrapeBodySizeLimitHit -+ annotations: -+{{- if .Values.defaultRules.additionalRuleAnnotations }} -+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} -+{{- end }} -+ description: Prometheus {{`{{`}}$labels.namespace{{`}}`}}/{{`{{`}}$labels.pod{{`}}`}} has failed {{`{{`}} printf "%.0f" $value {{`}}`}} scrapes in the last 5m because some targets exceeded the configured body_size_limit. -+ runbook_url: {{ .Values.defaultRules.runbookUrl }}/prometheus/prometheusscrapebodysizelimithit -+ summary: Prometheus has dropped some targets that exceeded body size limit. -+ expr: increase(prometheus_target_scrapes_exceeded_body_size_limit_total{job="{{ $prometheusJob }}",namespace="{{ $namespace }}"}[5m]) > 0 -+ for: 15m -+ labels: -+ severity: warning -+{{- if .Values.defaultRules.additionalRuleLabels }} -+{{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} -+{{- end }} -+{{- end }} -+{{- if not (.Values.defaultRules.disabled.PrometheusScrapeSampleLimitHit | default false) }} -+ - alert: PrometheusScrapeSampleLimitHit -+ annotations: -+{{- if .Values.defaultRules.additionalRuleAnnotations }} -+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} -+{{- end }} -+ description: Prometheus {{`{{`}}$labels.namespace{{`}}`}}/{{`{{`}}$labels.pod{{`}}`}} has failed {{`{{`}} printf "%.0f" $value {{`}}`}} scrapes in the last 5m because some targets exceeded the configured sample_limit. -+ runbook_url: {{ .Values.defaultRules.runbookUrl }}/prometheus/prometheusscrapesamplelimithit -+ summary: Prometheus has failed scrapes that have exceeded the configured sample limit. -+ expr: increase(prometheus_target_scrapes_exceeded_sample_limit_total{job="{{ $prometheusJob }}",namespace="{{ $namespace }}"}[5m]) > 0 -+ for: 15m -+ labels: -+ severity: warning -+{{- if .Values.defaultRules.additionalRuleLabels }} -+{{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} -+{{- end }} -+{{- end }} -+{{- if not (.Values.defaultRules.disabled.PrometheusTargetSyncFailure | default false) }} - - alert: PrometheusTargetSyncFailure - annotations: -+{{- if .Values.defaultRules.additionalRuleAnnotations }} -+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} -+{{- end }} - description: '{{`{{`}} printf "%.0f" $value {{`}}`}} targets in Prometheus {{`{{`}}$labels.namespace{{`}}`}}/{{`{{`}}$labels.pod{{`}}`}} have failed to sync because invalid configuration was supplied.' -- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-prometheustargetsyncfailure -+ runbook_url: {{ .Values.defaultRules.runbookUrl }}/prometheus/prometheustargetsyncfailure - summary: Prometheus has failed to sync targets. - expr: increase(prometheus_target_sync_failed_total{job="{{ $prometheusJob }}",namespace="{{ $namespace }}"}[30m]) > 0 - for: 5m -@@ -285,10 +403,32 @@ - {{- if .Values.defaultRules.additionalRuleLabels }} - {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} - {{- end }} -+{{- end }} -+{{- if not (.Values.defaultRules.disabled.PrometheusHighQueryLoad | default false) }} -+ - alert: PrometheusHighQueryLoad -+ annotations: -+{{- if .Values.defaultRules.additionalRuleAnnotations }} -+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} -+{{- end }} -+ description: Prometheus {{`{{`}}$labels.namespace{{`}}`}}/{{`{{`}}$labels.pod{{`}}`}} query API has less than 20% available capacity in its query engine for the last 15 minutes. -+ runbook_url: {{ .Values.defaultRules.runbookUrl }}/prometheus/prometheushighqueryload -+ summary: Prometheus is reaching its maximum capacity serving concurrent requests. -+ expr: avg_over_time(prometheus_engine_queries{job="{{ $prometheusJob }}",namespace="{{ $namespace }}"}[5m]) / max_over_time(prometheus_engine_queries_concurrent_max{job="{{ $prometheusJob }}",namespace="{{ $namespace }}"}[5m]) > 0.8 -+ for: 15m -+ labels: -+ severity: warning -+{{- if .Values.defaultRules.additionalRuleLabels }} -+{{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} -+{{- end }} -+{{- end }} -+{{- if not (.Values.defaultRules.disabled.PrometheusErrorSendingAlertsToAnyAlertmanager | default false) }} - - alert: PrometheusErrorSendingAlertsToAnyAlertmanager - annotations: -+{{- if .Values.defaultRules.additionalRuleAnnotations }} -+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} -+{{- end }} - description: '{{`{{`}} printf "%.1f" $value {{`}}`}}% minimum errors while sending alerts from Prometheus {{`{{`}}$labels.namespace{{`}}`}}/{{`{{`}}$labels.pod{{`}}`}} to any Alertmanager.' -- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-prometheuserrorsendingalertstoanyalertmanager -+ runbook_url: {{ .Values.defaultRules.runbookUrl }}/prometheus/prometheuserrorsendingalertstoanyalertmanager - summary: Prometheus encounters more than 3% errors sending alerts to any Alertmanager. - expr: |- - min without (alertmanager) ( -@@ -303,5 +443,6 @@ - severity: critical - {{- if .Values.defaultRules.additionalRuleLabels }} - {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} -+{{- end }} - {{- end }} - {{- end }} -\ No newline at end of file diff --git a/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/service.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/service.yaml.patch index 9bde82c9..9307944c 100644 --- a/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/service.yaml.patch +++ b/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/service.yaml.patch @@ -17,17 +17,7 @@ {{- if .Values.prometheus.service.labels }} {{ toYaml .Values.prometheus.service.labels | indent 4 }} {{- end }} -@@ -32,6 +32,9 @@ - - {{ $cidr }} - {{- end }} - {{- end }} -+{{- if ne .Values.prometheus.service.type "ClusterIP" }} -+ externalTrafficPolicy: {{ .Values.prometheus.service.externalTrafficPolicy }} -+{{- end }} - ports: - - name: {{ .Values.prometheus.prometheusSpec.portName }} - {{- if eq .Values.prometheus.service.type "NodePort" }} -@@ -39,20 +42,13 @@ +@@ -42,21 +42,13 @@ {{- end }} port: {{ .Values.prometheus.service.port }} targetPort: {{ .Values.prometheus.service.targetPort }} @@ -42,10 +32,10 @@ {{- if .Values.prometheus.service.additionalPorts }} {{ toYaml .Values.prometheus.service.additionalPorts | indent 2 }} {{- end }} -+ publishNotReadyAddresses: {{ .Values.prometheus.service.publishNotReadyAddresses }} + publishNotReadyAddresses: {{ .Values.prometheus.service.publishNotReadyAddresses }} selector: app.kubernetes.io/name: prometheus -- prometheus: {{ template "kube-prometheus-stack.fullname" . }}-prometheus +- prometheus: {{ template "kube-prometheus-stack.prometheus.crname" . }} + prometheus: {{ template "project-prometheus-stack.prometheus.crname" . }} {{- if .Values.prometheus.service.sessionAffinity }} sessionAffinity: {{ .Values.prometheus.service.sessionAffinity }} diff --git a/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/serviceaccount.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/serviceaccount.yaml.patch index 3781cfa6..bdf37250 100644 --- a/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/serviceaccount.yaml.patch +++ b/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/serviceaccount.yaml.patch @@ -1,6 +1,6 @@ --- charts-original/templates/prometheus/serviceaccount.yaml +++ charts/templates/prometheus/serviceaccount.yaml -@@ -2,19 +2,19 @@ +@@ -2,13 +2,13 @@ apiVersion: v1 kind: ServiceAccount metadata: @@ -19,10 +19,3 @@ {{- if .Values.prometheus.serviceAccount.annotations }} annotations: {{ toYaml .Values.prometheus.serviceAccount.annotations | indent 4 }} - {{- end }} - {{- if .Values.global.imagePullSecrets }} - imagePullSecrets: --{{ toYaml .Values.global.imagePullSecrets | indent 2 }} -+{{ include "kube-prometheus-stack.imagePullSecrets" . | trim | indent 2 }} - {{- end }} - {{- end }} diff --git a/packages/rancher-project-monitoring/generated-changes/patch/values.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/values.yaml.patch index c4a608ef..36da05cf 100644 --- a/packages/rancher-project-monitoring/generated-changes/patch/values.yaml.patch +++ b/packages/rancher-project-monitoring/generated-changes/patch/values.yaml.patch @@ -1,6 +1,6 @@ --- charts-original/values.yaml +++ charts/values.yaml -@@ -1,508 +1,18 @@ +@@ -1,633 +1,18 @@ -# Default values for kube-prometheus-stack. +# Default values for project-prometheus-stack. # This is a YAML-formatted file. @@ -313,11 +313,11 @@ - clients: - port: 10013 - useLocalhost: true -- tolerations: -- - effect: "NoExecute" -- operator: "Exists" -- - effect: "NoSchedule" -- operator: "Exists" +- tolerations: +- - effect: "NoExecute" +- operator: "Exists" +- - effect: "NoSchedule" +- operator: "Exists" - -rke2Etcd: - enabled: false @@ -338,38 +338,154 @@ - enabled: false - metricsPort: 10254 - component: ingress-nginx +- # in the RKE2 cluster, the ingress-nginx-controller is deployed +- # as a non-hostNetwork workload starting at the following versions +- # - >= v1.22.12+rke2r1 < 1.23.0-0 +- # - >= v1.23.9+rke2r1 < 1.24.0-0 +- # - >= v1.24.3+rke2r1 < 1.25.0-0 +- # - >= v1.25.0+rke2r1 +- # As a result we do not need clients and proxies as we can directly create +- # a service that targets the workload with the given app name +- namespaceOverride: kube-system - clients: -- port: 10015 -- useLocalhost: true -- tolerations: -- - effect: "NoExecute" -- operator: "Exists" -- - effect: "NoSchedule" -- operator: "Exists" -- affinity: -- podAffinity: -- requiredDuringSchedulingIgnoredDuringExecution: -- - labelSelector: -- matchExpressions: -- - key: "app.kubernetes.io/component" -- operator: "In" -- values: -- - "controller" -- topologyKey: "kubernetes.io/hostname" -- namespaces: -- - "kube-system" -- # in the RKE2 cluster, the ingress-nginx-controller is deployed as -- # a DaemonSet with 1 pod when RKE2 version is <= 1.20, -- # a Deployment when RKE2 version is >= 1.21 -- deployment: -- enabled: true -- replicas: 1 +- enabled: false +- proxy: +- enabled: false +- service: +- selector: +- app.kubernetes.io/name: rke2-ingress-nginx - kubeVersionOverrides: -- - constraint: "<= 1.20" +- - constraint: "< 1.21.0-0" - values: +- namespaceOverride: "" - clients: +- enabled: true +- port: 10015 +- useLocalhost: true +- tolerations: +- - effect: "NoExecute" +- operator: "Exists" +- - effect: "NoSchedule" +- operator: "Exists" +- affinity: +- podAffinity: +- requiredDuringSchedulingIgnoredDuringExecution: +- - labelSelector: +- matchExpressions: +- - key: "app.kubernetes.io/component" +- operator: "In" +- values: +- - "controller" +- topologyKey: "kubernetes.io/hostname" +- namespaces: +- - "kube-system" +- # in the RKE2 cluster, the ingress-nginx-controller is deployed as +- # a DaemonSet with 1 pod when RKE2 version is < 1.21.0-0 - deployment: - enabled: false +- proxy: +- enabled: true +- service: +- selector: false +- - constraint: ">= 1.21.0-0 < 1.22.12-0" +- values: +- namespaceOverride: "" +- clients: +- enabled: true +- port: 10015 +- useLocalhost: true +- tolerations: +- - effect: "NoExecute" +- operator: "Exists" +- - effect: "NoSchedule" +- operator: "Exists" +- affinity: +- podAffinity: +- requiredDuringSchedulingIgnoredDuringExecution: +- - labelSelector: +- matchExpressions: +- - key: "app.kubernetes.io/component" +- operator: "In" +- values: +- - "controller" +- topologyKey: "kubernetes.io/hostname" +- namespaces: +- - "kube-system" +- # in the RKE2 cluster, the ingress-nginx-controller is deployed as +- # a hostNetwork Deployment with 1 pod when RKE2 version is >= 1.21.0-0 +- deployment: +- enabled: true +- replicas: 1 +- proxy: +- enabled: true +- service: +- selector: false +- - constraint: ">= 1.23.0-0 < v1.23.9-0" +- values: +- namespaceOverride: "" +- clients: +- enabled: true +- port: 10015 +- useLocalhost: true +- tolerations: +- - effect: "NoExecute" +- operator: "Exists" +- - effect: "NoSchedule" +- operator: "Exists" +- affinity: +- podAffinity: +- requiredDuringSchedulingIgnoredDuringExecution: +- - labelSelector: +- matchExpressions: +- - key: "app.kubernetes.io/component" +- operator: "In" +- values: +- - "controller" +- topologyKey: "kubernetes.io/hostname" +- namespaces: +- - "kube-system" +- # in the RKE2 cluster, the ingress-nginx-controller is deployed as +- # a hostNetwork Deployment with 1 pod when RKE2 version is >= 1.20.0-0 +- deployment: +- enabled: true +- replicas: 1 +- proxy: +- enabled: true +- service: +- selector: false +- - constraint: ">= 1.24.0-0 < v1.24.3-0" +- values: +- namespaceOverride: "" +- clients: +- enabled: true +- port: 10015 +- useLocalhost: true +- tolerations: +- - effect: "NoExecute" +- operator: "Exists" +- - effect: "NoSchedule" +- operator: "Exists" +- affinity: +- podAffinity: +- requiredDuringSchedulingIgnoredDuringExecution: +- - labelSelector: +- matchExpressions: +- - key: "app.kubernetes.io/component" +- operator: "In" +- values: +- - "controller" +- topologyKey: "kubernetes.io/hostname" +- namespaces: +- - "kube-system" +- # in the RKE2 cluster, the ingress-nginx-controller is deployed as +- # a hostNetwork Deployment with 1 pod when RKE2 version is >= 1.20.0-0 +- deployment: +- enabled: true +- replicas: 1 +- proxy: +- enabled: true +- service: +- selector: false - - - @@ -439,6 +555,15 @@ - - effect: "NoSchedule" - operator: "Exists" - +-## Upgrades +-upgrade: +- ## Run upgrade scripts before an upgrade or rollback via a Job hook +- enabled: true +- ## Image to use to run the scripts +- image: +- repository: rancher/shell +- tag: v0.1.18 +- -## Rancher Monitoring -## - @@ -514,23 +639,24 @@ ## Provide a k8s version to auto dashboard import script example: kubeTargetVersionOverride: 1.16.6 ## -@@ -527,33 +37,12 @@ +@@ -652,32 +37,11 @@ defaultRules: create: true rules: - alertmanager: true - etcd: true +- configReloaders: true general: true - k8s: true -- kubeApiserver: true - kubeApiserverAvailability: true -- kubeApiserverError: true +- kubeApiserverBurnrate: true +- kubeApiserverHistogram: true - kubeApiserverSlos: true +- kubeControllerManager: true - kubelet: true +- kubeProxy: true - kubePrometheusGeneral: true -- kubePrometheusNodeAlerting: true - kubePrometheusNodeRecording: true -- kubernetesAbsent: true + prometheus: true + alertmanager: true kubernetesApps: true @@ -541,21 +667,22 @@ - kubeStateMetrics: true - network: true - node: true +- nodeExporterAlerting: true +- nodeExporterRecording: true - prometheus: true - prometheusOperator: true -- time: true -- ## Runbook url prefix for default rules -- runbookUrl: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md# ## Reduce app namespace alert scope appNamespacesTarget: ".*" +@@ -698,44 +62,13 @@ -@@ -565,41 +54,21 @@ - ## Additional labels for PrometheusRule alerts - additionalRuleLabels: {} + ## Disabled PrometheusRule alerts + disabled: {} +- # KubeAPIDown: true +- # NodeRAIDDegraded: true -## Deprecated way to provide custom recording or alerting rules to be deployed into the cluster. --## + ## -# additionalPrometheusRules: [] -# - name: my-rule-file -# groups: @@ -563,9 +690,7 @@ -# rules: -# - record: my_record -# expr: 100 * my_record -+ ## Additional annotations for PrometheusRule alerts -+ additionalRuleAnnotations: {} - +- -## Provide custom recording or alerting rules to be deployed into the cluster. -## -additionalPrometheusRulesMap: {} @@ -575,13 +700,8 @@ -# rules: -# - record: my_record -# expr: 100 * my_record -+ ## Prefix for runbook URLs. Use this to override the first part of the runbookURLs that is common to all rules. -+ runbookUrl: "https://runbooks.prometheus-operator.dev/runbooks" - -+ ## Disabled PrometheusRule alerts -+ disabled: {} -+ - ## +- +-## global: cattle: systemDefaultRegistry: "" @@ -601,7 +721,7 @@ kubectl: repository: rancher/kubectl tag: v1.20.2 -@@ -610,9 +79,21 @@ +@@ -746,9 +79,21 @@ create: true userRoles: @@ -625,12 +745,9 @@ aggregateToDefaultRoles: true pspEnabled: true -@@ -631,7 +112,22 @@ - ## - imagePullSecrets: [] - # - name: "image-pull-secret" -+ # or -+ # - "image-pull-secret" +@@ -770,6 +115,19 @@ + # or + # - "image-pull-secret" +federate: + ## enabled indicates whether to add federation to any Project Prometheus Stacks by default @@ -648,59 +765,7 @@ ## Configuration for alertmanager ## ref: https://prometheus.io/docs/alerting/alertmanager/ ## -@@ -674,16 +170,37 @@ - config: - global: - resolve_timeout: 5m -+ inhibit_rules: -+ - source_matchers: -+ - 'severity = critical' -+ target_matchers: -+ - 'severity =~ warning|info' -+ equal: -+ - 'namespace' -+ - 'alertname' -+ - source_matchers: -+ - 'severity = warning' -+ target_matchers: -+ - 'severity = info' -+ equal: -+ - 'namespace' -+ - 'alertname' -+ - source_matchers: -+ - 'alertname = InfoInhibitor' -+ target_matchers: -+ - 'severity = info' -+ equal: -+ - 'namespace' - route: -- group_by: ['job'] -+ group_by: ['namespace'] - group_wait: 30s - group_interval: 5m - repeat_interval: 12h - receiver: 'null' - routes: -- - match: -- alertname: Watchdog -- receiver: 'null' -+ - receiver: 'null' -+ matchers: -+ - alertname =~ "InfoInhibitor|Watchdog" - receivers: - - name: 'null' - templates: -@@ -790,6 +307,9 @@ - - labels: {} - -+ ## Redirect ingress to an additional defined port on the service -+ # servicePort: 8081 -+ - ## Hosts must be provided if Ingress is enabled. - ## - hosts: [] -@@ -817,50 +337,6 @@ +@@ -979,50 +337,6 @@ secret: annotations: {} @@ -751,21 +816,9 @@ ## Configuration for Alertmanager service ## service: -@@ -884,35 +360,19 @@ - - ## Additional ports to open for Alertmanager service - additionalPorts: [] -+ # additionalPorts: -+ # - name: authenticated -+ # port: 8081 -+ # targetPort: 8081 - - externalIPs: [] - loadBalancerIP: "" - loadBalancerSourceRanges: [] -- ## Service type -- ## -- type: ClusterIP +@@ -1063,36 +377,6 @@ + ## + type: ClusterIP - ## Configuration for creating a separate Service for each statefulset Alertmanager replica - ## @@ -774,11 +827,9 @@ - annotations: {} - - ## Port for Alertmanager Service per replica to listen on -+ ## Denotes if this Service desires to route external traffic to node-local or cluster-wide endpoints - ## +- ## - port: 9093 -+ externalTrafficPolicy: Cluster - +- - ## To be used with a proxy extraContainer port - targetPort: 9093 - @@ -790,49 +841,20 @@ - ## Loadbalancer source IP ranges - ## Only used if servicePerReplica.type is "LoadBalancer" - loadBalancerSourceRanges: [] - ## Service type - ## - type: ClusterIP -@@ -933,13 +393,13 @@ - scheme: "" - - ## tlsConfig: TLS configuration to use when scraping the endpoint. For example if using istio mTLS. -- ## Of type: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#tlsconfig -+ ## Of type: https://github.com/coreos/prometheus-operator/blob/main/Documentation/api.md#tlsconfig - tlsConfig: {} - - bearerTokenFile: - - ## MetricRelabelConfigs to apply to samples after scraping, but before ingestion. -- ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#relabelconfig -+ ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#relabelconfig - ## - metricRelabelings: [] - # - action: keep -@@ -947,7 +407,7 @@ - # sourceLabels: [__name__] - - ## RelabelConfigs to apply to samples before scraping -- ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#relabelconfig -+ ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#relabelconfig - ## - relabelings: [] - # - sourceLabels: [__meta_kubernetes_pod_node_name] -@@ -958,7 +418,7 @@ - # action: replace - - ## Settings affecting alertmanagerSpec -- ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#alertmanagerspec -+ ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#alertmanagerspec +- +- ## Denotes if this Service desires to route external traffic to node-local or cluster-wide endpoints +- ## +- externalTrafficPolicy: Cluster +- +- ## Service type +- ## +- type: ClusterIP +- + ## If true, create a serviceMonitor for alertmanager ## - alertmanagerSpec: - ## Standard object's metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata -@@ -970,14 +430,9 @@ - ## - image: - repository: rancher/mirrored-prometheus-alertmanager -- tag: v0.22.2 -+ tag: v0.24.0 + serviceMonitor: +@@ -1149,11 +433,6 @@ + tag: v0.24.0 sha: "" - ## If true then the user will be responsible to provide a secret with alertmanager configuration @@ -843,14 +865,8 @@ ## Secrets is a list of Secrets in the same namespace as the Alertmanager object, which shall be mounted into the ## Alertmanager Pods. The Secrets are mounted into /etc/alertmanager/secrets/. ## -@@ -993,42 +448,27 @@ - ## - # configSecret: +@@ -1175,40 +454,14 @@ -+ ## WebTLSConfig defines the TLS parameters for HTTPS -+ ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#alertmanagerwebspec -+ web: {} -+ ## AlertmanagerConfigs to be selected to merge and configure Alertmanager with. ## - alertmanagerConfigSelector: {} @@ -877,8 +893,7 @@ + - rancher-monitoring - ## Namespaces to be selected for AlertmanagerConfig discovery. If nil, only check own namespace. -+ ## AlermanagerConfig to be used as top level configuration - ## +- ## - alertmanagerConfigNamespaceSelector: {} - ## Example which selects all namespaces - ## with label "alertmanagerconfig" with values any of "example-namespace" or "example-namespace-2" @@ -889,77 +904,16 @@ - # values: - # - example-namespace - # - example-namespace-2 -+ alertmanagerConfiguration: {} -+ ## Example with select a global alertmanagerconfig -+ # alertmanagerConfiguration: -+ # name: global-alertmanager-Configuration - +- - ## Example which selects all namespaces with label "alertmanagerconfig" set to "enabled" - # alertmanagerConfigNamespaceSelector: - # matchLabels: - # alertmanagerconfig: enabled - - ## Define Log Format - # Use logfmt (default) or json logging - logFormat: logfmt -@@ -1047,7 +487,7 @@ - retention: 120h - - ## Storage is the definition of how storage will be used by the Alertmanager instances. -- ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/user-guides/storage.md -+ ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/user-guides/storage.md - ## - storage: {} - # volumeClaimTemplate: -@@ -1057,7 +497,7 @@ - # resources: - # requests: - # storage: 50Gi -- # selector: {} -+ # selector: {} - - - ## The external URL the Alertmanager instances will be available under. This is necessary to generate correct URLs. This is necessary if Alertmanager is not served from root of a DNS name. string false -@@ -1153,6 +593,18 @@ - ## Containers allows injecting additional containers. This is meant to allow adding an authentication proxy to an Alertmanager pod. - ## - containers: [] -+ # containers: -+ # - name: oauth-proxy -+ # image: quay.io/oauth2-proxy/oauth2-proxy:v7.3.0 -+ # args: -+ # - --upstream=http://127.0.0.1:9093 -+ # - --http-address=0.0.0.0:8081 -+ # - ... -+ # ports: -+ # - containerPort: 8081 -+ # name: oauth-proxy -+ # protocol: TCP -+ # resources: {} - - # Additional volumes on the output StatefulSet definition. - volumes: [] -@@ -1174,7 +626,7 @@ - - ## PortName to use for Alert Manager. - ## -- portName: "web" -+ portName: "http-web" - - ## ClusterAdvertiseAddress is the explicit address to advertise in cluster. Needs to be provided for non RFC1918 [1] (public) addresses. [1] RFC1918: https://tools.ietf.org/html/rfc1918 + ## AlermanagerConfig to be used as top level configuration ## -@@ -1184,6 +636,10 @@ - ## Use case is e.g. spanning an Alertmanager cluster across Kubernetes clusters with a single replica in each. - forceEnableClusterMode: false - -+ ## Minimum number of seconds for which a newly created pod should be ready without any of its container crashing for it to -+ ## be considered available. Defaults to 0 (pod will be considered available as soon as it is ready). -+ minReadySeconds: 0 -+ - ## ExtraSecret can be used to store various data in an extra secret - ## (use it for example to store hashed basic auth credentials) - extraSecret: -@@ -1215,9 +671,6 @@ + alertmanagerConfiguration: {} +@@ -1418,9 +671,6 @@ org_role: Viewer auth.basic: enabled: false @@ -969,7 +923,7 @@ security: # Required to embed dashboards in Rancher Cluster Overview Dashboard on Cluster Explorer allow_embedding: true -@@ -1237,18 +690,6 @@ +@@ -1440,18 +690,6 @@ ## defaultDashboardsEnabled: true @@ -988,24 +942,12 @@ ## Timezone for the default dashboards ## Other options are: browser or a specific timezone, i.e. Europe/Luxembourg ## -@@ -1261,6 +702,11 @@ - ## - enabled: false - -+ ## IngressClassName for Grafana Ingress. -+ ## Should be provided if Ingress is enable. -+ ## -+ # ingressClassName: nginx -+ - ## Annotations for Grafana Ingress - ## - annotations: {} -@@ -1293,22 +739,19 @@ +@@ -1501,17 +739,11 @@ dashboards: enabled: true label: grafana_dashboard - searchNamespace: cattle-dashboards -+ labelValue: "1" + labelValue: "1" ## Annotations for Grafana dashboard configmaps ## @@ -1018,76 +960,24 @@ provider: allowUiUpdates: false datasources: - enabled: true - defaultDatasourceEnabled: true - -+ uid: prometheus -+ - ## URL of prometheus datasource - ## - # url: http://prometheus-stack-prometheus:9090/ -@@ -1320,19 +763,25 @@ +@@ -1531,11 +763,6 @@ ## annotations: {} - ## Create datasource for each Pod of Prometheus StatefulSet; - ## this uses headless service `prometheus-operated` which is - ## created by Prometheus Operator -- ## ref: https://git.io/fjaBS +- ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/0fee93e12dc7c2ea1218f19ae25ec6b893460590/pkg/prometheus/statefulset.go#L255-L286 - createPrometheusReplicasDatasources: false label: grafana_datasource -+ labelValue: "1" - -+ ## Field with internal link pointing to existing data source in Grafana. -+ ## Can be provisioned via additionalDataSources -+ exemplarTraceIdDestinations: {} -+ # datasourceUid: Jaeger -+ # traceIdLabelName: trace_id -+ - extraConfigmapMounts: [] - # - name: certs-configmap - # mountPath: /etc/grafana/ssl/ - # configMap: certs-configmap - # readOnly: true - -+ deleteDatasources: [] -+ # - name: example-datasource -+ # orgId: 1 -+ - ## Configure additional grafana datasources (passed through tpl) - ## ref: http://docs.grafana.org/administration/provisioning/#datasources - additionalDataSources: [] -@@ -1410,426 +859,26 @@ - ## If true, create a serviceMonitor for grafana - ## - serviceMonitor: -- ## Scrape interval. If not set, the Prometheus default scrape interval is used. -- ## -- interval: "" -- selfMonitor: true -+ # If true, a ServiceMonitor CRD is created for a prometheus operator -+ # https://github.com/coreos/prometheus-operator -+ # -+ enabled: true + labelValue: "1" - # Path to use for scraping metrics. Might be different if server.root_url is set - # in grafana.ini - path: "/metrics" - -+ # namespace: monitoring (defaults to use the namespace this chart is deployed to) - -- ## MetricRelabelConfigs to apply to samples after scraping, but before ingestion. -- ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#relabelconfig -- ## -- metricRelabelings: [] -- # - action: keep -- # regex: 'kube_(daemonset|deployment|pod|namespace|node|statefulset).+' -- # sourceLabels: [__name__] -+ # labels for the ServiceMonitor -+ labels: {} +@@ -1653,294 +880,10 @@ + tlsConfig: {} + scrapeTimeout: 30s - ## RelabelConfigs to apply to samples before scraping -- ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#relabelconfig +- ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#relabelconfig - ## - relabelings: [] - # - sourceLabels: [__meta_kubernetes_pod_node_name] @@ -1118,9 +1008,7 @@ - serviceMonitor: - ## Scrape interval. If not set, the Prometheus default scrape interval is used. - ## -+ # Scrape interval. If not set, the Prometheus default scrape interval is used. -+ # - interval: "" +- interval: "" - ## proxyUrl: URL of a proxy that should be used for scraping. - ## - proxyUrl: "" @@ -1131,16 +1019,23 @@ - component: apiserver - provider: kubernetes - -- ## MetricRelabelConfigs to apply to samples after scraping, but before ingestion. -- ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#relabelconfig -- ## -- metricRelabelings: [] + ## MetricRelabelConfigs to apply to samples after scraping, but before ingestion. +- ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#relabelconfig ++ ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#relabelconfig + ## +- metricRelabelings: +- # Drop excessively noisy apiserver buckets. +- - action: drop +- regex: apiserver_request_duration_seconds_bucket;(0.15|0.2|0.3|0.35|0.4|0.45|0.6|0.7|0.8|0.9|1.25|1.5|1.75|2|3|3.5|4|4.5|6|7|8|9|15|25|40|50) +- sourceLabels: +- - __name__ +- - le - # - action: keep - # regex: 'kube_(daemonset|deployment|pod|namespace|node|statefulset).+' - # sourceLabels: [__name__] - - ## RelabelConfigs to apply to samples before scraping -- ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#relabelconfig +- ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#relabelconfig - ## - relabelings: [] - # - sourceLabels: @@ -1152,6 +1047,11 @@ - # - targetLabel: __address__ - # replacement: kubernetes.default.svc:443 - +- ## Additional labels +- ## +- additionalLabels: {} +- # foo: bar +- -## Component scraping the kubelet and kubelet-hosted cAdvisor -## -kubelet: @@ -1188,9 +1088,33 @@ - resourcePath: "/metrics/resource/v1alpha1" - - ## MetricRelabelConfigs to apply to samples after scraping, but before ingestion. -- ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#relabelconfig -- ## -- cAdvisorMetricRelabelings: [] +- ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#relabelconfig +- ## +- cAdvisorMetricRelabelings: +- # Drop less useful container CPU metrics. +- - sourceLabels: [__name__] +- action: drop +- regex: 'container_cpu_(cfs_throttled_seconds_total|load_average_10s|system_seconds_total|user_seconds_total)' +- # Drop less useful container / always zero filesystem metrics. +- - sourceLabels: [__name__] +- action: drop +- regex: 'container_fs_(io_current|io_time_seconds_total|io_time_weighted_seconds_total|reads_merged_total|sector_reads_total|sector_writes_total|writes_merged_total)' +- # Drop less useful / always zero container memory metrics. +- - sourceLabels: [__name__] +- action: drop +- regex: 'container_memory_(mapped_file|swap)' +- # Drop less useful container process metrics. +- - sourceLabels: [__name__] +- action: drop +- regex: 'container_(file_descriptors|tasks_state|threads_max)' +- # Drop container spec metrics that overlap with kube-state-metrics. +- - sourceLabels: [__name__] +- action: drop +- regex: 'container_spec.*' +- # Drop cgroup metrics with no pod. +- - sourceLabels: [id, pod] +- action: drop +- regex: '.+;' - # - sourceLabels: [__name__, image] - # separator: ; - # regex: container_([a-z_]+); @@ -1203,7 +1127,7 @@ - # action: drop - - ## MetricRelabelConfigs to apply to samples after scraping, but before ingestion. -- ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#relabelconfig +- ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#relabelconfig - ## - probesMetricRelabelings: [] - # - sourceLabels: [__name__, image] @@ -1218,7 +1142,7 @@ - # action: drop - - ## RelabelConfigs to apply to samples before scraping -- ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#relabelconfig +- ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#relabelconfig - ## - ## metrics_path is required to match upstream rules and charts - cAdvisorRelabelings: @@ -1232,7 +1156,7 @@ - # action: replace - - ## RelabelConfigs to apply to samples before scraping -- ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#relabelconfig +- ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#relabelconfig - ## - probesRelabelings: - - sourceLabels: [__metrics_path__] @@ -1245,7 +1169,7 @@ - # action: replace - - ## RelabelConfigs to apply to samples before scraping -- ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#relabelconfig +- ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#relabelconfig - ## - resourceRelabelings: - - sourceLabels: [__metrics_path__] @@ -1258,9 +1182,9 @@ - # action: replace - - ## MetricRelabelConfigs to apply to samples after scraping, but before ingestion. -- ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#relabelconfig +- ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#relabelconfig - ## -- metricRelabelings: [] + metricRelabelings: [] - # - sourceLabels: [__name__, image] - # separator: ; - # regex: container_([a-z_]+); @@ -1273,7 +1197,7 @@ - # action: drop - - ## RelabelConfigs to apply to samples before scraping -- ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#relabelconfig +- ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#relabelconfig - ## - ## metrics_path is required to match upstream rules and charts - relabelings: @@ -1286,6 +1210,11 @@ - # replacement: $1 - # action: replace - +- ## Additional labels +- ## +- additionalLabels: {} +- # foo: bar +- -## Component scraping the kube controller manager -## -kubeControllerManager: @@ -1302,8 +1231,11 @@ - ## - service: - enabled: true -- port: 10252 -- targetPort: 10252 +- ## If null or unset, the value is determined dynamically based on target Kubernetes version due to change +- ## of default port in Kubernetes 1.22. +- ## +- port: null +- targetPort: null - # selector: - # component: kube-controller-manager - @@ -1318,9 +1250,10 @@ - proxyUrl: "" - - ## Enable scraping kube-controller-manager over https. -- ## Requires proper certs (not self-signed) and delegated authentication/authorization checks +- ## Requires proper certs (not self-signed) and delegated authentication/authorization checks. +- ## If null or unset, the value is determined dynamically based on target Kubernetes version. - ## -- https: false +- https: null - - # Skip TLS certificate validation when scraping - insecureSkipVerify: null @@ -1329,23 +1262,20 @@ - serverName: null - - ## MetricRelabelConfigs to apply to samples after scraping, but before ingestion. -- ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#relabelconfig +- ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#relabelconfig - ## - metricRelabelings: [] -- # - action: keep -- # regex: 'kube_(daemonset|deployment|pod|namespace|node|statefulset).+' -- # sourceLabels: [__name__] -- -- ## RelabelConfigs to apply to samples before scraping -- ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#relabelconfig + # - action: keep + # regex: 'kube_(daemonset|deployment|pod|namespace|node|statefulset).+' + # sourceLabels: [__name__] +@@ -1956,735 +899,17 @@ + # replacement: $1 + # action: replace + +- ## Additional labels - ## -- relabelings: [] -- # - sourceLabels: [__meta_kubernetes_pod_node_name] -- # separator: ; -- # regex: ^(.*)$ -- # targetLabel: nodename -- # replacement: $1 -- # action: replace +- additionalLabels: {} +- # foo: bar - -## Component scraping coreDns. Use either this or kubeDns -## @@ -1366,7 +1296,7 @@ - proxyUrl: "" - - ## MetricRelabelConfigs to apply to samples after scraping, but before ingestion. -- ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#relabelconfig +- ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#relabelconfig - ## - metricRelabelings: [] - # - action: keep @@ -1374,7 +1304,7 @@ - # sourceLabels: [__name__] - - ## RelabelConfigs to apply to samples before scraping -- ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#relabelconfig +- ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#relabelconfig - ## - relabelings: [] - # - sourceLabels: [__meta_kubernetes_pod_node_name] @@ -1384,6 +1314,11 @@ - # replacement: $1 - # action: replace - +- ## Additional labels +- ## +- additionalLabels: {} +- # foo: bar +- -## Component scraping kubeDns. Use either this or coreDns -## -kubeDns: @@ -1407,7 +1342,7 @@ - proxyUrl: "" - - ## MetricRelabelConfigs to apply to samples after scraping, but before ingestion. -- ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#relabelconfig +- ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#relabelconfig - ## - metricRelabelings: [] - # - action: keep @@ -1415,7 +1350,7 @@ - # sourceLabels: [__name__] - - ## RelabelConfigs to apply to samples before scraping -- ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#relabelconfig +- ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#relabelconfig - ## - relabelings: [] - # - sourceLabels: [__meta_kubernetes_pod_node_name] @@ -1426,7 +1361,7 @@ - # action: replace - - ## MetricRelabelConfigs to apply to samples after scraping, but before ingestion. -- ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#relabelconfig +- ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#relabelconfig - ## - dnsmasqMetricRelabelings: [] - # - action: keep @@ -1434,7 +1369,7 @@ - # sourceLabels: [__name__] - - ## RelabelConfigs to apply to samples before scraping -- ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#relabelconfig +- ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#relabelconfig - ## - dnsmasqRelabelings: [] - # - sourceLabels: [__meta_kubernetes_pod_node_name] @@ -1444,6 +1379,11 @@ - # replacement: $1 - # action: replace - +- ## Additional labels +- ## +- additionalLabels: {} +- # foo: bar +- -## Component scraping etcd -## -kubeEtcd: @@ -1460,8 +1400,8 @@ - ## - service: - enabled: true -- port: 2379 -- targetPort: 2379 +- port: 2381 +- targetPort: 2381 - # selector: - # component: etcd - @@ -1484,30 +1424,36 @@ - ## proxyUrl: URL of a proxy that should be used for scraping. - ## - proxyUrl: "" - scheme: http +- scheme: http - insecureSkipVerify: false - serverName: "" - caFile: "" - certFile: "" - keyFile: "" -+ tlsConfig: {} -+ scrapeTimeout: 30s - - ## MetricRelabelConfigs to apply to samples after scraping, but before ingestion. - ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#relabelconfig -@@ -1840,7 +889,7 @@ - # sourceLabels: [__name__] - - ## RelabelConfigs to apply to samples before scraping -- ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#relabelconfig -+ ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#relabelconfig - ## - relabelings: [] - # - sourceLabels: [__meta_kubernetes_pod_node_name] -@@ -1850,519 +899,17 @@ - # replacement: $1 - # action: replace - +- +- ## MetricRelabelConfigs to apply to samples after scraping, but before ingestion. +- ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#relabelconfig +- ## +- metricRelabelings: [] +- # - action: keep +- # regex: 'kube_(daemonset|deployment|pod|namespace|node|statefulset).+' +- # sourceLabels: [__name__] +- +- ## RelabelConfigs to apply to samples before scraping +- ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#relabelconfig +- ## +- relabelings: [] +- # - sourceLabels: [__meta_kubernetes_pod_node_name] +- # separator: ; +- # regex: ^(.*)$ +- # targetLabel: nodename +- # replacement: $1 +- # action: replace +- +- ## Additional labels +- ## +- additionalLabels: {} +- # foo: bar - -## Component scraping kube scheduler -## @@ -1525,8 +1471,11 @@ - ## - service: - enabled: true -- port: 10251 -- targetPort: 10251 +- ## If null or unset, the value is determined dynamically based on target Kubernetes version due to change +- ## of default port in Kubernetes 1.23. +- ## +- port: null +- targetPort: null - # selector: - # component: kube-scheduler - @@ -1539,9 +1488,10 @@ - ## - proxyUrl: "" - ## Enable scraping kube-scheduler over https. -- ## Requires proper certs (not self-signed) and delegated authentication/authorization checks +- ## Requires proper certs (not self-signed) and delegated authentication/authorization checks. +- ## If null or unset, the value is determined dynamically based on target Kubernetes version. - ## -- https: false +- https: null - - ## Skip TLS certificate validation when scraping - insecureSkipVerify: null @@ -1550,7 +1500,7 @@ - serverName: null - - ## MetricRelabelConfigs to apply to samples after scraping, but before ingestion. -- ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#relabelconfig +- ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#relabelconfig - ## - metricRelabelings: [] - # - action: keep @@ -1558,7 +1508,7 @@ - # sourceLabels: [__name__] - - ## RelabelConfigs to apply to samples before scraping -- ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#relabelconfig +- ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#relabelconfig - ## - relabelings: [] - # - sourceLabels: [__meta_kubernetes_pod_node_name] @@ -1568,6 +1518,10 @@ - # replacement: $1 - # action: replace - +- ## Additional labels +- ## +- additionalLabels: {} +- # foo: bar - -## Component scraping kube proxy -## @@ -1604,7 +1558,7 @@ - https: false - - ## MetricRelabelConfigs to apply to samples after scraping, but before ingestion. -- ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#relabelconfig +- ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#relabelconfig - ## - metricRelabelings: [] - # - action: keep @@ -1612,57 +1566,22 @@ - # sourceLabels: [__name__] - - ## RelabelConfigs to apply to samples before scraping -- ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#relabelconfig +- ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#relabelconfig - ## - relabelings: [] - # - action: keep - # regex: 'kube_(daemonset|deployment|pod|namespace|node|statefulset).+' - # sourceLabels: [__name__] - +- ## Additional labels +- ## +- additionalLabels: {} +- # foo: bar - -## Component scraping kube state metrics -## -kubeStateMetrics: - enabled: true -- serviceMonitor: -- ## Scrape interval. If not set, the Prometheus default scrape interval is used. -- ## -- interval: "" -- ## Scrape Timeout. If not set, the Prometheus default scrape timeout is used. -- ## -- scrapeTimeout: "" -- ## proxyUrl: URL of a proxy that should be used for scraping. -- ## -- proxyUrl: "" -- ## Override serviceMonitor selector -- ## -- selectorOverride: {} -- -- ## MetricRelabelConfigs to apply to samples after scraping, but before ingestion. -- ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#relabelconfig -- ## -- metricRelabelings: [] -- # - action: keep -- # regex: 'kube_(daemonset|deployment|pod|namespace|node|statefulset).+' -- # sourceLabels: [__name__] -- -- ## RelabelConfigs to apply to samples before scraping -- ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#relabelconfig -- ## -- relabelings: [] -- # - sourceLabels: [__meta_kubernetes_pod_node_name] -- # separator: ; -- # regex: ^(.*)$ -- # targetLabel: nodename -- # replacement: $1 -- # action: replace -- -- # Keep labels from scraped data, overriding server-side labels -- honorLabels: true -- -- # Enable self metrics configuration for Service Monitor -- selfMonitor: -- enabled: false - -## Configuration for kube-state-metrics subchart -## @@ -1670,58 +1589,53 @@ - namespaceOverride: "" - rbac: - create: true -- podSecurityPolicy: -- enabled: true - resources: - limits: -- cpu: 100m - memory: 200Mi -- requests: -- cpu: 100m -- memory: 130Mi +- releaseLabel: true +- prometheus: +- monitor: +- enabled: true - --## Deploy node exporter as a daemonset to all nodes --## --nodeExporter: -- enabled: true +- ## Scrape interval. If not set, the Prometheus default scrape interval is used. +- ## +- interval: "" - -- ## Use the value configured in prometheus-node-exporter.podLabels -- ## -- jobLabel: jobLabel +- ## Scrape Timeout. If not set, the Prometheus default scrape timeout is used. +- ## +- scrapeTimeout: "" - -- serviceMonitor: -- ## Scrape interval. If not set, the Prometheus default scrape interval is used. -- ## -- interval: "" +- ## proxyUrl: URL of a proxy that should be used for scraping. +- ## +- proxyUrl: "" - -- ## proxyUrl: URL of a proxy that should be used for scraping. -- ## -- proxyUrl: "" +- # Keep labels from scraped data, overriding server-side labels +- ## +- honorLabels: true - -- ## How long until a scrape request times out. If not set, the Prometheus default scape timeout is used. -- ## -- scrapeTimeout: "" +- ## MetricRelabelConfigs to apply to samples after scraping, but before ingestion. +- ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#relabelconfig +- ## +- metricRelabelings: [] +- # - action: keep +- # regex: 'kube_(daemonset|deployment|pod|namespace|node|statefulset).+' +- # sourceLabels: [__name__] - -- ## MetricRelabelConfigs to apply to samples after scraping, but before ingestion. -- ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#relabelconfig -- ## -- metricRelabelings: [] -- # - sourceLabels: [__name__] -- # separator: ; -- # regex: ^node_mountstats_nfs_(event|operations|transport)_.+ -- # replacement: $1 -- # action: drop +- ## RelabelConfigs to apply to samples before scraping +- ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#relabelconfig +- ## +- relabelings: [] +- # - sourceLabels: [__meta_kubernetes_pod_node_name] +- # separator: ; +- # regex: ^(.*)$ +- # targetLabel: nodename +- # replacement: $1 +- # action: replace +- +- selfMonitor: +- enabled: false - -- ## RelabelConfigs to apply to samples before scraping -- ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#relabelconfig -- ## -- relabelings: [] -- # - sourceLabels: [__meta_kubernetes_pod_node_name] -- # separator: ; -- # regex: ^(.*)$ -- # targetLabel: nodename -- # replacement: $1 -- # action: replace +-## Deploy node exporter as a daemonset to all nodes +-## +-nodeExporter: +- enabled: true - -## Configuration for prometheus-node-exporter subchart -## @@ -1731,28 +1645,56 @@ - ## Add the 'node-exporter' label to be used by serviceMonitor to match standard common usage in rules and grafana dashboards - ## - jobLabel: node-exporter +- releaseLabel: true - extraArgs: -- - --collector.filesystem.ignored-mount-points=^/(dev|proc|sys|var/lib/docker/.+|var/lib/kubelet/.+)($|/) -- - --collector.filesystem.ignored-fs-types=^(autofs|binfmt_misc|bpf|cgroup2?|configfs|debugfs|devpts|devtmpfs|fusectl|hugetlbfs|iso9660|mqueue|nsfs|overlay|proc|procfs|pstore|rpc_pipefs|securityfs|selinuxfs|squashfs|sysfs|tracefs)$ +- - --collector.filesystem.mount-points-exclude=^/(dev|proc|sys|var/lib/docker/.+|var/lib/kubelet/.+)($|/) +- - --collector.filesystem.fs-types-exclude=^(autofs|binfmt_misc|bpf|cgroup2?|configfs|debugfs|devpts|devtmpfs|fusectl|hugetlbfs|iso9660|mqueue|nsfs|overlay|proc|procfs|pstore|rpc_pipefs|securityfs|selinuxfs|squashfs|sysfs|tracefs)$ - service: -- port: 9796 -- targetPort: 9796 -- resources: -- limits: - cpu: 200m -- memory: 50Mi - requests: -+ memory: 100Mi - cpu: 100m -- memory: 30Mi - +- portName: http-metrics +- prometheus: +- monitor: +- enabled: true +- +- jobLabel: jobLabel +- +- ## Scrape interval. If not set, the Prometheus default scrape interval is used. +- ## +- interval: "" +- +- ## How long until a scrape request times out. If not set, the Prometheus default scape timeout is used. +- ## +- scrapeTimeout: "" +- +- ## proxyUrl: URL of a proxy that should be used for scraping. +- ## +- proxyUrl: "" +- +- ## MetricRelabelConfigs to apply to samples after scraping, but before ingestion. +- ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#relabelconfig +- ## +- metricRelabelings: [] +- # - sourceLabels: [__name__] +- # separator: ; +- # regex: ^node_mountstats_nfs_(event|operations|transport)_.+ +- # replacement: $1 +- # action: drop +- +- ## RelabelConfigs to apply to samples before scraping +- ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#relabelconfig +- ## +- relabelings: [] +- # - sourceLabels: [__meta_kubernetes_pod_node_name] +- # separator: ; +- # regex: ^(.*)$ +- # targetLabel: nodename +- # replacement: $1 +- # action: replace +- -## Manages Prometheus and Alertmanager components -## -prometheusOperator: - enabled: true -+ testFramework: -+ enabled: false - +- - ## Prometheus-Operator v0.39.0 and later support TLS natively. - ## - tls: @@ -1766,6 +1708,8 @@ - ## rules from making their way into prometheus and potentially preventing the container from starting - admissionWebhooks: - failurePolicy: Fail +- ## The default timeoutSeconds is 10 and the maximum value is 30. +- timeoutSeconds: 10 - enabled: true - ## A PEM encoded CA bundle which will be used to validate the webhook's server certificate. - ## If unspecified, system trust roots on the apiserver are used. @@ -1778,7 +1722,7 @@ - enabled: true - image: - repository: rancher/mirrored-ingress-nginx-kube-webhook-certgen -- tag: v1.0 +- tag: v1.3.0 - sha: "" - pullPolicy: IfNotPresent - resources: {} @@ -1799,9 +1743,22 @@ - runAsNonRoot: true - runAsUser: 2000 - +- # Security context for create job container +- createSecretJob: +- securityContext: {} +- +- # Security context for patch job container +- patchWebhookJob: +- securityContext: {} +- - # Use certmanager to generate webhook certs - certManager: - enabled: false +- # self-signed root certificate +- rootCert: +- duration: "" # default to be 5y +- admissionCert: +- duration: "" # default to be 1y - # issuerRef: - # name: "issuer" - # kind: "ClusterIssuer" @@ -1821,6 +1778,7 @@ - ## Filter namespaces to look for prometheus-operator custom resources - ## - alertmanagerInstanceNamespaces: [] +- alertmanagerConfigNamespaces: [] - prometheusInstanceNamespaces: [] - thanosRulerInstanceNamespaces: [] - @@ -1862,6 +1820,10 @@ - loadBalancerIP: "" - loadBalancerSourceRanges: [] - +- ## Denotes if this Service desires to route external traffic to node-local or cluster-wide endpoints +- ## +- externalTrafficPolicy: Cluster +- - ## Service type - ## NodePort, ClusterIP, LoadBalancer - ## @@ -1872,6 +1834,10 @@ - ## - externalIPs: [] - +- ## Annotations to add to the operator deployment +- ## +- annotations: {} +- - ## Labels to add to the operator pod - ## - podLabels: {} @@ -1891,11 +1857,13 @@ - # logLevel: error - - ## If true, the operator will create and maintain a service for scraping kubelets -- ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/master/helm/prometheus-operator/README.md +- ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/main/helm/prometheus-operator/README.md - ## - kubeletService: - enabled: true - namespace: kube-system +- ## Use '{{ template "kube-prometheus-stack.fullname" . }}-kubelet' by default +- name: "" - - ## Create a servicemonitor for the operator - ## @@ -1926,19 +1894,23 @@ - - ## Resource limits & requests - ## -- resources: -- limits: -- cpu: 200m + resources: + limits: ++ memory: 200Mi + cpu: 200m - memory: 500Mi -- requests: + requests: - cpu: 100m -- memory: 100Mi -- + memory: 100Mi ++ cpu: 100m + - # Required for use in managed kubernetes clusters (such as AWS EKS) with custom CNI (such as calico), - # because control-plane managed by AWS cannot communicate with pods' IP CIDR and admission webhooks are not working - ## - hostNetwork: false -- ++ testFramework: ++ enabled: false + - ## Define which Nodes the Pods are scheduled on. - ## ref: https://kubernetes.io/docs/user-guide/node-selection/ - ## @@ -1982,11 +1954,18 @@ - runAsNonRoot: true - runAsUser: 65534 - +- ## Container-specific security context configuration +- ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ +- ## +- containerSecurityContext: +- allowPrivilegeEscalation: false +- readOnlyRootFilesystem: true +- - ## Prometheus-operator image - ## - image: - repository: rancher/mirrored-prometheus-operator-prometheus-operator -- tag: v0.50.0 +- tag: v0.59.1 - sha: "" - pullPolicy: IfNotPresent - @@ -1998,26 +1977,28 @@ - ## - # alertmanagerDefaultBaseImage: quay.io/prometheus/alertmanager - -- ## Prometheus-config-reloader image to use for config and rule reloading -- ## -- prometheusConfigReloaderImage: -- repository: rancher/mirrored-prometheus-operator-prometheus-config-reloader -- tag: v0.50.0 -- sha: "" -- -- ## Set the prometheus config reloader side-car CPU limit +- ## Prometheus-config-reloader - ## -- configReloaderCpu: 100m -- -- ## Set the prometheus config reloader side-car memory limit -- ## -- configReloaderMemory: 50Mi +- prometheusConfigReloader: +- image: +- repository: rancher/mirrored-prometheus-operator-prometheus-config-reloader +- tag: v0.59.1 +- sha: "" +- +- # resource config for prometheusConfigReloader +- resources: +- requests: +- cpu: 200m +- memory: 50Mi +- limits: +- cpu: 200m +- memory: 50Mi - - ## Thanos side-car image when configured - ## - thanosImage: - repository: rancher/mirrored-thanos-thanos -- tag: v0.17.2 +- tag: v0.28.0 - sha: "" - - ## Set a Field Selector to filter watched secrets @@ -2027,7 +2008,7 @@ ## Deploy a Prometheus instance ## prometheus: -@@ -2381,88 +928,6 @@ +@@ -2703,96 +928,6 @@ name: "" annotations: {} @@ -2041,6 +2022,10 @@ - annotations: {} - labels: {} - +- ## Denotes if this Service desires to route external traffic to node-local or cluster-wide endpoints +- ## +- externalTrafficPolicy: Cluster +- - ## Service type - ## - type: ClusterIP @@ -2074,7 +2059,7 @@ - scheme: "" - - ## tlsConfig: TLS configuration to use when scraping the endpoint. For example if using istio mTLS. -- ## Of type: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#tlsconfig +- ## Of type: https://github.com/coreos/prometheus-operator/blob/main/Documentation/api.md#tlsconfig - tlsConfig: {} - - bearerTokenFile: @@ -2104,6 +2089,10 @@ - httpPort: 10902 - targetHttpPort: "http" - +- ## Denotes if this Service desires to route external traffic to node-local or cluster-wide endpoints +- ## +- externalTrafficPolicy: Cluster +- - ## Service type - ## - type: LoadBalancer @@ -2116,16 +2105,10 @@ ## Configuration for Prometheus service ## service: -@@ -2491,37 +956,28 @@ - ## Only use if service.type is "LoadBalancer" - loadBalancerIP: "" - loadBalancerSourceRanges: [] -- ## Service type -- ## -- type: ClusterIP +@@ -2843,36 +978,6 @@ + + sessionAffinity: "" -- sessionAffinity: "" -- - ## Configuration for creating a separate Service for each statefulset Prometheus replica - ## - servicePerReplica: @@ -2133,11 +2116,9 @@ - annotations: {} - - ## Port for Prometheus Service per replica to listen on -+ ## Denotes if this Service desires to route external traffic to node-local or cluster-wide endpoints - ## +- ## - port: 9090 -+ externalTrafficPolicy: Cluster - +- - ## To be used with a proxy extraContainer port - targetPort: 9090 - @@ -2149,27 +2130,19 @@ - ## Loadbalancer source IP ranges - ## Only used if servicePerReplica.type is "LoadBalancer" - loadBalancerSourceRanges: [] - ## Service type - ## - type: ClusterIP - -+ ## Additional port to define in the Service -+ additionalPorts: [] -+ # additionalPorts: -+ # - name: authenticated -+ # port: 8081 -+ # targetPort: 8081 -+ -+ ## Consider that all endpoints are considered "ready" even if the Pods themselves are not -+ ## Ref: https://kubernetes.io/docs/reference/kubernetes-api/service-resources/service-v1/#ServiceSpec -+ publishNotReadyAddresses: false -+ -+ sessionAffinity: "" -+ +- +- ## Denotes if this Service desires to route external traffic to node-local or cluster-wide endpoints +- ## +- externalTrafficPolicy: Cluster +- +- ## Service type +- ## +- type: ClusterIP +- ## Configure pod disruption budgets for Prometheus ## ref: https://kubernetes.io/docs/tasks/run-application/configure-pdb/#specifying-a-poddisruptionbudget ## This configuration is immutable once created and will require the PDB to be deleted to be changed -@@ -2532,46 +988,6 @@ +@@ -2883,46 +988,6 @@ minAvailable: 1 maxUnavailable: "" @@ -2216,17 +2189,7 @@ ## ExtraSecret can be used to store various data in an extra secret ## (use it for example to store hashed basic auth credentials) extraSecret: -@@ -2593,6 +1009,9 @@ - annotations: {} - labels: {} - -+ ## Redirect ingress to an additional defined port on the service -+ # servicePort: 8081 -+ - ## Hostnames. - ## Must be provided if Ingress is enabled. - ## -@@ -2617,55 +1036,10 @@ +@@ -2971,55 +1036,10 @@ # hosts: # - prometheus.example.com @@ -2282,79 +2245,23 @@ volumes: [] serviceMonitor: -@@ -2678,7 +1052,7 @@ +@@ -3032,7 +1052,7 @@ scheme: "" ## tlsConfig: TLS configuration to use when scraping the endpoint. For example if using istio mTLS. -- ## Of type: https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#tlsconfig +- ## Of type: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#tlsconfig + ## Of type: https://github.com/coreos/prometheus-operator/blob/main/Documentation/api.md#tlsconfig tlsConfig: {} bearerTokenFile: -@@ -2701,14 +1075,14 @@ - # action: replace - - ## Settings affecting prometheusSpec -- ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#prometheusspec -+ ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#prometheusspec - ## - prometheusSpec: - ## If true, pass --storage.tsdb.max-block-duration=2h to prometheus. This is already done if using Thanos - ## - disableCompaction: false - ## APIServerConfig -- ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#apiserverconfig -+ ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#apiserverconfig - ## - apiserverConfig: {} - -@@ -2737,9 +1111,17 @@ - enableAdminAPI: false - - ## WebTLSConfig defines the TLS parameters for HTTPS -- ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#webtlsconfig -+ ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#webtlsconfig - web: {} - -+ ## Exemplars related settings that are runtime reloadable. -+ ## It requires to enable the exemplar storage feature to be effective. -+ exemplars: "" -+ ## Maximum number of exemplars stored in memory for all series. -+ ## If not set, Prometheus uses its default value. -+ ## A value of zero or less than zero disables the storage. -+ # maxSize: 100000 -+ - # EnableFeatures API enables access to Prometheus disabled features. - # ref: https://prometheus.io/docs/prometheus/latest/disabled_features/ - enableFeatures: [] -@@ -2749,7 +1131,7 @@ - ## - image: - repository: rancher/mirrored-prometheus-prometheus -- tag: v2.28.1 -+ tag: v2.38.0 - sha: "" - - ## Tolerations for use with node taints -@@ -2773,7 +1155,7 @@ - # app: prometheus - - ## Alertmanagers to which alerts will be sent -- ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#alertmanagerendpoints -+ ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#alertmanagerendpoints +@@ -3157,14 +1177,6 @@ ## - ## Default configuration will connect to the alertmanager deployed as part of this release - ## -@@ -2791,14 +1173,10 @@ - ## - externalLabels: {} + enableRemoteWriteReceiver: false - ## Name of the external label used to denote replica name -+ ## enable --web.enable-remote-write-receiver flag on prometheus-server - ## +- ## - replicaExternalLabelName: "" -+ enableRemoteWriteReceiver: false - +- - ## If true, the Operator won't add the external label used to denote replica name - ## - replicaExternalLabelNameClear: false @@ -2362,25 +2269,20 @@ ## Name of the external label used to denote Prometheus instance name ## prometheusExternalLabelName: "" -@@ -2829,16 +1207,10 @@ - configMaps: [] - - ## QuerySpec defines the query command line flags when starting Prometheus. -- ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#queryspec -+ ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#queryspec +@@ -3199,12 +1211,6 @@ ## query: {} - ## Namespaces to be selected for PrometheusRules discovery. - ## If nil, select own namespace. Namespaces to be selected for ServiceMonitor discovery. -- ## See https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#namespaceselector for usage +- ## See https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#namespaceselector for usage - ## - ruleNamespaceSelector: {} - ## If true, a nil or {} value for prometheus.prometheusSpec.ruleSelector will cause the ## prometheus resource to be created with selectors based on values in the helm deployment, ## which will also match the PrometheusRule resources created -@@ -2848,21 +1220,13 @@ +@@ -3214,21 +1220,13 @@ ## PrometheusRules to be selected for target discovery. ## If {}, select all PrometheusRules ## @@ -2409,7 +2311,7 @@ ## If true, a nil or {} value for prometheus.prometheusSpec.serviceMonitorSelector will cause the ## prometheus resource to be created with selectors based on values in the helm deployment, -@@ -2873,20 +1237,14 @@ +@@ -3239,20 +1237,14 @@ ## ServiceMonitors to be selected for target discovery. ## If {}, select all ServiceMonitors ## @@ -2437,7 +2339,7 @@ ## If true, a nil or {} value for prometheus.prometheusSpec.podMonitorSelector will cause the ## prometheus resource to be created with selectors based on values in the helm deployment, ## which will also match the podmonitors created -@@ -2896,17 +1254,14 @@ +@@ -3262,17 +1254,14 @@ ## PodMonitors to be selected for target discovery. ## If {}, select all PodMonitors ## @@ -2455,14 +2357,14 @@ + - rancher-monitoring - ## Namespaces to be selected for PodMonitor discovery. -- ## See https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#namespaceselector for usage +- ## See https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#namespaceselector for usage - ## - podMonitorNamespaceSelector: {} - ## If true, a nil or {} value for prometheus.prometheusSpec.probeSelector will cause the ## prometheus resource to be created with selectors based on values in the helm deployment, ## which will also match the probes created -@@ -2916,17 +1271,14 @@ +@@ -3282,17 +1271,14 @@ ## Probes to be selected for target discovery. ## If {}, select all Probes ## @@ -2480,35 +2382,26 @@ + - rancher-monitoring - ## Namespaces to be selected for Probe discovery. -- ## See https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#namespaceselector for usage +- ## See https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#namespaceselector for usage - ## - probeNamespaceSelector: {} - ## How long to retain metrics ## retention: 10d -@@ -2937,7 +1289,7 @@ - - ## Enable compression of the write-ahead log using Snappy. - ## -- walCompression: false -+ walCompression: true - - ## If true, the Operator won't process any Prometheus configuration changes - ## -@@ -3003,23 +1355,6 @@ +@@ -3369,23 +1355,6 @@ # - e2e-az1 # - e2e-az2 - ## The remote_read spec configuration for Prometheus. -- ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#remotereadspec +- ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#remotereadspec - remoteRead: [] - # - url: http://remote1/read - ## additionalRemoteRead is appended to remoteRead - additionalRemoteRead: [] - - ## The remote_write spec configuration for Prometheus. -- ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#remotewritespec +- ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#remotewritespec - remoteWrite: [] - # - url: http://remote1/push - ## additionalRemoteWrite is appended to remoteWrite @@ -2520,16 +2413,7 @@ ## Resource limits & requests ## resources: -@@ -3031,7 +1366,7 @@ - cpu: 750m - - ## Prometheus StorageSpec for persistent data -- ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/user-guides/storage.md -+ ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/user-guides/storage.md - ## - storageSpec: {} - ## Using PersistentVolumeClaim -@@ -3062,95 +1397,6 @@ +@@ -3428,122 +1397,9 @@ # Additional VolumeMounts on the output StatefulSet definition. volumeMounts: [] @@ -2540,6 +2424,7 @@ - ## appended, the user is responsible to make sure it is valid. Note that using this feature may expose the possibility - ## to break upgrades of Prometheus. It is advised to review Prometheus release notes to ensure that no incompatible - ## scrape configs are going to break Prometheus after the upgrade. +- ## AdditionalScrapeConfigs can be defined as a list or as a templated string. - ## - ## The scrape configuration example below will find master nodes, provided they have the name .*mst.*, relabel the - ## port to 2379 and allow etcd scraping provided it is running on all Kubernetes master nodes @@ -2572,6 +2457,20 @@ - # metric_relabel_configs: - # - regex: (kubernetes_io_hostname|failure_domain_beta_kubernetes_io_region|beta_kubernetes_io_os|beta_kubernetes_io_arch|beta_kubernetes_io_instance_type|failure_domain_beta_kubernetes_io_zone) - # action: labeldrop +- # +- ## If scrape config contains a repetitive section, you may want to use a template. +- ## In the following example, you can see how to define `gce_sd_configs` for multiple zones +- # additionalScrapeConfigs: | +- # - job_name: "node-exporter" +- # gce_sd_configs: +- # {{range $zone := .Values.gcp_zones}} +- # - project: "project1" +- # zone: "{{$zone}}" +- # port: 9100 +- # {{end}} +- # relabel_configs: +- # ... +- - - ## If additional scrape configurations are already deployed in a single secret file you can use this section. - ## Expected values are the secret name and key @@ -2608,6 +2507,7 @@ - additionalAlertManagerConfigsSecret: {} - # name: - # key: +- # optional: false - - ## AdditionalAlertRelabelConfigs allows specifying Prometheus alert relabel configurations. Alert relabel configurations specified are appended - ## to the configurations generated by the Prometheus Operator. Alert relabel configurations specified must have the form as specified in the @@ -2621,18 +2521,30 @@ - # regex: prometheus_replica - # replacement: $1 - # action: labeldrop +- +- ## If additional alert relabel configurations are already deployed in a single secret, or you want to manage +- ## them separately from the helm deployment, you can use this section. +- ## Expected values are the secret name and key +- ## Cannot be used with additionalAlertRelabelConfigs +- additionalAlertRelabelConfigsSecret: {} +- # name: +- # key: - ## SecurityContext holds pod-level security attributes and common container settings. ## This defaults to non root user with uid 1000 and gid 2000. - ## https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md -@@ -3165,20 +1411,6 @@ +- ## https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md ++ ## https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md + ## + securityContext: + runAsGroup: 2000 +@@ -3555,20 +1411,6 @@ ## priorityClassName: "" - ## Thanos configuration allows configuring various aspects of a Prometheus server in a Thanos environment. - ## This section is experimental, it may change significantly without deprecation notice in any release. - ## This is experimental and may change significantly without backward compatibility in any release. -- ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#thanosspec +- ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#thanosspec - ## - thanos: {} - # secretProviderClass: @@ -2646,16 +2558,56 @@ proxy: image: repository: rancher/mirrored-library-nginx -@@ -3214,7 +1446,7 @@ - - ## PortName to use for Prometheus. - ## -- portName: "nginx-http" -+ portName: "http-web" - - ## ArbitraryFSAccessThroughSMs configures whether configuration based on a service monitor can access arbitrary files - ## on the file system of the Prometheus container e.g. bearer token files. -@@ -3227,10 +1459,6 @@ +@@ -3576,27 +1418,27 @@ + + ## Containers allows injecting additional containers. This is meant to allow adding an authentication proxy to a Prometheus pod. + ## if using proxy extraContainer update targetPort with proxy container port +- containers: +- - name: prometheus-proxy +- args: +- - nginx +- - -g +- - daemon off; +- - -c +- - /nginx/nginx.conf +- image: rancher/mirrored-library-nginx:1.21.1-alpine +- ports: +- - containerPort: 8081 +- name: nginx-http +- protocol: TCP +- volumeMounts: +- - mountPath: /nginx +- name: prometheus-nginx +- - mountPath: /var/cache/nginx +- name: nginx-home +- securityContext: +- runAsUser: 101 +- runAsGroup: 101 ++ containers: | ++ - name: prometheus-proxy ++ args: ++ - nginx ++ - -g ++ - daemon off; ++ - -c ++ - /nginx/nginx.conf ++ image: "{{ template "system_default_registry" . }}{{ .Values.prometheus.prometheusSpec.proxy.image.repository }}:{{ .Values.prometheus.prometheusSpec.proxy.image.tag }}" ++ ports: ++ - containerPort: 8081 ++ name: nginx-http ++ protocol: TCP ++ volumeMounts: ++ - mountPath: /nginx ++ name: prometheus-nginx ++ - mountPath: /var/cache/nginx ++ name: nginx-home ++ securityContext: ++ runAsUser: 101 ++ runAsGroup: 101 + + ## InitContainers allows injecting additional initContainers. This is meant to allow doing some changes + ## (permissions, dir tree) on mounted volumes before starting prometheus +@@ -3617,10 +1459,6 @@ ## OverrideHonorTimestamps allows to globally enforce honoring timestamps in all scrape configs. overrideHonorTimestamps: false @@ -2666,35 +2618,17 @@ ## EnforcedNamespaceLabel enforces adding a namespace label of origin for each alert and metric that is user created. ## The label value will always be the namespace of the object that is being created. ## Disabled by default -@@ -3238,8 +1466,15 @@ - - ## PrometheusRulesExcludedFromEnforce - list of prometheus rules to be excluded from enforcing of adding namespace labels. - ## Works only if enforcedNamespaceLabel set to true. Make sure both ruleNamespace and ruleName are set for each pair -+ ## Deprecated, use `excludedFromEnforcement` instead - prometheusRulesExcludedFromEnforce: [] - -+ ## ExcludedFromEnforcement - list of object references to PodMonitor, ServiceMonitor, Probe and PrometheusRule objects -+ ## to be excluded from enforcing a namespace label of origin. -+ ## Works only if enforcedNamespaceLabel set to true. -+ ## See https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#objectreference -+ excludedFromEnforcement: [] -+ - ## QueryLogFile specifies the file to which PromQL queries are logged. Note that this location must be writable, - ## and can be persisted using an attached volume. Alternatively, the location can be set to a stdout location such - ## as /dev/stdout to log querie information to the default Prometheus log stream. This is only available in versions -@@ -3277,140 +1512,10 @@ - ## in Prometheus so it may change in any upcoming release. - allowOverlappingBlocks: false - +@@ -3677,515 +1515,7 @@ + ## Minimum number of seconds for which a newly created pod should be ready without any of its container crashing for it to + ## be considered available. Defaults to 0 (pod will be considered available as soon as it is ready). + minReadySeconds: 0 +- - additionalRulesForClusterRole: [] - # - apiGroups: [ "" ] - # resources: - # - nodes/proxy - # verbs: [ "get", "list", "watch" ] -+ ## Minimum number of seconds for which a newly created pod should be ready without any of its container crashing for it to -+ ## be considered available. Defaults to 0 (pod will be considered available as soon as it is ready). -+ minReadySeconds: 0 - +- - additionalServiceMonitors: [] - ## Name of the ServiceMonitor to create - ## @@ -2823,10 +2757,382 @@ - # matchNames: [] - - ## Endpoints of the selected pods to be monitored -- ## https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#podmetricsendpoint +- ## https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#podmetricsendpoint - ## - # podMetricsEndpoints: [] -+## Setting to true produces cleaner resource names, but requires a data migration because the name of the persistent volume changes. Therefore this should only be set once on initial installation. -+## +- +-## Configuration for thanosRuler +-## ref: https://thanos.io/tip/components/rule.md/ +-## +-thanosRuler: +- +- ## Deploy thanosRuler +- ## +- enabled: false +- +- ## Annotations for ThanosRuler +- ## +- annotations: {} +- +- ## Service account for ThanosRuler to use. +- ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ +- ## +- serviceAccount: +- create: true +- name: "" +- annotations: {} +- +- ## Configure pod disruption budgets for ThanosRuler +- ## ref: https://kubernetes.io/docs/tasks/run-application/configure-pdb/#specifying-a-poddisruptionbudget +- ## This configuration is immutable once created and will require the PDB to be deleted to be changed +- ## https://github.com/kubernetes/kubernetes/issues/45398 +- ## +- podDisruptionBudget: +- enabled: false +- minAvailable: 1 +- maxUnavailable: "" +- +- ingress: +- enabled: false +- +- # For Kubernetes >= 1.18 you should specify the ingress-controller via the field ingressClassName +- # See https://kubernetes.io/blog/2020/04/02/improvements-to-the-ingress-api-in-kubernetes-1.18/#specifying-the-class-of-an-ingress +- # ingressClassName: nginx +- +- annotations: {} +- +- labels: {} +- +- ## Hosts must be provided if Ingress is enabled. +- ## +- hosts: [] +- # - thanosruler.domain.com +- +- ## Paths to use for ingress rules - one path should match the thanosruler.routePrefix +- ## +- paths: [] +- # - / +- +- ## For Kubernetes >= 1.18 you should specify the pathType (determines how Ingress paths should be matched) +- ## See https://kubernetes.io/blog/2020/04/02/improvements-to-the-ingress-api-in-kubernetes-1.18/#better-path-matching-with-path-types +- # pathType: ImplementationSpecific +- +- ## TLS configuration for ThanosRuler Ingress +- ## Secret must be manually created in the namespace +- ## +- tls: [] +- # - secretName: thanosruler-general-tls +- # hosts: +- # - thanosruler.example.com +- +- ## Configuration for ThanosRuler service +- ## +- service: +- annotations: {} +- labels: {} +- clusterIP: "" +- +- ## Port for ThanosRuler Service to listen on +- ## +- port: 10902 +- ## To be used with a proxy extraContainer port +- ## +- targetPort: 10902 +- ## Port to expose on each node +- ## Only used if service.type is 'NodePort' +- ## +- nodePort: 30905 +- ## List of IP addresses at which the Prometheus server service is available +- ## Ref: https://kubernetes.io/docs/user-guide/services/#external-ips +- ## +- +- ## Additional ports to open for ThanosRuler service +- additionalPorts: [] +- +- externalIPs: [] +- loadBalancerIP: "" +- loadBalancerSourceRanges: [] +- +- ## Denotes if this Service desires to route external traffic to node-local or cluster-wide endpoints +- ## +- externalTrafficPolicy: Cluster +- +- ## Service type +- ## +- type: ClusterIP +- +- ## If true, create a serviceMonitor for thanosRuler +- ## +- serviceMonitor: +- ## Scrape interval. If not set, the Prometheus default scrape interval is used. +- ## +- interval: "" +- selfMonitor: true +- +- ## proxyUrl: URL of a proxy that should be used for scraping. +- ## +- proxyUrl: "" +- +- ## scheme: HTTP scheme to use for scraping. Can be used with `tlsConfig` for example if using istio mTLS. +- scheme: "" +- +- ## tlsConfig: TLS configuration to use when scraping the endpoint. For example if using istio mTLS. +- ## Of type: https://github.com/coreos/prometheus-operator/blob/main/Documentation/api.md#tlsconfig +- tlsConfig: {} +- +- bearerTokenFile: +- +- ## MetricRelabelConfigs to apply to samples after scraping, but before ingestion. +- ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#relabelconfig +- ## +- metricRelabelings: [] +- # - action: keep +- # regex: 'kube_(daemonset|deployment|pod|namespace|node|statefulset).+' +- # sourceLabels: [__name__] +- +- ## RelabelConfigs to apply to samples before scraping +- ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#relabelconfig +- ## +- relabelings: [] +- # - sourceLabels: [__meta_kubernetes_pod_node_name] +- # separator: ; +- # regex: ^(.*)$ +- # targetLabel: nodename +- # replacement: $1 +- # action: replace +- +- ## Settings affecting thanosRulerpec +- ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#thanosrulerspec +- ## +- thanosRulerSpec: +- ## Standard object's metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata +- ## Metadata Labels and Annotations gets propagated to the ThanosRuler pods. +- ## +- podMetadata: {} +- +- ## Image of ThanosRuler +- ## +- image: +- repository: rancher/mirrored-thanos-thanos +- tag: v0.28.0 +- sha: "" +- +- ## Namespaces to be selected for PrometheusRules discovery. +- ## If nil, select own namespace. Namespaces to be selected for ServiceMonitor discovery. +- ## See https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#namespaceselector for usage +- ## +- ruleNamespaceSelector: {} +- +- ## If true, a nil or {} value for thanosRuler.thanosRulerSpec.ruleSelector will cause the +- ## prometheus resource to be created with selectors based on values in the helm deployment, +- ## which will also match the PrometheusRule resources created +- ## +- ruleSelectorNilUsesHelmValues: true +- +- ## PrometheusRules to be selected for target discovery. +- ## If {}, select all PrometheusRules +- ## +- ruleSelector: {} +- ## Example which select all PrometheusRules resources +- ## with label "prometheus" with values any of "example-rules" or "example-rules-2" +- # ruleSelector: +- # matchExpressions: +- # - key: prometheus +- # operator: In +- # values: +- # - example-rules +- # - example-rules-2 +- # +- ## Example which select all PrometheusRules resources with label "role" set to "example-rules" +- # ruleSelector: +- # matchLabels: +- # role: example-rules +- +- ## Define Log Format +- # Use logfmt (default) or json logging +- logFormat: logfmt +- +- ## Log level for ThanosRuler to be configured with. +- ## +- logLevel: info +- +- ## Size is the expected size of the thanosRuler cluster. The controller will eventually make the size of the +- ## running cluster equal to the expected size. +- replicas: 1 +- +- ## Time duration ThanosRuler shall retain data for. Default is '24h', and must match the regular expression +- ## [0-9]+(ms|s|m|h) (milliseconds seconds minutes hours). +- ## +- retention: 24h +- +- ## Interval between consecutive evaluations. +- ## +- evaluationInterval: "" +- +- ## Storage is the definition of how storage will be used by the ThanosRuler instances. +- ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/user-guides/storage.md +- ## +- storage: {} +- # volumeClaimTemplate: +- # spec: +- # storageClassName: gluster +- # accessModes: ["ReadWriteOnce"] +- # resources: +- # requests: +- # storage: 50Gi +- # selector: {} +- +- ## AlertmanagerConfig define configuration for connecting to alertmanager. +- ## Only available with Thanos v0.10.0 and higher. Maps to the alertmanagers.config Thanos Ruler arg. +- alertmanagersConfig: {} +- # - api_version: v2 +- # http_config: +- # basic_auth: +- # username: some_user +- # password: some_pass +- # static_configs: +- # - alertmanager.thanos.io +- # scheme: http +- # timeout: 10s +- +- ## DEPRECATED. Define URLs to send alerts to Alertmanager. For Thanos v0.10.0 and higher, alertmanagersConfig should be used instead. +- ## Note: this field will be ignored if alertmanagersConfig is specified. Maps to the alertmanagers.url Thanos Ruler arg. +- # alertmanagersUrl: +- +- ## The external URL the Thanos Ruler instances will be available under. This is necessary to generate correct URLs. This is necessary if Thanos Ruler is not served from root of a DNS name. string false +- ## +- externalPrefix: +- +- ## The route prefix ThanosRuler registers HTTP handlers for. This is useful, if using ExternalURL and a proxy is rewriting HTTP routes of a request, and the actual ExternalURL is still true, +- ## but the server serves requests under a different route prefix. For example for use with kubectl proxy. +- ## +- routePrefix: / +- +- ## ObjectStorageConfig configures object storage in Thanos. Alternative to +- ## ObjectStorageConfigFile, and lower order priority. +- objectStorageConfig: {} +- +- ## ObjectStorageConfigFile specifies the path of the object storage configuration file. +- ## When used alongside with ObjectStorageConfig, ObjectStorageConfigFile takes precedence. +- objectStorageConfigFile: "" +- +- ## Labels configure the external label pairs to ThanosRuler. A default replica +- ## label `thanos_ruler_replica` will be always added as a label with the value +- ## of the pod's name and it will be dropped in the alerts. +- labels: {} +- +- ## If set to true all actions on the underlying managed objects are not going to be performed, except for delete actions. +- ## +- paused: false +- +- ## Define which Nodes the Pods are scheduled on. +- ## ref: https://kubernetes.io/docs/user-guide/node-selection/ +- ## +- nodeSelector: {} +- +- ## Define resources requests and limits for single Pods. +- ## ref: https://kubernetes.io/docs/user-guide/compute-resources/ +- ## +- resources: {} +- # requests: +- # memory: 400Mi +- +- ## Pod anti-affinity can prevent the scheduler from placing Prometheus replicas on the same node. +- ## The default value "soft" means that the scheduler should *prefer* to not schedule two replica pods onto the same node but no guarantee is provided. +- ## The value "hard" means that the scheduler is *required* to not schedule two replica pods onto the same node. +- ## The value "" will disable pod anti-affinity so that no anti-affinity rules will be configured. +- ## +- podAntiAffinity: "" +- +- ## If anti-affinity is enabled sets the topologyKey to use for anti-affinity. +- ## This can be changed to, for example, failure-domain.beta.kubernetes.io/zone +- ## +- podAntiAffinityTopologyKey: kubernetes.io/hostname +- +- ## Assign custom affinity rules to the thanosRuler instance +- ## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ +- ## +- affinity: {} +- # nodeAffinity: +- # requiredDuringSchedulingIgnoredDuringExecution: +- # nodeSelectorTerms: +- # - matchExpressions: +- # - key: kubernetes.io/e2e-az-name +- # operator: In +- # values: +- # - e2e-az1 +- # - e2e-az2 +- +- ## If specified, the pod's tolerations. +- ## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ +- ## +- tolerations: [] +- # - key: "key" +- # operator: "Equal" +- # value: "value" +- # effect: "NoSchedule" +- +- ## If specified, the pod's topology spread constraints. +- ## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/ +- ## +- topologySpreadConstraints: [] +- # - maxSkew: 1 +- # topologyKey: topology.kubernetes.io/zone +- # whenUnsatisfiable: DoNotSchedule +- # labelSelector: +- # matchLabels: +- # app: thanos-ruler +- +- ## SecurityContext holds pod-level security attributes and common container settings. +- ## This defaults to non root user with uid 1000 and gid 2000. *v1.PodSecurityContext false +- ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ +- ## +- securityContext: +- runAsGroup: 2000 +- runAsNonRoot: true +- runAsUser: 1000 +- fsGroup: 2000 +- +- ## ListenLocal makes the ThanosRuler server listen on loopback, so that it does not bind against the Pod IP. +- ## Note this is only for the ThanosRuler UI, not the gossip communication. +- ## +- listenLocal: false +- +- ## Containers allows injecting additional containers. This is meant to allow adding an authentication proxy to an ThanosRuler pod. +- ## +- containers: [] +- +- # Additional volumes on the output StatefulSet definition. +- volumes: [] +- +- # Additional VolumeMounts on the output StatefulSet definition. +- volumeMounts: [] +- +- ## InitContainers allows injecting additional initContainers. This is meant to allow doing some changes +- ## (permissions, dir tree) on mounted volumes before starting prometheus +- initContainers: [] +- +- ## Priority class assigned to the Pods +- ## +- priorityClassName: "" +- +- ## PortName to use for ThanosRuler. +- ## +- portName: "web" +- +- ## ExtraSecret can be used to store various data in an extra secret +- ## (use it for example to store hashed basic auth credentials) +- extraSecret: +- ## if not set, name will be auto generated +- # name: "" +- annotations: {} +- data: {} +- # auth: | +- # foo:$apr1$OFG3Xybp$ckL0FHDAkoXYIlH9.cysT0 +- # someoneelse:$apr1$DMZX2Z4q$6SbQIfyuLQd.xmo/P0m2c. + + ## Setting to true produces cleaner resource names, but requires a data migration because the name of the persistent volume changes. Therefore this should only be set once on initial installation. + ## +-cleanPrometheusOperatorObjectNames: false +cleanPrometheusOperatorObjectNames: false \ No newline at end of file diff --git a/packages/rancher-project-monitoring/package.yaml b/packages/rancher-project-monitoring/package.yaml index cb1efaf4..12e07004 100644 --- a/packages/rancher-project-monitoring/package.yaml +++ b/packages/rancher-project-monitoring/package.yaml @@ -1,30 +1,30 @@ workingDir: "" url: https://github.com/rancher/charts.git -subdirectory: charts/rancher-monitoring/100.1.2+up19.0.3 -commit: 6e498bb86c9ed5d67021cc0569eca21c035d9067 +subdirectory: charts/rancher-monitoring/100.2.0+up40.1.2 +commit: 252143f2d739cd04fd86bd0838910b15e6479b56 version: 0.1.0 ignoreDependencies: -- hardenedKubelet -- hardenedNodeExporter -- k3sServer -- kube-state-metrics -- kubeAdmControllerManager -- kubeAdmProxy -- kubeAdmScheduler -- kubeAdmEtcd -- prometheus-adapter -- prometheus-node-exporter -- rke2ControllerManager -- rke2Etcd -- rke2IngressNginx -- rke2Proxy -- rke2Scheduler -- rkeControllerManager -- rkeEtcd -- rkeIngressNginx -- rkeProxy -- rkeScheduler -- windowsExporter + - hardenedKubelet + - hardenedNodeExporter + - k3sServer + - kube-state-metrics + - kubeAdmControllerManager + - kubeAdmProxy + - kubeAdmScheduler + - kubeAdmEtcd + - prometheus-adapter + - prometheus-node-exporter + - rke2ControllerManager + - rke2Etcd + - rke2IngressNginx + - rke2Proxy + - rke2Scheduler + - rkeControllerManager + - rkeEtcd + - rkeIngressNginx + - rkeProxy + - rkeScheduler + - windowsExporter replacePaths: -- README.md -- app-README.md \ No newline at end of file + - README.md + - app-README.md From 038b2b55d4d2393a21178d1a068a878e793ba814 Mon Sep 17 00:00:00 2001 From: Arvind Iyengar Date: Thu, 10 Nov 2022 08:16:52 -0800 Subject: [PATCH 04/20] Bump rancher-project-monitoring and Prometheus Federator to 0.2.0-rc1 --- packages/prometheus-federator/charts/Chart.yaml | 4 ++-- packages/prometheus-federator/charts/values.yaml | 2 +- packages/rancher-project-monitoring/package.yaml | 2 +- scripts/build-chart | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/prometheus-federator/charts/Chart.yaml b/packages/prometheus-federator/charts/Chart.yaml index 33697a48..038902e8 100755 --- a/packages/prometheus-federator/charts/Chart.yaml +++ b/packages/prometheus-federator/charts/Chart.yaml @@ -9,7 +9,7 @@ annotations: catalog.cattle.io/rancher-version: '>= 2.6.5-0 <= 2.6.100-0' catalog.cattle.io/release-name: prometheus-federator apiVersion: v2 -appVersion: 0.1.0 +appVersion: 0.2.0-rc1 dependencies: - condition: helmProjectOperator.enabled name: helmProjectOperator @@ -17,4 +17,4 @@ dependencies: description: Prometheus Federator icon: https://raw.githubusercontent.com/rancher/prometheus-federator/main/assets/logos/prometheus-federator.svg name: prometheus-federator -version: 0.1.1 +version: 0.2.0-rc1 diff --git a/packages/prometheus-federator/charts/values.yaml b/packages/prometheus-federator/charts/values.yaml index 25cba3c6..f44a6def 100755 --- a/packages/prometheus-federator/charts/values.yaml +++ b/packages/prometheus-federator/charts/values.yaml @@ -56,7 +56,7 @@ helmProjectOperator: image: repository: rancher/prometheus-federator - tag: v0.1.0 + tag: v0.2.0-rc1 pullPolicy: IfNotPresent # Additional arguments to be passed into the Prometheus Federator image diff --git a/packages/rancher-project-monitoring/package.yaml b/packages/rancher-project-monitoring/package.yaml index 12e07004..7b2049aa 100644 --- a/packages/rancher-project-monitoring/package.yaml +++ b/packages/rancher-project-monitoring/package.yaml @@ -2,7 +2,7 @@ workingDir: "" url: https://github.com/rancher/charts.git subdirectory: charts/rancher-monitoring/100.2.0+up40.1.2 commit: 252143f2d739cd04fd86bd0838910b15e6479b56 -version: 0.1.0 +version: 0.2.0-rc1 ignoreDependencies: - hardenedKubelet - hardenedNodeExporter diff --git a/scripts/build-chart b/scripts/build-chart index bd5124b9..e49c14d1 100755 --- a/scripts/build-chart +++ b/scripts/build-chart @@ -6,7 +6,7 @@ source $(dirname $0)/version cd $(dirname $0)/.. CHART=rancher-project-monitoring -VERSION=0.1.0 +VERSION=0.2.0-rc1 helm package charts/${CHART}/${VERSION} --destination bin/${CHART} base64 -i bin/${CHART}/${CHART}-${VERSION}.tgz > bin/${CHART}/${CHART}.tgz.base64 From 13907ce2c084bed40025724f6c18742f89d32261 Mon Sep 17 00:00:00 2001 From: Arvind Iyengar Date: Thu, 10 Nov 2022 15:33:41 -0800 Subject: [PATCH 05/20] Catch fixes from testing helm template with default options --- .../k8s-resources-project.yaml | 2 +- .../charts/grafana/templates/_pod.tpl.patch | 41 ++++----- .../grafana/templates/configmap.yaml.patch | 4 +- .../patch/templates/_helpers.tpl.patch | 84 +++++++++++-------- .../alertmanager/alertmanager.yaml.patch | 20 ++++- .../alertmanager/serviceaccount.yaml.patch | 9 +- .../alertmanager-overview.yaml.patch | 9 -- .../dashboards-1.14/cluster-total.yaml.patch | 10 +-- .../grafana-overview.yaml.patch | 23 +++++ .../k8s-resources-namespace.yaml.patch | 10 +-- .../k8s-resources-node.yaml.patch | 10 +-- .../k8s-resources-pod.yaml.patch | 10 +-- .../k8s-resources-workload.yaml.patch | 10 +-- ...s-resources-workloads-namespace.yaml.patch | 10 +-- .../namespace-by-pod.yaml.patch | 10 +-- .../namespace-by-workload.yaml.patch | 10 +-- .../persistentvolumesusage.yaml.patch | 10 +-- .../dashboards-1.14/pod-total.yaml.patch | 10 +-- .../dashboards-1.14/prometheus.yaml.patch | 10 +-- .../dashboards-1.14/workload-total.yaml.patch | 10 +-- .../prometheus/prometheus.yaml.patch | 11 +++ .../rules-1.14/alertmanager.rules.yaml.patch | 12 ++- .../rules-1.14/general.rules.yaml.patch | 10 +-- .../rules-1.14/kubernetes-apps.yaml.patch | 9 -- .../rules-1.14/kubernetes-storage.yaml.patch | 44 ++++++++-- .../rules-1.14/prometheus.yaml.patch | 7 +- .../prometheus/serviceaccount.yaml.patch | 9 +- 27 files changed, 193 insertions(+), 221 deletions(-) create mode 100644 packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/grafana-overview.yaml.patch diff --git a/packages/rancher-project-monitoring/generated-changes/overlay/templates/grafana/dashboards-1.14/k8s-resources-project.yaml b/packages/rancher-project-monitoring/generated-changes/overlay/templates/grafana/dashboards-1.14/k8s-resources-project.yaml index e40e1c91..56d9c77f 100644 --- a/packages/rancher-project-monitoring/generated-changes/overlay/templates/grafana/dashboards-1.14/k8s-resources-project.yaml +++ b/packages/rancher-project-monitoring/generated-changes/overlay/templates/grafana/dashboards-1.14/k8s-resources-project.yaml @@ -1,7 +1,7 @@ {{- /* Generated from 'k8s-resources-cluster' from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/grafana-dashboardDefinitions.yaml Do not change in-place! In order to change this file first read following link: -https://github.com/prometheus-community/helm-charts/tree/main/charts/project-prometheus-stack/hack +https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack */ -}} {{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} {{- if and (or .Values.grafana.enabled .Values.grafana.forceDeployDashboards) (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.grafana.defaultDashboardsEnabled }} diff --git a/packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/templates/_pod.tpl.patch b/packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/templates/_pod.tpl.patch index bef5c87b..c100c7fc 100644 --- a/packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/templates/_pod.tpl.patch +++ b/packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/templates/_pod.tpl.patch @@ -173,7 +173,7 @@ - name: FOLDER value: "/etc/grafana/provisioning/notifiers" - name: RESOURCE -@@ -141,30 +176,44 @@ +@@ -141,30 +176,45 @@ - name: UNIQUE_FILENAMES value: "{{ .Values.sidecar.enableUniqueFilenames }}" {{- end }} @@ -213,6 +213,7 @@ {{- end }} {{- if .Values.image.pullSecrets }} imagePullSecrets: ++{{- $root := . }} {{- range .Values.image.pullSecrets }} - - name: {{ . }} -{{- end}} @@ -225,7 +226,7 @@ containers: {{- if .Values.sidecar.dashboards.enabled }} - name: {{ template "grafana.name" . }}-sc-dashboard -@@ -175,6 +224,14 @@ +@@ -175,6 +225,14 @@ {{- end }} imagePullPolicy: {{ .Values.sidecar.imagePullPolicy }} env: @@ -240,7 +241,7 @@ - name: METHOD value: {{ .Values.sidecar.dashboards.watchMethod }} - name: LABEL -@@ -183,6 +240,10 @@ +@@ -183,6 +241,10 @@ - name: LABEL_VALUE value: {{ quote .Values.sidecar.dashboards.labelValue }} {{- end }} @@ -251,7 +252,7 @@ - name: FOLDER value: "{{ .Values.sidecar.dashboards.folder }}{{- with .Values.sidecar.dashboards.defaultFolderName }}/{{ . }}{{- end }}" - name: RESOURCE -@@ -191,10 +252,8 @@ +@@ -191,10 +253,8 @@ - name: UNIQUE_FILENAMES value: "{{ .Values.sidecar.enableUniqueFilenames }}" {{- end }} @@ -263,7 +264,7 @@ {{- if .Values.sidecar.skipTlsVerify }} - name: SKIP_TLS_VERIFY value: "{{ .Values.sidecar.skipTlsVerify }}" -@@ -203,17 +262,254 @@ +@@ -203,17 +263,254 @@ - name: FOLDER_ANNOTATION value: "{{ .Values.sidecar.dashboards.folderAnnotation }}" {{- end }} @@ -521,7 +522,7 @@ {{- end }} imagePullPolicy: {{ .Values.image.pullPolicy }} {{- if .Values.command }} -@@ -222,10 +518,10 @@ +@@ -222,10 +519,10 @@ - {{ . }} {{- end }} {{- end}} @@ -535,7 +536,7 @@ volumeMounts: - name: config mountPath: "/etc/grafana/grafana.ini" -@@ -235,16 +531,17 @@ +@@ -235,16 +532,17 @@ mountPath: "/etc/grafana/ldap.toml" subPath: ldap.toml {{- end }} @@ -557,7 +558,7 @@ {{- end }} {{- if .Values.dashboards }} {{- range $provider, $dashboards := .Values.dashboards }} -@@ -277,6 +574,13 @@ +@@ -277,6 +575,13 @@ subPath: {{ . | quote }} {{- end }} {{- end }} @@ -571,7 +572,7 @@ {{- if .Values.dashboardProviders }} {{- range (keys .Values.dashboardProviders | sortAlpha) }} - name: config -@@ -297,6 +601,10 @@ +@@ -297,6 +602,10 @@ - name: sc-datasources-volume mountPath: "/etc/grafana/provisioning/datasources" {{- end}} @@ -582,7 +583,7 @@ {{- if .Values.sidecar.notifiers.enabled }} - name: sc-notifiers-volume mountPath: "/etc/grafana/provisioning/notifiers" -@@ -318,25 +626,22 @@ +@@ -318,25 +627,22 @@ mountPath: {{ .mountPath }} {{- end }} ports: @@ -611,7 +612,7 @@ key: {{ .Values.admin.passwordKey | default "admin-password" }} {{- end }} {{- if .Values.plugins }} -@@ -358,12 +663,12 @@ +@@ -358,12 +664,12 @@ name: {{ .Values.smtp.existingSecret }} key: {{ .Values.smtp.passwordKey | default "password" }} {{- end }} @@ -627,7 +628,7 @@ - name: GF_PATHS_DATA value: {{ (get .Values "grafana.ini").paths.data }} - name: GF_PATHS_LOGS -@@ -375,13 +680,13 @@ +@@ -375,13 +681,13 @@ {{- range $key, $value := .Values.envValueFrom }} - name: {{ $key | quote }} valueFrom: @@ -643,7 +644,7 @@ envFrom: {{- if .Values.envFromSecret }} - secretRef: -@@ -393,16 +698,30 @@ +@@ -393,16 +699,30 @@ {{- end }} {{- range .Values.envFromSecrets }} - secretRef: @@ -678,7 +679,7 @@ {{- with .Values.extraContainers }} {{ tpl . $ | indent 2 }} {{- end }} -@@ -410,10 +729,15 @@ +@@ -410,10 +730,15 @@ {{- if .Values.nodeSelector }} {{ toYaml .Values.nodeSelector | indent 2 }} {{- end }} @@ -695,7 +696,7 @@ tolerations: {{ include "linux-node-tolerations" . | nindent 2 }} {{- if .Values.tolerations }} {{ toYaml .Values.tolerations | indent 2 }} -@@ -422,10 +746,14 @@ +@@ -422,10 +747,14 @@ - name: config configMap: name: {{ template "grafana.fullname" . }} @@ -712,7 +713,7 @@ {{- end }} {{- if .Values.dashboards }} {{- range (keys .Values.dashboards | sortAlpha) }} -@@ -457,7 +785,7 @@ +@@ -457,7 +786,7 @@ {{- if and .Values.persistence.enabled (eq .Values.persistence.type "pvc") }} - name: storage persistentVolumeClaim: @@ -721,7 +722,7 @@ {{- else if and .Values.persistence.enabled (eq .Values.persistence.type "statefulset") }} # nothing {{- else }} -@@ -474,7 +802,12 @@ +@@ -474,7 +803,12 @@ {{- end -}} {{- if .Values.sidecar.dashboards.enabled }} - name: sc-dashboard-volume @@ -734,7 +735,7 @@ {{- if .Values.sidecar.dashboards.SCProvider }} - name: sc-dashboard-provider configMap: -@@ -483,18 +816,40 @@ +@@ -483,18 +817,40 @@ {{- end }} {{- if .Values.sidecar.datasources.enabled }} - name: sc-datasources-volume @@ -775,7 +776,7 @@ {{- else if .projected }} - name: {{ .name }} projected: {{- toYaml .projected | nindent 6 }} -@@ -511,6 +866,10 @@ +@@ -511,6 +867,10 @@ {{- else if .hostPath }} hostPath: path: {{ .hostPath }} @@ -786,7 +787,7 @@ {{- else }} emptyDir: {} {{- end }} -@@ -520,6 +879,6 @@ +@@ -520,6 +880,6 @@ emptyDir: {} {{- end -}} {{- if .Values.extraContainerVolumes }} diff --git a/packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/templates/configmap.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/templates/configmap.yaml.patch index 9de4c5de..18b3e493 100644 --- a/packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/templates/configmap.yaml.patch +++ b/packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/templates/configmap.yaml.patch @@ -9,7 +9,7 @@ plugins: {{ join "," .Values.plugins }} {{- end }} grafana.ini: | -+{{- range $elem, $elemVal := index .Values "grafana.ini" 100644 ++{{- range $elem, $elemVal := index .Values "grafana.ini" }} + {{- if not (kindIs "map" $elemVal) }} + {{- if kindIs "invalid" $elemVal }} + {{ $elem }} = @@ -72,7 +72,7 @@ - {{- if $value.url -}}"{{ $value.url }}"{{- else -}}"https://grafana.com/api/dashboards/{{ $value.gnetId }}/revisions/{{- if $value.revision -}}{{ $value.revision }}{{- else -}}1{{- end -}}/download"{{- end -}}{{ if $value.datasource }} | sed '/-- .* --/! s/"datasource":.*,/"datasource": "{{ $value.datasource }}",/g'{{ end }}{{- if $value.b64content -}} | base64 -d {{- end -}} \ - > "/var/lib/grafana/dashboards/{{ $provider }}/{{ $key }}.json" + {{- $dpPath := "" -}} -+ {{- range $kd := (index $dashboardProviders "dashboardproviders.yaml").providers 100644 ++ {{- range $kd := (index $dashboardProviders "dashboardproviders.yaml").providers }} + {{- if eq $kd.name $provider -}} + {{- $dpPath = $kd.options.path -}} {{- end -}} diff --git a/packages/rancher-project-monitoring/generated-changes/patch/templates/_helpers.tpl.patch b/packages/rancher-project-monitoring/generated-changes/patch/templates/_helpers.tpl.patch index a1832073..eba2bbc4 100644 --- a/packages/rancher-project-monitoring/generated-changes/patch/templates/_helpers.tpl.patch +++ b/packages/rancher-project-monitoring/generated-changes/patch/templates/_helpers.tpl.patch @@ -113,16 +113,15 @@ {{- if .Values.fullnameOverride -}} {{- .Values.fullnameOverride | trunc 26 | trimSuffix "-" -}} {{- else -}} -@@ -160,45 +72,40 @@ +@@ -159,46 +71,36 @@ + {{- end -}} {{- end -}} - {{/* Fullname suffixed with operator */}} +-{{/* Fullname suffixed with operator */}} -{{- define "kube-prometheus-stack.operator.fullname" -}} -{{- printf "%s-operator" (include "kube-prometheus-stack.fullname" .) -}} -+{{- define "project-prometheus-stack.operator.fullname" -}} -+{{- printf "%s-operator" (include "project-prometheus-stack.fullname" .) -}} - {{- end }} - +-{{- end }} +- {{/* Prometheus custom resource instance name */}} -{{- define "kube-prometheus-stack.prometheus.crname" -}} +{{- define "project-prometheus-stack.prometheus.crname" -}} @@ -171,7 +170,7 @@ release: {{ $.Release.Name | quote }} heritage: {{ $.Release.Service | quote }} {{- if .Values.commonLabels}} -@@ -206,46 +113,28 @@ +@@ -206,46 +108,28 @@ {{- end }} {{- end }} @@ -223,7 +222,7 @@ {{- if .Values.namespaceOverride -}} {{- .Values.namespaceOverride -}} {{- else -}} -@@ -256,7 +145,7 @@ +@@ -256,7 +140,7 @@ {{/* Use the grafana namespace override for multi-namespace deployments in combined charts */}} @@ -232,7 +231,7 @@ {{- if .Values.grafana.namespaceOverride -}} {{- .Values.grafana.namespaceOverride -}} {{- else -}} -@@ -264,36 +153,14 @@ +@@ -264,36 +148,14 @@ {{- end -}} {{- end -}} @@ -272,7 +271,7 @@ {{- print "networking.k8s.io/v1" -}} {{- else if .Capabilities.APIVersions.Has "networking.k8s.io/v1beta1" -}} {{- print "networking.k8s.io/v1beta1" -}} -@@ -303,19 +170,19 @@ +@@ -303,19 +165,19 @@ {{- end -}} {{/* Check Ingress stability */}} @@ -298,48 +297,59 @@ {{- print "policy/v1" -}} {{- else -}} {{- print "policy/v1beta1" -}} -@@ -324,11 +191,11 @@ +@@ -323,14 +185,14 @@ + {{- end -}} {{/* Get value based on current Kubernetes version */}} - {{- define "kube-prometheus-stack.kubeVersionDefaultValue" -}} +-{{- define "kube-prometheus-stack.kubeVersionDefaultValue" -}} - {{- $values := index . 0 -}} - {{- $kubeVersion := index . 1 -}} - {{- $old := index . 2 -}} - {{- $new := index . 3 -}} - {{- $default := index . 4 -}} -+ {{- $values := index . 0 100644 -+ {{- $kubeVersion := index . 1 100644 -+ {{- $old := index . 2 100644 -+ {{- $new := index . 3 100644 -+ {{- $default := index . 4 100644 ++{{- define "project-prometheus-stack.kubeVersionDefaultValue" -}} ++ {{- $values := index . 0 }} ++ {{- $kubeVersion := index . 1 }} ++ {{- $old := index . 2 }} ++ {{- $new := index . 3 }} ++ {{- $default := index . 4 }} {{- if kindIs "invalid" $default -}} - {{- if semverCompare $kubeVersion (include "kube-prometheus-stack.kubeVersion" $values) -}} +- {{- if semverCompare $kubeVersion (include "kube-prometheus-stack.kubeVersion" $values) -}} ++ {{- if semverCompare $kubeVersion (include "project-prometheus-stack.kubeVersion" $values) -}} {{- print $new -}} -@@ -342,19 +209,19 @@ + {{- else -}} + {{- print $old -}} +@@ -340,24 +202,6 @@ + {{- end -}} + {{- end -}} - {{/* Get value for kube-controller-manager depending on insecure scraping availability */}} - {{- define "kube-prometheus-stack.kubeControllerManager.insecureScrape" -}} +-{{/* Get value for kube-controller-manager depending on insecure scraping availability */}} +-{{- define "kube-prometheus-stack.kubeControllerManager.insecureScrape" -}} - {{- $values := index . 0 -}} - {{- $insecure := index . 1 -}} - {{- $secure := index . 2 -}} - {{- $userValue := index . 3 -}} -+ {{- $values := index . 0 100644 -+ {{- $insecure := index . 1 100644 -+ {{- $secure := index . 2 100644 -+ {{- $userValue := index . 3 100644 - {{- include "kube-prometheus-stack.kubeVersionDefaultValue" (list $values ">= 1.22-0" $insecure $secure $userValue) -}} - {{- end -}} - - {{/* Get value for kube-scheduler depending on insecure scraping availability */}} - {{- define "kube-prometheus-stack.kubeScheduler.insecureScrape" -}} +- {{- include "kube-prometheus-stack.kubeVersionDefaultValue" (list $values ">= 1.22-0" $insecure $secure $userValue) -}} +-{{- end -}} +- +-{{/* Get value for kube-scheduler depending on insecure scraping availability */}} +-{{- define "kube-prometheus-stack.kubeScheduler.insecureScrape" -}} - {{- $values := index . 0 -}} - {{- $insecure := index . 1 -}} - {{- $secure := index . 2 -}} - {{- $userValue := index . 3 -}} -+ {{- $values := index . 0 100644 -+ {{- $insecure := index . 1 100644 -+ {{- $secure := index . 2 100644 -+ {{- $userValue := index . 3 100644 - {{- include "kube-prometheus-stack.kubeVersionDefaultValue" (list $values ">= 1.23-0" $insecure $secure $userValue) -}} - {{- end -}} - +- {{- include "kube-prometheus-stack.kubeVersionDefaultValue" (list $values ">= 1.23-0" $insecure $secure $userValue) -}} +-{{- end -}} +- + {{/* + To help compatibility with other charts which use global.imagePullSecrets. + Allow either an array of {name: pullSecret} maps (k8s-style), or an array of strings (more common helm-style). +@@ -373,7 +217,7 @@ + - pullSecret1 + - pullSecret2 + */}} +-{{- define "kube-prometheus-stack.imagePullSecrets" -}} ++{{- define "project-prometheus-stack.imagePullSecrets" -}} + {{- range .Values.global.imagePullSecrets }} + {{- if eq (typeOf .) "map[string]interface {}" }} + - {{ toYaml . | trim }} diff --git a/packages/rancher-project-monitoring/generated-changes/patch/templates/alertmanager/alertmanager.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/templates/alertmanager/alertmanager.yaml.patch index d7e08a42..70029bc5 100644 --- a/packages/rancher-project-monitoring/generated-changes/patch/templates/alertmanager/alertmanager.yaml.patch +++ b/packages/rancher-project-monitoring/generated-changes/patch/templates/alertmanager/alertmanager.yaml.patch @@ -60,7 +60,7 @@ {{- else if eq .Values.alertmanager.alertmanagerSpec.podAntiAffinity "soft" }} podAntiAffinity: preferredDuringSchedulingIgnoredDuringExecution: -@@ -119,8 +114,9 @@ +@@ -119,9 +114,10 @@ topologyKey: {{ .Values.alertmanager.alertmanagerSpec.podAntiAffinityTopologyKey }} labelSelector: matchExpressions: @@ -68,7 +68,23 @@ - - {key: alertmanager, operator: In, values: [{{ template "kube-prometheus-stack.alertmanager.crname" . }}]} + - {key: app.kubernetes.io/name, operator: In, values: [alertmanager]} + - {key: alertmanager, operator: In, values: [{{ template "project-prometheus-stack.alertmanager.crname" . }}]} -+{{- end }} {{- end }} ++{{- end }} tolerations: {{ include "linux-node-tolerations" . | nindent 4 }} {{- if .Values.alertmanager.alertmanagerSpec.tolerations }} + {{ toYaml .Values.alertmanager.alertmanagerSpec.tolerations | indent 4 }} +@@ -132,7 +128,7 @@ + {{- end }} + {{- if .Values.global.imagePullSecrets }} + imagePullSecrets: +-{{ include "kube-prometheus-stack.imagePullSecrets" . | trim | indent 4 }} ++{{ include "project-prometheus-stack.imagePullSecrets" . | trim | indent 4 }} + {{- end }} + {{- if .Values.alertmanager.alertmanagerSpec.containers }} + containers: +@@ -166,5 +162,4 @@ + {{- end }} + {{- if .Values.alertmanager.alertmanagerSpec.minReadySeconds }} + minReadySeconds: {{ .Values.alertmanager.alertmanagerSpec.minReadySeconds }} +-{{- end }} + {{- end }} diff --git a/packages/rancher-project-monitoring/generated-changes/patch/templates/alertmanager/serviceaccount.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/templates/alertmanager/serviceaccount.yaml.patch index 0c17c122..4637bf8b 100644 --- a/packages/rancher-project-monitoring/generated-changes/patch/templates/alertmanager/serviceaccount.yaml.patch +++ b/packages/rancher-project-monitoring/generated-changes/patch/templates/alertmanager/serviceaccount.yaml.patch @@ -1,6 +1,6 @@ --- charts-original/templates/alertmanager/serviceaccount.yaml +++ charts/templates/alertmanager/serviceaccount.yaml -@@ -2,13 +2,13 @@ +@@ -2,19 +2,19 @@ apiVersion: v1 kind: ServiceAccount metadata: @@ -19,3 +19,10 @@ {{- if .Values.alertmanager.serviceAccount.annotations }} annotations: {{ toYaml .Values.alertmanager.serviceAccount.annotations | indent 4 }} + {{- end }} + {{- if .Values.global.imagePullSecrets }} + imagePullSecrets: +-{{ include "kube-prometheus-stack.imagePullSecrets" . | trim | indent 2}} ++{{ include "project-prometheus-stack.imagePullSecrets" . | trim | indent 2}} + {{- end }} + {{- end }} diff --git a/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/alertmanager-overview.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/alertmanager-overview.yaml.patch index f72dc8c0..e89e9a50 100644 --- a/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/alertmanager-overview.yaml.patch +++ b/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/alertmanager-overview.yaml.patch @@ -1,14 +1,5 @@ --- charts-original/templates/grafana/dashboards-1.14/alertmanager-overview.yaml +++ charts/templates/grafana/dashboards-1.14/alertmanager-overview.yaml -@@ -1,7 +1,7 @@ - {{- /* - Generated from 'alertmanager-overview' from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/grafana-dashboardDefinitions.yaml - Do not change in-place! In order to change this file first read following link: --https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack -+https://github.com/prometheus-community/helm-charts/tree/main/charts/project-prometheus-stack/hack - */ -}} - {{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} - {{- if and (or .Values.grafana.enabled .Values.grafana.forceDeployDashboards) (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.grafana.defaultDashboardsEnabled }} @@ -9,16 +9,16 @@ apiVersion: v1 kind: ConfigMap diff --git a/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/cluster-total.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/cluster-total.yaml.patch index 1f2c76dd..7b4321b2 100644 --- a/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/cluster-total.yaml.patch +++ b/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/cluster-total.yaml.patch @@ -1,14 +1,6 @@ --- charts-original/templates/grafana/dashboards-1.14/cluster-total.yaml +++ charts/templates/grafana/dashboards-1.14/cluster-total.yaml -@@ -1,23 +1,23 @@ - {{- /* - Generated from 'cluster-total' from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/grafana-dashboardDefinitions.yaml - Do not change in-place! In order to change this file first read following link: --https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack -+https://github.com/prometheus-community/helm-charts/tree/main/charts/project-prometheus-stack/hack - */ -}} - {{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} - {{- if and (or .Values.grafana.enabled .Values.grafana.forceDeployDashboards) (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.grafana.defaultDashboardsEnabled }} +@@ -8,16 +8,16 @@ apiVersion: v1 kind: ConfigMap metadata: diff --git a/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/grafana-overview.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/grafana-overview.yaml.patch new file mode 100644 index 00000000..7a5c1077 --- /dev/null +++ b/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/grafana-overview.yaml.patch @@ -0,0 +1,23 @@ +--- charts-original/templates/grafana/dashboards-1.14/grafana-overview.yaml ++++ charts/templates/grafana/dashboards-1.14/grafana-overview.yaml +@@ -8,16 +8,16 @@ + apiVersion: v1 + kind: ConfigMap + metadata: +- namespace: {{ template "kube-prometheus-stack-grafana.namespace" . }} +- name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" $) "grafana-overview" | trunc 63 | trimSuffix "-" }} ++ namespace: {{ template "project-prometheus-stack-grafana.namespace" . }} ++ name: {{ printf "%s-%s" (include "project-prometheus-stack.fullname" $) "grafana-overview" | trunc 63 | trimSuffix "-" }} + annotations: + {{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} + labels: + {{- if $.Values.grafana.sidecar.dashboards.label }} + {{ $.Values.grafana.sidecar.dashboards.label }}: {{ ternary $.Values.grafana.sidecar.dashboards.labelValue "1" (not (empty $.Values.grafana.sidecar.dashboards.labelValue)) | quote }} + {{- end }} +- app: {{ template "kube-prometheus-stack.name" $ }}-grafana +-{{ include "kube-prometheus-stack.labels" $ | indent 4 }} ++ app: {{ template "project-prometheus-stack.name" $ }}-grafana ++{{ include "project-prometheus-stack.labels" $ | indent 4 }} + data: + grafana-overview.json: |- + { diff --git a/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-resources-namespace.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-resources-namespace.yaml.patch index 80657ed0..bbaf94dc 100644 --- a/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-resources-namespace.yaml.patch +++ b/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-resources-namespace.yaml.patch @@ -1,14 +1,6 @@ --- charts-original/templates/grafana/dashboards-1.14/k8s-resources-namespace.yaml +++ charts/templates/grafana/dashboards-1.14/k8s-resources-namespace.yaml -@@ -1,23 +1,23 @@ - {{- /* - Generated from 'k8s-resources-namespace' from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/grafana-dashboardDefinitions.yaml - Do not change in-place! In order to change this file first read following link: --https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack -+https://github.com/prometheus-community/helm-charts/tree/main/charts/project-prometheus-stack/hack - */ -}} - {{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} - {{- if and (or .Values.grafana.enabled .Values.grafana.forceDeployDashboards) (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.grafana.defaultDashboardsEnabled }} +@@ -8,16 +8,16 @@ apiVersion: v1 kind: ConfigMap metadata: diff --git a/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-resources-node.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-resources-node.yaml.patch index 31294520..7161e2a8 100644 --- a/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-resources-node.yaml.patch +++ b/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-resources-node.yaml.patch @@ -1,14 +1,6 @@ --- charts-original/templates/grafana/dashboards-1.14/k8s-resources-node.yaml +++ charts/templates/grafana/dashboards-1.14/k8s-resources-node.yaml -@@ -1,23 +1,23 @@ - {{- /* - Generated from 'k8s-resources-node' from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/grafana-dashboardDefinitions.yaml - Do not change in-place! In order to change this file first read following link: --https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack -+https://github.com/prometheus-community/helm-charts/tree/main/charts/project-prometheus-stack/hack - */ -}} - {{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} - {{- if and (or .Values.grafana.enabled .Values.grafana.forceDeployDashboards) (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.grafana.defaultDashboardsEnabled }} +@@ -8,16 +8,16 @@ apiVersion: v1 kind: ConfigMap metadata: diff --git a/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-resources-pod.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-resources-pod.yaml.patch index b380b9be..c2ca6957 100644 --- a/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-resources-pod.yaml.patch +++ b/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-resources-pod.yaml.patch @@ -1,14 +1,6 @@ --- charts-original/templates/grafana/dashboards-1.14/k8s-resources-pod.yaml +++ charts/templates/grafana/dashboards-1.14/k8s-resources-pod.yaml -@@ -1,23 +1,23 @@ - {{- /* - Generated from 'k8s-resources-pod' from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/grafana-dashboardDefinitions.yaml - Do not change in-place! In order to change this file first read following link: --https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack -+https://github.com/prometheus-community/helm-charts/tree/main/charts/project-prometheus-stack/hack - */ -}} - {{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} - {{- if and (or .Values.grafana.enabled .Values.grafana.forceDeployDashboards) (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.grafana.defaultDashboardsEnabled }} +@@ -8,16 +8,16 @@ apiVersion: v1 kind: ConfigMap metadata: diff --git a/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-resources-workload.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-resources-workload.yaml.patch index 5aa32848..f684e39e 100644 --- a/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-resources-workload.yaml.patch +++ b/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-resources-workload.yaml.patch @@ -1,14 +1,6 @@ --- charts-original/templates/grafana/dashboards-1.14/k8s-resources-workload.yaml +++ charts/templates/grafana/dashboards-1.14/k8s-resources-workload.yaml -@@ -1,23 +1,23 @@ - {{- /* - Generated from 'k8s-resources-workload' from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/grafana-dashboardDefinitions.yaml - Do not change in-place! In order to change this file first read following link: --https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack -+https://github.com/prometheus-community/helm-charts/tree/main/charts/project-prometheus-stack/hack - */ -}} - {{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} - {{- if and (or .Values.grafana.enabled .Values.grafana.forceDeployDashboards) (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.grafana.defaultDashboardsEnabled }} +@@ -8,16 +8,16 @@ apiVersion: v1 kind: ConfigMap metadata: diff --git a/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-resources-workloads-namespace.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-resources-workloads-namespace.yaml.patch index c503e9c3..20149054 100644 --- a/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-resources-workloads-namespace.yaml.patch +++ b/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-resources-workloads-namespace.yaml.patch @@ -1,14 +1,6 @@ --- charts-original/templates/grafana/dashboards-1.14/k8s-resources-workloads-namespace.yaml +++ charts/templates/grafana/dashboards-1.14/k8s-resources-workloads-namespace.yaml -@@ -1,23 +1,23 @@ - {{- /* - Generated from 'k8s-resources-workloads-namespace' from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/grafana-dashboardDefinitions.yaml - Do not change in-place! In order to change this file first read following link: --https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack -+https://github.com/prometheus-community/helm-charts/tree/main/charts/project-prometheus-stack/hack - */ -}} - {{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} - {{- if and (or .Values.grafana.enabled .Values.grafana.forceDeployDashboards) (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.grafana.defaultDashboardsEnabled }} +@@ -8,16 +8,16 @@ apiVersion: v1 kind: ConfigMap metadata: diff --git a/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/namespace-by-pod.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/namespace-by-pod.yaml.patch index 80feb3bd..4c6bff16 100644 --- a/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/namespace-by-pod.yaml.patch +++ b/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/namespace-by-pod.yaml.patch @@ -1,14 +1,6 @@ --- charts-original/templates/grafana/dashboards-1.14/namespace-by-pod.yaml +++ charts/templates/grafana/dashboards-1.14/namespace-by-pod.yaml -@@ -1,23 +1,23 @@ - {{- /* - Generated from 'namespace-by-pod' from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/grafana-dashboardDefinitions.yaml - Do not change in-place! In order to change this file first read following link: --https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack -+https://github.com/prometheus-community/helm-charts/tree/main/charts/project-prometheus-stack/hack - */ -}} - {{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} - {{- if and (or .Values.grafana.enabled .Values.grafana.forceDeployDashboards) (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.grafana.defaultDashboardsEnabled }} +@@ -8,16 +8,16 @@ apiVersion: v1 kind: ConfigMap metadata: diff --git a/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/namespace-by-workload.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/namespace-by-workload.yaml.patch index ff92404f..498574c1 100644 --- a/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/namespace-by-workload.yaml.patch +++ b/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/namespace-by-workload.yaml.patch @@ -1,14 +1,6 @@ --- charts-original/templates/grafana/dashboards-1.14/namespace-by-workload.yaml +++ charts/templates/grafana/dashboards-1.14/namespace-by-workload.yaml -@@ -1,23 +1,23 @@ - {{- /* - Generated from 'namespace-by-workload' from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/grafana-dashboardDefinitions.yaml - Do not change in-place! In order to change this file first read following link: --https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack -+https://github.com/prometheus-community/helm-charts/tree/main/charts/project-prometheus-stack/hack - */ -}} - {{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} - {{- if and (or .Values.grafana.enabled .Values.grafana.forceDeployDashboards) (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.grafana.defaultDashboardsEnabled }} +@@ -8,16 +8,16 @@ apiVersion: v1 kind: ConfigMap metadata: diff --git a/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/persistentvolumesusage.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/persistentvolumesusage.yaml.patch index c0a5de3a..145d4927 100644 --- a/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/persistentvolumesusage.yaml.patch +++ b/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/persistentvolumesusage.yaml.patch @@ -1,14 +1,6 @@ --- charts-original/templates/grafana/dashboards-1.14/persistentvolumesusage.yaml +++ charts/templates/grafana/dashboards-1.14/persistentvolumesusage.yaml -@@ -1,23 +1,23 @@ - {{- /* - Generated from 'persistentvolumesusage' from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/grafana-dashboardDefinitions.yaml - Do not change in-place! In order to change this file first read following link: --https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack -+https://github.com/prometheus-community/helm-charts/tree/main/charts/project-prometheus-stack/hack - */ -}} - {{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} - {{- if and (or .Values.grafana.enabled .Values.grafana.forceDeployDashboards) (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.grafana.defaultDashboardsEnabled }} +@@ -8,16 +8,16 @@ apiVersion: v1 kind: ConfigMap metadata: diff --git a/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/pod-total.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/pod-total.yaml.patch index a257c6e9..f580b135 100644 --- a/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/pod-total.yaml.patch +++ b/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/pod-total.yaml.patch @@ -1,14 +1,6 @@ --- charts-original/templates/grafana/dashboards-1.14/pod-total.yaml +++ charts/templates/grafana/dashboards-1.14/pod-total.yaml -@@ -1,23 +1,23 @@ - {{- /* - Generated from 'pod-total' from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/grafana-dashboardDefinitions.yaml - Do not change in-place! In order to change this file first read following link: --https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack -+https://github.com/prometheus-community/helm-charts/tree/main/charts/project-prometheus-stack/hack - */ -}} - {{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} - {{- if and (or .Values.grafana.enabled .Values.grafana.forceDeployDashboards) (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.grafana.defaultDashboardsEnabled }} +@@ -8,16 +8,16 @@ apiVersion: v1 kind: ConfigMap metadata: diff --git a/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/prometheus.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/prometheus.yaml.patch index 45eaec01..8a417c56 100644 --- a/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/prometheus.yaml.patch +++ b/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/prometheus.yaml.patch @@ -1,14 +1,6 @@ --- charts-original/templates/grafana/dashboards-1.14/prometheus.yaml +++ charts/templates/grafana/dashboards-1.14/prometheus.yaml -@@ -1,23 +1,23 @@ - {{- /* - Generated from 'prometheus' from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/grafana-dashboardDefinitions.yaml - Do not change in-place! In order to change this file first read following link: --https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack -+https://github.com/prometheus-community/helm-charts/tree/main/charts/project-prometheus-stack/hack - */ -}} - {{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} - {{- if and (or .Values.grafana.enabled .Values.grafana.forceDeployDashboards) (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.grafana.defaultDashboardsEnabled }} +@@ -8,16 +8,16 @@ apiVersion: v1 kind: ConfigMap metadata: diff --git a/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/workload-total.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/workload-total.yaml.patch index fdc41543..90ba06b4 100644 --- a/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/workload-total.yaml.patch +++ b/packages/rancher-project-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/workload-total.yaml.patch @@ -1,14 +1,6 @@ --- charts-original/templates/grafana/dashboards-1.14/workload-total.yaml +++ charts/templates/grafana/dashboards-1.14/workload-total.yaml -@@ -1,23 +1,23 @@ - {{- /* - Generated from 'workload-total' from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/grafana-dashboardDefinitions.yaml - Do not change in-place! In order to change this file first read following link: --https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack -+https://github.com/prometheus-community/helm-charts/tree/main/charts/project-prometheus-stack/hack - */ -}} - {{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} - {{- if and (or .Values.grafana.enabled .Values.grafana.forceDeployDashboards) (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.grafana.defaultDashboardsEnabled }} +@@ -8,16 +8,16 @@ apiVersion: v1 kind: ConfigMap metadata: diff --git a/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/prometheus.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/prometheus.yaml.patch index 6d18c9f4..2430f9fb 100644 --- a/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/prometheus.yaml.patch +++ b/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/prometheus.yaml.patch @@ -231,3 +231,14 @@ {{- end }} {{- if .Values.prometheus.prometheusSpec.prometheusRulesExcludedFromEnforce }} {{ toYaml .Values.prometheus.prometheusSpec.prometheusRulesExcludedFromEnforce | indent 4 }} +@@ -354,8 +276,8 @@ + excludedFromEnforcement: + {{- range $prometheusDefaultRulesExcludedFromEnforce.rules }} + - resource: prometheusrules +- namespace: "{{ template "kube-prometheus-stack.namespace" $ }}" +- name: "{{ printf "%s-%s" (include "kube-prometheus-stack.fullname" $) . | trunc 63 | trimSuffix "-" }}" ++ namespace: "{{ template "project-prometheus-stack.namespace" $ }}" ++ name: "{{ printf "%s-%s" (include "project-prometheus-stack.fullname" $) . | trunc 63 | trimSuffix "-" }}" + {{- end }} + {{- if .Values.prometheus.prometheusSpec.excludedFromEnforcement }} + {{ tpl (toYaml .Values.prometheus.prometheusSpec.excludedFromEnforcement | indent 4) . }} diff --git a/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/rules-1.14/alertmanager.rules.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/rules-1.14/alertmanager.rules.yaml.patch index cac8c8c3..2ecb99c6 100644 --- a/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/rules-1.14/alertmanager.rules.yaml.patch +++ b/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/rules-1.14/alertmanager.rules.yaml.patch @@ -1,11 +1,6 @@ --- charts-original/templates/prometheus/rules-1.14/alertmanager.rules.yaml +++ charts/templates/prometheus/rules-1.14/alertmanager.rules.yaml -@@ -1,20 +1,21 @@ - {{- /* - Generated from 'alertmanager.rules' group from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/alertmanager-prometheusRule.yaml - Do not change in-place! In order to change this file first read following link: --https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack -+https://github.com/prometheus-community/helm-charts/tree/main/charts/project-prometheus-stack/hack +@@ -5,16 +5,17 @@ */ -}} {{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} {{- if and (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.defaultRules.create .Values.defaultRules.rules.alertmanager }} @@ -29,8 +24,11 @@ {{- if .Values.defaultRules.labels }} {{ toYaml .Values.defaultRules.labels | indent 4 }} {{- end }} -@@ -212,4 +213,4 @@ +@@ -210,6 +211,7 @@ + severity: critical + {{- if .Values.defaultRules.additionalRuleLabels }} {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} ++{{- end }} {{- end }} {{- end }} -{{- end }} diff --git a/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/rules-1.14/general.rules.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/rules-1.14/general.rules.yaml.patch index 8b613726..5be27ee4 100644 --- a/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/rules-1.14/general.rules.yaml.patch +++ b/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/rules-1.14/general.rules.yaml.patch @@ -1,14 +1,6 @@ --- charts-original/templates/prometheus/rules-1.14/general.rules.yaml +++ charts/templates/prometheus/rules-1.14/general.rules.yaml -@@ -1,18 +1,18 @@ - {{- /* - Generated from 'general.rules' group from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/kubePrometheus-prometheusRule.yaml - Do not change in-place! In order to change this file first read following link: --https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack -+https://github.com/prometheus-community/helm-charts/tree/main/charts/project-prometheus-stack/hack - */ -}} - {{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} - {{- if and (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.defaultRules.create .Values.defaultRules.rules.general }} +@@ -8,11 +8,11 @@ apiVersion: monitoring.coreos.com/v1 kind: PrometheusRule metadata: diff --git a/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/rules-1.14/kubernetes-apps.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/rules-1.14/kubernetes-apps.yaml.patch index 188f524a..86f58dbc 100644 --- a/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/rules-1.14/kubernetes-apps.yaml.patch +++ b/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/rules-1.14/kubernetes-apps.yaml.patch @@ -1,14 +1,5 @@ --- charts-original/templates/prometheus/rules-1.14/kubernetes-apps.yaml +++ charts/templates/prometheus/rules-1.14/kubernetes-apps.yaml -@@ -1,7 +1,7 @@ - {{- /* - Generated from 'kubernetes-apps' group from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/kubernetesControlPlane-prometheusRule.yaml - Do not change in-place! In order to change this file first read following link: --https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack -+https://github.com/prometheus-community/helm-charts/tree/main/charts/project-prometheus-stack/hack - */ -}} - {{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} - {{- if and (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.defaultRules.create .Values.defaultRules.rules.kubernetesApps }} @@ -9,11 +9,11 @@ apiVersion: monitoring.coreos.com/v1 kind: PrometheusRule diff --git a/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/rules-1.14/kubernetes-storage.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/rules-1.14/kubernetes-storage.yaml.patch index 42a4b35d..23ebfe22 100644 --- a/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/rules-1.14/kubernetes-storage.yaml.patch +++ b/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/rules-1.14/kubernetes-storage.yaml.patch @@ -1,14 +1,5 @@ --- charts-original/templates/prometheus/rules-1.14/kubernetes-storage.yaml +++ charts/templates/prometheus/rules-1.14/kubernetes-storage.yaml -@@ -1,7 +1,7 @@ - {{- /* - Generated from 'kubernetes-storage' group from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/kubernetesControlPlane-prometheusRule.yaml - Do not change in-place! In order to change this file first read following link: --https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack -+https://github.com/prometheus-community/helm-charts/tree/main/charts/project-prometheus-stack/hack - */ -}} - {{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} - {{- if and (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.defaultRules.create .Values.defaultRules.rules.kubernetesStorage }} @@ -9,11 +9,11 @@ apiVersion: monitoring.coreos.com/v1 kind: PrometheusRule @@ -60,3 +51,38 @@ unless on(namespace, persistentvolumeclaim) kube_persistentvolumeclaim_access_mode{ access_mode="ReadOnlyMany"} == 1 unless on(namespace, persistentvolumeclaim) +@@ -93,12 +93,12 @@ + summary: PersistentVolumeInodes are filling up. + expr: |- + ( +- kubelet_volume_stats_inodes_free{job="{{ include "exporter.kubelet.jobName" . }}", namespace=~"{{ $targetNamespace }}", metrics_path="/metrics"} ++ kubelet_volume_stats_inodes_free{namespace=~"{{ $targetNamespace }}", metrics_path="/metrics"} + / +- kubelet_volume_stats_inodes{job="{{ include "exporter.kubelet.jobName" . }}", namespace=~"{{ $targetNamespace }}", metrics_path="/metrics"} ++ kubelet_volume_stats_inodes{namespace=~"{{ $targetNamespace }}", metrics_path="/metrics"} + ) < 0.03 + and +- kubelet_volume_stats_inodes_used{job="{{ include "exporter.kubelet.jobName" . }}", namespace=~"{{ $targetNamespace }}", metrics_path="/metrics"} > 0 ++ kubelet_volume_stats_inodes_used{namespace=~"{{ $targetNamespace }}", metrics_path="/metrics"} > 0 + unless on(namespace, persistentvolumeclaim) + kube_persistentvolumeclaim_access_mode{ access_mode="ReadOnlyMany"} == 1 + unless on(namespace, persistentvolumeclaim) +@@ -121,14 +121,14 @@ + summary: PersistentVolumeInodes are filling up. + expr: |- + ( +- kubelet_volume_stats_inodes_free{job="{{ include "exporter.kubelet.jobName" . }}", namespace=~"{{ $targetNamespace }}", metrics_path="/metrics"} ++ kubelet_volume_stats_inodes_free{namespace=~"{{ $targetNamespace }}", metrics_path="/metrics"} + / +- kubelet_volume_stats_inodes{job="{{ include "exporter.kubelet.jobName" . }}", namespace=~"{{ $targetNamespace }}", metrics_path="/metrics"} ++ kubelet_volume_stats_inodes{namespace=~"{{ $targetNamespace }}", metrics_path="/metrics"} + ) < 0.15 + and +- kubelet_volume_stats_inodes_used{job="{{ include "exporter.kubelet.jobName" . }}", namespace=~"{{ $targetNamespace }}", metrics_path="/metrics"} > 0 ++ kubelet_volume_stats_inodes_used{namespace=~"{{ $targetNamespace }}", metrics_path="/metrics"} > 0 + and +- predict_linear(kubelet_volume_stats_inodes_free{job="{{ include "exporter.kubelet.jobName" . }}", namespace=~"{{ $targetNamespace }}", metrics_path="/metrics"}[6h], 4 * 24 * 3600) < 0 ++ predict_linear(kubelet_volume_stats_inodes_free{namespace=~"{{ $targetNamespace }}", metrics_path="/metrics"}[6h], 4 * 24 * 3600) < 0 + unless on(namespace, persistentvolumeclaim) + kube_persistentvolumeclaim_access_mode{ access_mode="ReadOnlyMany"} == 1 + unless on(namespace, persistentvolumeclaim) diff --git a/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/rules-1.14/prometheus.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/rules-1.14/prometheus.yaml.patch index 1cf29947..a17ae0c3 100644 --- a/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/rules-1.14/prometheus.yaml.patch +++ b/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/rules-1.14/prometheus.yaml.patch @@ -1,11 +1,6 @@ --- charts-original/templates/prometheus/rules-1.14/prometheus.yaml +++ charts/templates/prometheus/rules-1.14/prometheus.yaml -@@ -1,20 +1,20 @@ - {{- /* - Generated from 'prometheus' group from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/prometheus-prometheusRule.yaml - Do not change in-place! In order to change this file first read following link: --https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack -+https://github.com/prometheus-community/helm-charts/tree/main/charts/project-prometheus-stack/hack +@@ -5,16 +5,16 @@ */ -}} {{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} {{- if and (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.defaultRules.create .Values.defaultRules.rules.prometheus }} diff --git a/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/serviceaccount.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/serviceaccount.yaml.patch index bdf37250..dcc95965 100644 --- a/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/serviceaccount.yaml.patch +++ b/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/serviceaccount.yaml.patch @@ -1,6 +1,6 @@ --- charts-original/templates/prometheus/serviceaccount.yaml +++ charts/templates/prometheus/serviceaccount.yaml -@@ -2,13 +2,13 @@ +@@ -2,19 +2,19 @@ apiVersion: v1 kind: ServiceAccount metadata: @@ -19,3 +19,10 @@ {{- if .Values.prometheus.serviceAccount.annotations }} annotations: {{ toYaml .Values.prometheus.serviceAccount.annotations | indent 4 }} + {{- end }} + {{- if .Values.global.imagePullSecrets }} + imagePullSecrets: +-{{ include "kube-prometheus-stack.imagePullSecrets" . | trim | indent 2 }} ++{{ include "project-prometheus-stack.imagePullSecrets" . | trim | indent 2 }} + {{- end }} + {{- end }} From 65032b2a9d3d71d2d3436ceee4f635d654bf0471 Mon Sep 17 00:00:00 2001 From: Arvind Iyengar Date: Thu, 17 Nov 2022 14:15:48 -0800 Subject: [PATCH 06/20] Switch call for kindIs invalid to empty since value will always be provided In rancher-project-monitoring, a dummy empty string (not null) value will always be provided for both `global.cattle.clusterId` and `global.cattle.url` by the Helm Project Operator: https://github.com/rancher/helm-project-operator/blob/557114ccbc4137b9272a54705416b03043f6a11a/pkg/controllers/project/values.go#L14 https://github.com/rancher/helm-project-operator/blob/557114ccbc4137b9272a54705416b03043f6a11a/pkg/controllers/project/values.go#L29 Therefore, the `{{ kindIs "invalid" FIELD }}` call is failing here since the kind is not invalid; both are of type string. Instead, `empty` should be used for the check here. --- .../overlay/templates/dashboard-values-configmap.yaml | 6 +++--- .../patch/templates/alertmanager/alertmanager.yaml.patch | 3 ++- .../patch/templates/prometheus/prometheus.yaml.patch | 6 ++++-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/packages/rancher-project-monitoring/generated-changes/overlay/templates/dashboard-values-configmap.yaml b/packages/rancher-project-monitoring/generated-changes/overlay/templates/dashboard-values-configmap.yaml index 5e93d0d1..16acc46d 100644 --- a/packages/rancher-project-monitoring/generated-changes/overlay/templates/dashboard-values-configmap.yaml +++ b/packages/rancher-project-monitoring/generated-changes/overlay/templates/dashboard-values-configmap.yaml @@ -21,7 +21,7 @@ data: "prometheusURL": "{{ tpl .Values.prometheus.prometheusSpec.externalUrl . }}", {{- else if and .Values.prometheus.ingress.enabled .Values.prometheus.ingress.hosts }} "prometheusURL": "http://{{ tpl (index .Values.prometheus.ingress.hosts 0) . }}{{ .Values.prometheus.prometheusSpec.routePrefix }}", -{{- else if not (or (kindIs "invalid" .Values.global.cattle.url) (kindIs "invalid" .Values.global.cattle.clusterId)) }} +{{- else if not (or (empty .Values.global.cattle.url) (empty .Values.global.cattle.clusterId)) }} "prometheusURL": "{{ .Values.global.cattle.url }}/k8s/clusters/{{ .Values.global.cattle.clusterId }}/api/v1/namespaces/{{ template "project-prometheus-stack.namespace" . }}/services/http:{{ template "project-prometheus-stack.fullname" . }}-prometheus:{{ .Values.prometheus.service.port }}/proxy", {{- else }} "prometheusURL": "http://{{ template "project-prometheus-stack.fullname" . }}-prometheus.{{ template "project-prometheus-stack.namespace" . }}:{{ .Values.prometheus.service.port }}", @@ -31,7 +31,7 @@ data: "grafanaURL": "", {{- else if and .Values.grafana.ingress.enabled .Values.grafana.ingress.hosts }} "grafanaURL": "http://{{ tpl (index .Values.grafana.ingress.hosts 0) . }}{{ .Values.grafana.grafanaSpec.ingress.path }}", -{{- else if not (or (kindIs "invalid" .Values.global.cattle.url) (kindIs "invalid" .Values.global.cattle.clusterId)) }} +{{- else if not (or (empty .Values.global.cattle.url) (empty .Values.global.cattle.clusterId)) }} "grafanaURL": "{{ .Values.global.cattle.url }}/k8s/clusters/{{ .Values.global.cattle.clusterId }}/api/v1/namespaces/{{ template "project-prometheus-stack.namespace" . }}/services/http:{{ include "call-nested" (list . "grafana" "grafana.fullname") }}:{{ .Values.grafana.service.port }}/proxy", {{- else }} "grafanaURL": "http://{{ include "call-nested" (list . "grafana" "grafana.fullname") }}.{{ template "project-prometheus-stack.namespace" . }}:{{ .Values.grafana.service.port }}", @@ -43,7 +43,7 @@ data: "alertmanagerURL": "{{ tpl .Values.alertmanager.alertmanagerSpec.externalUrl . }}", {{- else if and .Values.alertmanager.ingress.enabled .Values.alertmanager.ingress.hosts }} "alertmanagerURL": "http://{{ tpl (index .Values.alertmanager.ingress.hosts 0) . }}{{ .Values.alertmanager.alertmanagerSpec.routePrefix }}", -{{- else if not (or (kindIs "invalid" .Values.global.cattle.url) (kindIs "invalid" .Values.global.cattle.clusterId)) }} +{{- else if not (or (empty .Values.global.cattle.url) (empty .Values.global.cattle.clusterId)) }} "alertmanagerURL": "{{ .Values.global.cattle.url }}/k8s/clusters/{{ .Values.global.cattle.clusterId }}/api/v1/namespaces/{{ template "project-prometheus-stack.namespace" . }}/services/http:{{ template "project-prometheus-stack.fullname" . }}-alertmanager:{{ .Values.alertmanager.service.port }}/proxy", {{- else }} "alertmanagerURL": "http://{{ template "project-prometheus-stack.fullname" . }}-alertmanager.{{ template "project-prometheus-stack.namespace" . }}:{{ .Values.alertmanager.service.port }}", diff --git a/packages/rancher-project-monitoring/generated-changes/patch/templates/alertmanager/alertmanager.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/templates/alertmanager/alertmanager.yaml.patch index 70029bc5..3463d358 100644 --- a/packages/rancher-project-monitoring/generated-changes/patch/templates/alertmanager/alertmanager.yaml.patch +++ b/packages/rancher-project-monitoring/generated-changes/patch/templates/alertmanager/alertmanager.yaml.patch @@ -26,8 +26,9 @@ externalUrl: "{{ tpl .Values.alertmanager.alertmanagerSpec.externalUrl . }}" {{- else if and .Values.alertmanager.ingress.enabled .Values.alertmanager.ingress.hosts }} externalUrl: "http://{{ tpl (index .Values.alertmanager.ingress.hosts 0) . }}{{ .Values.alertmanager.alertmanagerSpec.routePrefix }}" - {{- else if not (or (kindIs "invalid" .Values.global.cattle.url) (kindIs "invalid" .Values.global.cattle.clusterId)) }} +-{{- else if not (or (kindIs "invalid" .Values.global.cattle.url) (kindIs "invalid" .Values.global.cattle.clusterId)) }} - externalUrl: "{{ .Values.global.cattle.url }}/k8s/clusters/{{ .Values.global.cattle.clusterId }}/api/v1/namespaces/{{ .Values.namespaceOverride }}/services/http:{{ template "kube-prometheus-stack.fullname" . }}-alertmanager:{{ .Values.alertmanager.service.port }}/proxy" ++{{- else if not (or (empty .Values.global.cattle.url) (empty .Values.global.cattle.clusterId)) }} + externalUrl: "{{ .Values.global.cattle.url }}/k8s/clusters/{{ .Values.global.cattle.clusterId }}/api/v1/namespaces/{{ template "project-prometheus-stack.namespace" . }}/services/http:{{ template "project-prometheus-stack.fullname" . }}-alertmanager:{{ .Values.alertmanager.service.port }}/proxy" {{- else }} - externalUrl: http://{{ template "kube-prometheus-stack.fullname" . }}-alertmanager.{{ template "kube-prometheus-stack.namespace" . }}:{{ .Values.alertmanager.service.port }} diff --git a/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/prometheus.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/prometheus.yaml.patch index 2430f9fb..dda224d6 100644 --- a/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/prometheus.yaml.patch +++ b/packages/rancher-project-monitoring/generated-changes/patch/templates/prometheus/prometheus.yaml.patch @@ -39,11 +39,13 @@ {{- if .Values.prometheus.prometheusSpec.enableRemoteWriteReceiver }} enableRemoteWriteReceiver: {{ .Values.prometheus.prometheusSpec.enableRemoteWriteReceiver }} {{- end }} -@@ -68,9 +63,9 @@ +@@ -67,10 +62,10 @@ + externalUrl: "{{ tpl .Values.prometheus.prometheusSpec.externalUrl . }}" {{- else if and .Values.prometheus.ingress.enabled .Values.prometheus.ingress.hosts }} externalUrl: "http://{{ tpl (index .Values.prometheus.ingress.hosts 0) . }}{{ .Values.prometheus.prometheusSpec.routePrefix }}" - {{- else if not (or (kindIs "invalid" .Values.global.cattle.url) (kindIs "invalid" .Values.global.cattle.clusterId)) }} +-{{- else if not (or (kindIs "invalid" .Values.global.cattle.url) (kindIs "invalid" .Values.global.cattle.clusterId)) }} - externalUrl: "{{ .Values.global.cattle.url }}/k8s/clusters/{{ .Values.global.cattle.clusterId }}/api/v1/namespaces/{{ template "kube-prometheus-stack.namespace" . }}/services/http:{{ template "kube-prometheus-stack.fullname" . }}-prometheus:{{ .Values.prometheus.service.port }}/proxy" ++{{- else if not (or (empty .Values.global.cattle.url) (empty .Values.global.cattle.clusterId)) }} + externalUrl: "{{ .Values.global.cattle.url }}/k8s/clusters/{{ .Values.global.cattle.clusterId }}/api/v1/namespaces/{{ template "project-prometheus-stack.namespace" . }}/services/http:{{ template "project-prometheus-stack.fullname" . }}-prometheus:{{ .Values.prometheus.service.port }}/proxy" {{- else }} - externalUrl: http://{{ template "kube-prometheus-stack.fullname" . }}-prometheus.{{ template "kube-prometheus-stack.namespace" . }}:{{ .Values.prometheus.service.port }} From 76f394dc9409c7e38f2a8dcb559c60b18581a3a6 Mon Sep 17 00:00:00 2001 From: Arvind Iyengar Date: Mon, 21 Nov 2022 11:33:02 -0800 Subject: [PATCH 07/20] Omit /k8s/cluster/cluster_id from appSubUrl if cluster_id does not exist --- .../patch/charts/grafana/templates/nginx-config.yaml.patch | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/templates/nginx-config.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/templates/nginx-config.yaml.patch index 590da3a2..d269d933 100644 --- a/packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/templates/nginx-config.yaml.patch +++ b/packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/templates/nginx-config.yaml.patch @@ -27,14 +27,18 @@ location / { proxy_cache my_zone; proxy_cache_valid 200 302 1d; -@@ -61,9 +74,8 @@ +@@ -61,9 +74,12 @@ proxy_pass http://localhost:3000/; - sub_filter_types text/html; sub_filter_once off; - sub_filter '"appSubUrl":""' '"appSubUrl":"."'; ++{{- if not (empty .Values.global.cattle.clusterId) }} + sub_filter '"appSubUrl":""' '"appSubUrl":"/k8s/clusters/{{ .Values.global.cattle.clusterId }}/api/v1/namespaces/{{ template "grafana.namespace" . }}/services/http:{{ template "grafana.fullname" . }}:{{ .Values.service.port }}/proxy"'; ++{{- else }} ++ sub_filter '"appSubUrl":""' '"appSubUrl":"/api/v1/namespaces/{{ template "grafana.namespace" . }}/services/http:{{ template "grafana.fullname" . }}:{{ .Values.service.port }}/proxy"'; ++{{- end }} sub_filter '"url":"/' '"url":"./'; sub_filter ':"/avatar/' ':"avatar/'; From 66e4775f8e2614524cf81b6ee8baf59e4460ac61 Mon Sep 17 00:00:00 2001 From: Arvind Iyengar Date: Mon, 21 Nov 2022 11:55:24 -0800 Subject: [PATCH 08/20] Ensure release namespace is always included for dashboards and metrics By default, Helm Project Operator only targets namespaces that are already label-selected into a project unless it has been created by the operator itself (when it meets the conditions to create a separate release namespace), as seen in: https://github.com/rancher/helm-project-operator/blob/72233daffbda6d59c2745f4697e633bf90e591f1/pkg/controllers/project/controller.go#L248-L254 However, when a user is not using an auto-generated separate release namespace, the Project Prometheus Stack will fail to monitor anything since the release namespace resources (i.e. default alerts and dashboards) are not picked up unless the release namespace has the same project annotation. Therefore, this fix ensures that we always monitor the release namespace no matter what by adding it into the projectReleaseNamespace list when it does not exist. --- .../federate/federate-scrape-config.yaml | 5 ++-- .../charts/grafana/templates/_pod.tpl.patch | 10 +++---- .../patch/templates/_helpers.tpl.patch | 27 ++++++++++++------- 3 files changed, 25 insertions(+), 17 deletions(-) diff --git a/packages/rancher-project-monitoring/generated-changes/overlay/files/federate/federate-scrape-config.yaml b/packages/rancher-project-monitoring/generated-changes/overlay/files/federate/federate-scrape-config.yaml index 98e22d52..7855f2fd 100644 --- a/packages/rancher-project-monitoring/generated-changes/overlay/files/federate/federate-scrape-config.yaml +++ b/packages/rancher-project-monitoring/generated-changes/overlay/files/federate/federate-scrape-config.yaml @@ -5,8 +5,9 @@ params: 'match[]': - - '{namespace=~"{{ .Values.global.cattle.projectNamespaces | join "|" }}", job=~"kube-state-metrics|kubelet"}' - - '{namespace=~"{{ .Values.global.cattle.projectNamespaces | join "|" }}", job=""}' + - '{namespace=~"{{ include "project-prometheus-stack.projectNamespaceList" . | replace "," "|" }}", job=~"kube-state-metrics|kubelet"}' + - '{namespace=~"{{ include "project-prometheus-stack.projectNamespaceList" . | replace "," "|" }}", job=""}' static_configs: - targets: {{ .Values.federate.targets | toYaml | nindent 6 }} + diff --git a/packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/templates/_pod.tpl.patch b/packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/templates/_pod.tpl.patch index c100c7fc..45b1af3f 100644 --- a/packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/templates/_pod.tpl.patch +++ b/packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/templates/_pod.tpl.patch @@ -124,7 +124,7 @@ - name: NAMESPACE - value: "{{ .Values.sidecar.datasources.searchNamespace | join "," }}" - {{- end }} -+ value: "{{ .Values.global.cattle.projectNamespaces | join "," }}" ++ value: "{{ template "project-prometheus-stack.projectNamespaceList" . }}" {{- if .Values.sidecar.skipTlsVerify }} - name: SKIP_TLS_VERIFY value: "{{ .Values.sidecar.skipTlsVerify }}" @@ -181,7 +181,7 @@ - name: NAMESPACE - value: "{{ .Values.sidecar.notifiers.searchNamespace | join "," }}" - {{- end }} -+ value: "{{ .Values.global.cattle.projectNamespaces | join "," }}" ++ value: "{{ template "project-prometheus-stack.projectNamespaceList" . }}" {{- if .Values.sidecar.skipTlsVerify }} - name: SKIP_TLS_VERIFY value: "{{ .Values.sidecar.skipTlsVerify }}" @@ -260,7 +260,7 @@ - name: NAMESPACE - value: "{{ .Values.sidecar.dashboards.searchNamespace | join "," }}" - {{- end }} -+ value: "{{ .Values.global.cattle.projectNamespaces | join "," }}" ++ value: "{{ template "project-prometheus-stack.projectNamespaceList" . }}" {{- if .Values.sidecar.skipTlsVerify }} - name: SKIP_TLS_VERIFY value: "{{ .Values.sidecar.skipTlsVerify }}" @@ -348,7 +348,7 @@ + value: "{{ .Values.sidecar.enableUniqueFilenames }}" + {{- end }} + - name: NAMESPACE -+ value: "{{ .Values.global.cattle.projectNamespaces | join "," }}" ++ value: "{{ template "project-prometheus-stack.projectNamespaceList" . }}" + {{- if .Values.sidecar.skipTlsVerify }} + - name: SKIP_TLS_VERIFY + value: "{{ .Values.sidecar.skipTlsVerify }}" @@ -449,7 +449,7 @@ + value: "{{ .Values.sidecar.enableUniqueFilenames }}" + {{- end }} + - name: NAMESPACE -+ value: "{{ .Values.global.cattle.projectNamespaces | join "," }}" ++ value: "{{ template "project-prometheus-stack.projectNamespaceList" . }}" + {{- if .Values.sidecar.plugins.script }} + - name: SCRIPT + value: "{{ .Values.sidecar.plugins.script }}" diff --git a/packages/rancher-project-monitoring/generated-changes/patch/templates/_helpers.tpl.patch b/packages/rancher-project-monitoring/generated-changes/patch/templates/_helpers.tpl.patch index eba2bbc4..32f08393 100644 --- a/packages/rancher-project-monitoring/generated-changes/patch/templates/_helpers.tpl.patch +++ b/packages/rancher-project-monitoring/generated-changes/patch/templates/_helpers.tpl.patch @@ -95,8 +95,15 @@ # Windows Support {{/* -@@ -135,7 +47,7 @@ +@@ -133,9 +45,14 @@ + # Prometheus Operator + ++{{/* Comma-delimited list of namespaces that need to be watched to configure Project Prometheus Stack components */}} ++{{- define "project-prometheus-stack.projectNamespaceList" -}} ++{{ append .Values.global.cattle.projectNamespaces .Release.Namespace | uniq | join "," }} ++{{- end }} ++ {{/* vim: set filetype=mustache: */}} {{/* Expand the name of the chart. This is suffixed with -alertmanager, which means subtract 13 from longest 63 available */}} -{{- define "kube-prometheus-stack.name" -}} @@ -104,7 +111,7 @@ {{- default .Chart.Name .Values.nameOverride | trunc 50 | trimSuffix "-" -}} {{- end }} -@@ -146,7 +58,7 @@ +@@ -146,7 +63,7 @@ The components in this chart create additional resources that expand the longest created name strings. The longest name that gets created adds and extra 37 characters, so truncation should be 63-35=26. */}} @@ -113,7 +120,7 @@ {{- if .Values.fullnameOverride -}} {{- .Values.fullnameOverride | trunc 26 | trimSuffix "-" -}} {{- else -}} -@@ -159,46 +71,36 @@ +@@ -159,46 +76,36 @@ {{- end -}} {{- end -}} @@ -170,7 +177,7 @@ release: {{ $.Release.Name | quote }} heritage: {{ $.Release.Service | quote }} {{- if .Values.commonLabels}} -@@ -206,46 +108,28 @@ +@@ -206,46 +113,28 @@ {{- end }} {{- end }} @@ -222,7 +229,7 @@ {{- if .Values.namespaceOverride -}} {{- .Values.namespaceOverride -}} {{- else -}} -@@ -256,7 +140,7 @@ +@@ -256,7 +145,7 @@ {{/* Use the grafana namespace override for multi-namespace deployments in combined charts */}} @@ -231,7 +238,7 @@ {{- if .Values.grafana.namespaceOverride -}} {{- .Values.grafana.namespaceOverride -}} {{- else -}} -@@ -264,36 +148,14 @@ +@@ -264,36 +153,14 @@ {{- end -}} {{- end -}} @@ -271,7 +278,7 @@ {{- print "networking.k8s.io/v1" -}} {{- else if .Capabilities.APIVersions.Has "networking.k8s.io/v1beta1" -}} {{- print "networking.k8s.io/v1beta1" -}} -@@ -303,19 +165,19 @@ +@@ -303,19 +170,19 @@ {{- end -}} {{/* Check Ingress stability */}} @@ -297,7 +304,7 @@ {{- print "policy/v1" -}} {{- else -}} {{- print "policy/v1beta1" -}} -@@ -323,14 +185,14 @@ +@@ -323,14 +190,14 @@ {{- end -}} {{/* Get value based on current Kubernetes version */}} @@ -319,7 +326,7 @@ {{- print $new -}} {{- else -}} {{- print $old -}} -@@ -340,24 +202,6 @@ +@@ -340,24 +207,6 @@ {{- end -}} {{- end -}} @@ -344,7 +351,7 @@ {{/* To help compatibility with other charts which use global.imagePullSecrets. Allow either an array of {name: pullSecret} maps (k8s-style), or an array of strings (more common helm-style). -@@ -373,7 +217,7 @@ +@@ -373,7 +222,7 @@ - pullSecret1 - pullSecret2 */}} From 6b1ce9fdcd2005474ba4672247af2ad18f2fe154 Mon Sep 17 00:00:00 2001 From: Arvind Iyengar Date: Mon, 21 Nov 2022 14:02:48 -0800 Subject: [PATCH 09/20] Ensure container metrics from k3sServer can still be scraped with different job name --- .../overlay/files/federate/federate-scrape-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/rancher-project-monitoring/generated-changes/overlay/files/federate/federate-scrape-config.yaml b/packages/rancher-project-monitoring/generated-changes/overlay/files/federate/federate-scrape-config.yaml index 7855f2fd..b5ceb698 100644 --- a/packages/rancher-project-monitoring/generated-changes/overlay/files/federate/federate-scrape-config.yaml +++ b/packages/rancher-project-monitoring/generated-changes/overlay/files/federate/federate-scrape-config.yaml @@ -5,7 +5,7 @@ params: 'match[]': - - '{namespace=~"{{ include "project-prometheus-stack.projectNamespaceList" . | replace "," "|" }}", job=~"kube-state-metrics|kubelet"}' + - '{namespace=~"{{ include "project-prometheus-stack.projectNamespaceList" . | replace "," "|" }}", job=~"kube-state-metrics|kubelet|k3s-server"}' - '{namespace=~"{{ include "project-prometheus-stack.projectNamespaceList" . | replace "," "|" }}", job=""}' static_configs: From ee5ec6db2baca0464b84142e14a7b069c27a5731 Mon Sep 17 00:00:00 2001 From: Arvind Iyengar Date: Mon, 21 Nov 2022 14:54:24 -0800 Subject: [PATCH 10/20] Ensure Grafana uses $http_host instead of $host for nginx proxy Based on comments in https://github.com/grafana/grafana/issues/45117#issuecomment-1033842787, we should be using $http_host, which is usually the same as $host but can be different in some environments. --- .../charts/grafana/templates/nginx-config.yaml.patch | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/templates/nginx-config.yaml.patch b/packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/templates/nginx-config.yaml.patch index d269d933..bd6bc785 100644 --- a/packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/templates/nginx-config.yaml.patch +++ b/packages/rancher-project-monitoring/generated-changes/patch/charts/grafana/templates/nginx-config.yaml.patch @@ -12,6 +12,15 @@ server { listen 8080; access_log off; +@@ -36,7 +41,7 @@ + gzip_vary on; + gzip_disable "MSIE [1-6]\."; + +- proxy_set_header Host $host; ++ proxy_set_header Host $http_host; + + location /api/dashboards { + proxy_pass http://localhost:3000; @@ -50,6 +55,14 @@ sub_filter '"url":"/d' '"url":"d'; } From 4f33230eea147d035c09641277ebc8ebf8b796df Mon Sep 17 00:00:00 2001 From: Arvind Iyengar Date: Tue, 8 Nov 2022 15:08:59 -0800 Subject: [PATCH 11/20] Update docs with grafana plugin sidecar configuration --- docs/design.md | 1 + packages/prometheus-federator/charts/README.md | 1 + 2 files changed, 2 insertions(+) diff --git a/docs/design.md b/docs/design.md index a526a859..8f0ee47e 100644 --- a/docs/design.md +++ b/docs/design.md @@ -42,6 +42,7 @@ Once this setting is turned on, you can always create ServiceMonitors or PodMoni In addition, if you modified the default `.Values.grafana.sidecar.*.searchNamespace` values on the Grafana Helm subchart for Monitoring V2, it is also recommended to remove the overrides or ensure that your defaults are scoped to only system namespaces for the following values: - `.Values.grafana.sidecar.dashboards.searchNamespace` (default `cattle-dashboards`) - `.Values.grafana.sidecar.datasources.searchNamespace` (default `null`, which means it uses the release namespace `cattle-monitoring-system`) +- `.Values.grafana.sidecar.plugins.searchNamespace` (default `null`, which means it uses the release namespace `cattle-monitoring-system`) - `.Values.grafana.sidecar.notifiers.searchNamespace` (default `null`, which means it uses the release namespace `cattle-monitoring-system`) ### Increase the CPU / memory limits of the Cluster Prometheus diff --git a/packages/prometheus-federator/charts/README.md b/packages/prometheus-federator/charts/README.md index c12f3fbf..f9611a68 100644 --- a/packages/prometheus-federator/charts/README.md +++ b/packages/prometheus-federator/charts/README.md @@ -42,6 +42,7 @@ Once this setting is turned on, you can always create ServiceMonitors or PodMoni In addition, if you modified the default `.Values.grafana.sidecar.*.searchNamespace` values on the Grafana Helm subchart for Monitoring V2, it is also recommended to remove the overrides or ensure that your defaults are scoped to only system namespaces for the following values: - `.Values.grafana.sidecar.dashboards.searchNamespace` (default `cattle-dashboards`) - `.Values.grafana.sidecar.datasources.searchNamespace` (default `null`, which means it uses the release namespace `cattle-monitoring-system`) +- `.Values.grafana.sidecar.plugins.searchNamespace` (default `null`, which means it uses the release namespace `cattle-monitoring-system`) - `.Values.grafana.sidecar.notifiers.searchNamespace` (default `null`, which means it uses the release namespace `cattle-monitoring-system`) ### Increase the CPU / memory limits of the Cluster Prometheus From 51baf40cf7d074a94b02c57e9d64363725f53e47 Mon Sep 17 00:00:00 2001 From: Arvind Iyengar Date: Wed, 21 Sep 2022 11:17:08 -0700 Subject: [PATCH 12/20] Indicate helmController should be disabled for older versions of k3s / rke2 See https://github.com/rancher/rancher/issues/39724#issuecomment-1331419603 for more information --- docs/design.md | 2 +- docs/gettingstarted.md | 2 +- packages/prometheus-federator/charts/README.md | 2 +- packages/prometheus-federator/charts/questions.yaml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/design.md b/docs/design.md index 8f0ee47e..a8a90fd9 100644 --- a/docs/design.md +++ b/docs/design.md @@ -116,5 +116,5 @@ By default, the `rancher-project-monitoring` (the underlying chart deployed by P |`helmProjectOperator.releaseRoleBindings.clusterRoleRefs.`| ClusterRoles to reference to discover subjects to create RoleBindings for in the Project Release Namespace for all corresponding Project Release Roles. See RBAC above for more information | |`helmProjectOperator.hardenedNamespaces.enabled`| Whether to automatically patch the default ServiceAccount with `automountServiceAccountToken: false` and create a default NetworkPolicy in all managed namespaces in the cluster; the default values ensure that the creation of the namespace does not break a CIS 1.16 hardened scan | |`helmProjectOperator.hardenedNamespaces.configuration`| The configuration to be supplied to the default ServiceAccount or auto-generated NetworkPolicy on managing a namespace | -|`helmProjectOperator.helmController.enabled`| Whether to enable an embedded k3s-io/helm-controller instance within the Helm Project Operator. Should be disabled for RKE2 clusters since RKE2 clusters already run Helm Controller to manage internal Kubernetes components | +|`helmProjectOperator.helmController.enabled`| Whether to enable an embedded k3s-io/helm-controller instance within the Helm Project Operator. Should be disabled for RKE2/K3s clusters before v1.23.14 / v1.24.8 / v1.25.4 since RKE2/K3s clusters already run Helm Controller at a cluster-wide level to manage internal Kubernetes components | |`helmProjectOperator.helmLocker.enabled`| Whether to enable an embedded rancher/helm-locker instance within the Helm Project Operator. | \ No newline at end of file diff --git a/docs/gettingstarted.md b/docs/gettingstarted.md index a28b4c7e..ecd3c8ad 100644 --- a/docs/gettingstarted.md +++ b/docs/gettingstarted.md @@ -53,7 +53,7 @@ kubectl delete crds helmreleases.helm.cattle.io ## Helm Controller CRDs ## -## IMPORTANT NOTE: Do NOT delete if you are running in a k3s/RKE2 cluster since these CRDs are used to also manage internal k8s components +## IMPORTANT NOTE: Do NOT delete if you are running in a RKE2/K3s cluster since these CRDs are used to also manage internal k8s components kubectl delete crds helmcharts.helm.cattle.io kubectl delete crds helmchartconfigs.helm.cattle.io ``` diff --git a/packages/prometheus-federator/charts/README.md b/packages/prometheus-federator/charts/README.md index f9611a68..7da4edfc 100644 --- a/packages/prometheus-federator/charts/README.md +++ b/packages/prometheus-federator/charts/README.md @@ -116,5 +116,5 @@ By default, the `rancher-project-monitoring` (the underlying chart deployed by P |`helmProjectOperator.releaseRoleBindings.clusterRoleRefs.`| ClusterRoles to reference to discover subjects to create RoleBindings for in the Project Release Namespace for all corresponding Project Release Roles. See RBAC above for more information | |`helmProjectOperator.hardenedNamespaces.enabled`| Whether to automatically patch the default ServiceAccount with `automountServiceAccountToken: false` and create a default NetworkPolicy in all managed namespaces in the cluster; the default values ensure that the creation of the namespace does not break a CIS 1.16 hardened scan | |`helmProjectOperator.hardenedNamespaces.configuration`| The configuration to be supplied to the default ServiceAccount or auto-generated NetworkPolicy on managing a namespace | -|`helmProjectOperator.helmController.enabled`| Whether to enable an embedded k3s-io/helm-controller instance within the Helm Project Operator. Should be disabled for RKE2 clusters since RKE2 clusters already run Helm Controller to manage internal Kubernetes components | +|`helmProjectOperator.helmController.enabled`| Whether to enable an embedded k3s-io/helm-controller instance within the Helm Project Operator. Should be disabled for RKE2/K3s clusters before v1.23.14 / v1.24.8 / v1.25.4 since RKE2/K3s clusters already run Helm Controller at a cluster-wide level to manage internal Kubernetes components | |`helmProjectOperator.helmLocker.enabled`| Whether to enable an embedded rancher/helm-locker instance within the Helm Project Operator. | diff --git a/packages/prometheus-federator/charts/questions.yaml b/packages/prometheus-federator/charts/questions.yaml index 6f33c75f..981e1c06 100644 --- a/packages/prometheus-federator/charts/questions.yaml +++ b/packages/prometheus-federator/charts/questions.yaml @@ -1,7 +1,7 @@ questions: - variable: helmProjectOperator.helmController.enabled label: Enable Embedded Helm Controller - description: 'Note: If you are running Prometheus Federator in an RKE2 cluster, this should be disabled.' + description: 'Note: If you are running Prometheus Federator in an RKE2 / K3s cluster before v1.23.14 / v1.24.8 / v1.25.4, this should be disabled.' type: boolean group: Helm Controller - variable: helmProjectOperator.helmLocker.enabled From 803284889d179f16a69cdf0d56f92d24780f776e Mon Sep 17 00:00:00 2001 From: Arvind Iyengar Date: Mon, 28 Nov 2022 16:57:19 -0800 Subject: [PATCH 13/20] make charts --- .../prometheus-federator-0.2.0-rc1.tgz | Bin 0 -> 19198 bytes .../rancher-project-monitoring-0.2.0-rc1.tgz | Bin 0 -> 120536 bytes .../prometheus-federator/0.2.0-rc1/Chart.yaml | 20 + .../prometheus-federator/0.2.0-rc1/README.md | 120 + .../0.2.0-rc1/app-README.md | 10 + .../charts/helmProjectOperator/Chart.yaml | 15 + .../charts/helmProjectOperator/README.md | 77 + .../charts/helmProjectOperator/questions.yaml | 37 + .../helmProjectOperator/templates/NOTES.txt | 3 + .../templates/_helpers.tpl | 66 + .../templates/cleanup.yaml | 70 + .../templates/clusterrole.yaml | 57 + .../templates/configmap.yaml | 14 + .../templates/deployment.yaml | 121 + .../helmProjectOperator/templates/psp.yaml | 68 + .../helmProjectOperator/templates/rbac.yaml | 123 + .../system-namespaces-configmap.yaml | 62 + .../charts/helmProjectOperator/values.yaml | 184 ++ .../0.2.0-rc1/questions.yaml | 37 + .../0.2.0-rc1/templates/NOTES.txt | 3 + .../0.2.0-rc1/templates/_helpers.tpl | 66 + .../0.2.0-rc1/values.yaml | 92 + .../0.2.0-rc1/Chart.yaml | 33 + .../0.2.0-rc1/README.md | 29 + .../0.2.0-rc1/app-README.md | 10 + .../0.2.0-rc1/charts/grafana/.helmignore | 23 + .../0.2.0-rc1/charts/grafana/Chart.yaml | 29 + .../0.2.0-rc1/charts/grafana/README.md | 571 ++++ .../grafana/dashboards/custom-dashboard.json | 1 + .../charts/grafana/templates/NOTES.txt | 54 + .../charts/grafana/templates/_helpers.tpl | 203 ++ .../charts/grafana/templates/_pod.tpl | 885 ++++++ .../charts/grafana/templates/clusterrole.yaml | 25 + .../grafana/templates/clusterrolebinding.yaml | 24 + .../configmap-dashboard-provider.yaml | 29 + .../charts/grafana/templates/configmap.yaml | 117 + .../templates/dashboards-json-configmap.yaml | 35 + .../charts/grafana/templates/deployment.yaml | 50 + .../grafana/templates/headless-service.yaml | 22 + .../charts/grafana/templates/hpa.yaml | 21 + .../templates/image-renderer-deployment.yaml | 123 + .../image-renderer-network-policy.yaml | 73 + .../templates/image-renderer-service.yaml | 33 + .../charts/grafana/templates/ingress.yaml | 78 + .../grafana/templates/networkpolicy.yaml | 52 + .../grafana/templates/nginx-config.yaml | 94 + .../templates/poddisruptionbudget.yaml | 22 + .../grafana/templates/podsecuritypolicy.yaml | 47 + .../charts/grafana/templates/pvc.yaml | 35 + .../charts/grafana/templates/role.yaml | 32 + .../charts/grafana/templates/rolebinding.yaml | 25 + .../charts/grafana/templates/secret-env.yaml | 14 + .../charts/grafana/templates/secret.yaml | 26 + .../charts/grafana/templates/service.yaml | 55 + .../grafana/templates/serviceaccount.yaml | 14 + .../grafana/templates/servicemonitor.yaml | 44 + .../charts/grafana/templates/statefulset.yaml | 56 + .../templates/tests/test-configmap.yaml | 17 + .../tests/test-podsecuritypolicy.yaml | 29 + .../grafana/templates/tests/test-role.yaml | 14 + .../templates/tests/test-rolebinding.yaml | 17 + .../templates/tests/test-serviceaccount.yaml | 9 + .../charts/grafana/templates/tests/test.yaml | 51 + .../0.2.0-rc1/charts/grafana/values.yaml | 1061 +++++++ .../federate/federate-scrape-config.yaml | 13 + .../rancher/pods/rancher-pod-containers.json | 636 ++++ .../files/rancher/pods/rancher-pod.json | 636 ++++ .../workloads/rancher-workload-pods.json | 652 ++++ .../rancher/workloads/rancher-workload.json | 652 ++++ .../0.2.0-rc1/questions.yaml | 34 + .../0.2.0-rc1/templates/NOTES.txt | 4 + .../0.2.0-rc1/templates/_helpers.tpl | 233 ++ .../templates/alertmanager/alertmanager.yaml | 165 + .../templates/alertmanager/extrasecret.yaml | 20 + .../templates/alertmanager/ingress.yaml | 77 + .../alertmanager/podDisruptionBudget.yaml | 21 + .../templates/alertmanager/psp-role.yaml | 21 + .../alertmanager/psp-rolebinding.yaml | 18 + .../0.2.0-rc1/templates/alertmanager/psp.yaml | 46 + .../templates/alertmanager/secret.yaml | 33 + .../templates/alertmanager/service.yaml | 53 + .../alertmanager/serviceaccount.yaml | 20 + .../alertmanager/servicemonitor.yaml | 45 + .../0.2.0-rc1/templates/dashboard-roles.yaml | 141 + .../templates/dashboard-values-configmap.yaml | 57 + .../dashboards/rancher/pods-dashboards.yaml | 17 + .../rancher/workload-dashboards.yaml | 17 + .../grafana/configmap-dashboards.yaml | 24 + .../grafana/configmaps-datasources.yaml | 46 + .../alertmanager-overview.yaml | 616 ++++ .../dashboards-1.14/cluster-total.yaml | 1646 ++++++++++ .../dashboards-1.14/grafana-overview.yaml | 635 ++++ .../k8s-resources-namespace.yaml | 2770 +++++++++++++++++ .../dashboards-1.14/k8s-resources-node.yaml | 963 ++++++ .../dashboards-1.14/k8s-resources-pod.yaml | 2442 +++++++++++++++ .../k8s-resources-project.yaml | 2480 +++++++++++++++ .../k8s-resources-workload.yaml | 1997 ++++++++++++ .../k8s-resources-workloads-namespace.yaml | 2162 +++++++++++++ .../dashboards-1.14/namespace-by-pod.yaml | 1438 +++++++++ .../namespace-by-workload.yaml | 1710 ++++++++++ .../persistentvolumesusage.yaml | 561 ++++ .../grafana/dashboards-1.14/pod-total.yaml | 1202 +++++++ .../grafana/dashboards-1.14/prometheus.yaml | 1235 ++++++++ .../dashboards-1.14/workload-total.yaml | 1412 +++++++++ .../0.2.0-rc1/templates/hardened.yaml | 121 + .../0.2.0-rc1/templates/prometheus/_rules.tpl | 8 + .../templates/prometheus/clusterrole.yaml | 25 + .../prometheus/clusterrolebinding.yaml | 18 + .../templates/prometheus/extrasecret.yaml | 20 + .../templates/prometheus/federate.yaml | 10 + .../templates/prometheus/ingress.yaml | 77 + .../templates/prometheus/nginx-config.yaml | 68 + .../prometheus/podDisruptionBudget.yaml | 21 + .../templates/prometheus/prometheus.yaml | 310 ++ .../templates/prometheus/psp-clusterrole.yaml | 20 + .../prometheus/psp-clusterrolebinding.yaml | 18 + .../0.2.0-rc1/templates/prometheus/psp.yaml | 52 + .../rules-1.14/alertmanager.rules.yaml | 217 ++ .../prometheus/rules-1.14/general.rules.yaml | 98 + .../rules-1.14/kubernetes-apps.yaml | 375 +++ .../rules-1.14/kubernetes-storage.yaml | 160 + .../prometheus/rules-1.14/prometheus.yaml | 448 +++ .../templates/prometheus/service.yaml | 56 + .../templates/prometheus/serviceaccount.yaml | 20 + .../templates/prometheus/servicemonitor.yaml | 42 + .../templates/validate-install-crd.yaml | 21 + .../0.2.0-rc1/values.yaml | 1521 +++++++++ index.yaml | 61 + 128 files changed, 36164 insertions(+) create mode 100644 assets/prometheus-federator/prometheus-federator-0.2.0-rc1.tgz create mode 100644 assets/rancher-project-monitoring/rancher-project-monitoring-0.2.0-rc1.tgz create mode 100644 charts/prometheus-federator/0.2.0-rc1/Chart.yaml create mode 100644 charts/prometheus-federator/0.2.0-rc1/README.md create mode 100644 charts/prometheus-federator/0.2.0-rc1/app-README.md create mode 100644 charts/prometheus-federator/0.2.0-rc1/charts/helmProjectOperator/Chart.yaml create mode 100644 charts/prometheus-federator/0.2.0-rc1/charts/helmProjectOperator/README.md create mode 100644 charts/prometheus-federator/0.2.0-rc1/charts/helmProjectOperator/questions.yaml create mode 100644 charts/prometheus-federator/0.2.0-rc1/charts/helmProjectOperator/templates/NOTES.txt create mode 100644 charts/prometheus-federator/0.2.0-rc1/charts/helmProjectOperator/templates/_helpers.tpl create mode 100644 charts/prometheus-federator/0.2.0-rc1/charts/helmProjectOperator/templates/cleanup.yaml create mode 100644 charts/prometheus-federator/0.2.0-rc1/charts/helmProjectOperator/templates/clusterrole.yaml create mode 100644 charts/prometheus-federator/0.2.0-rc1/charts/helmProjectOperator/templates/configmap.yaml create mode 100644 charts/prometheus-federator/0.2.0-rc1/charts/helmProjectOperator/templates/deployment.yaml create mode 100644 charts/prometheus-federator/0.2.0-rc1/charts/helmProjectOperator/templates/psp.yaml create mode 100644 charts/prometheus-federator/0.2.0-rc1/charts/helmProjectOperator/templates/rbac.yaml create mode 100644 charts/prometheus-federator/0.2.0-rc1/charts/helmProjectOperator/templates/system-namespaces-configmap.yaml create mode 100644 charts/prometheus-federator/0.2.0-rc1/charts/helmProjectOperator/values.yaml create mode 100644 charts/prometheus-federator/0.2.0-rc1/questions.yaml create mode 100644 charts/prometheus-federator/0.2.0-rc1/templates/NOTES.txt create mode 100644 charts/prometheus-federator/0.2.0-rc1/templates/_helpers.tpl create mode 100644 charts/prometheus-federator/0.2.0-rc1/values.yaml create mode 100644 charts/rancher-project-monitoring/0.2.0-rc1/Chart.yaml create mode 100644 charts/rancher-project-monitoring/0.2.0-rc1/README.md create mode 100644 charts/rancher-project-monitoring/0.2.0-rc1/app-README.md create mode 100644 charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/.helmignore create mode 100644 charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/Chart.yaml create mode 100644 charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/README.md create mode 100644 charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/dashboards/custom-dashboard.json create mode 100644 charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/NOTES.txt create mode 100644 charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/_helpers.tpl create mode 100644 charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/_pod.tpl create mode 100644 charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/clusterrole.yaml create mode 100644 charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/clusterrolebinding.yaml create mode 100644 charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/configmap-dashboard-provider.yaml create mode 100644 charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/configmap.yaml create mode 100644 charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/dashboards-json-configmap.yaml create mode 100644 charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/deployment.yaml create mode 100644 charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/headless-service.yaml create mode 100644 charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/hpa.yaml create mode 100644 charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/image-renderer-deployment.yaml create mode 100644 charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/image-renderer-network-policy.yaml create mode 100644 charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/image-renderer-service.yaml create mode 100644 charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/ingress.yaml create mode 100644 charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/networkpolicy.yaml create mode 100644 charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/nginx-config.yaml create mode 100644 charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/poddisruptionbudget.yaml create mode 100644 charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/podsecuritypolicy.yaml create mode 100644 charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/pvc.yaml create mode 100644 charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/role.yaml create mode 100644 charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/rolebinding.yaml create mode 100644 charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/secret-env.yaml create mode 100644 charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/secret.yaml create mode 100644 charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/service.yaml create mode 100644 charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/serviceaccount.yaml create mode 100644 charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/servicemonitor.yaml create mode 100644 charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/statefulset.yaml create mode 100644 charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/tests/test-configmap.yaml create mode 100644 charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/tests/test-podsecuritypolicy.yaml create mode 100644 charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/tests/test-role.yaml create mode 100644 charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/tests/test-rolebinding.yaml create mode 100644 charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/tests/test-serviceaccount.yaml create mode 100644 charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/tests/test.yaml create mode 100644 charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/values.yaml create mode 100644 charts/rancher-project-monitoring/0.2.0-rc1/files/federate/federate-scrape-config.yaml create mode 100644 charts/rancher-project-monitoring/0.2.0-rc1/files/rancher/pods/rancher-pod-containers.json create mode 100644 charts/rancher-project-monitoring/0.2.0-rc1/files/rancher/pods/rancher-pod.json create mode 100644 charts/rancher-project-monitoring/0.2.0-rc1/files/rancher/workloads/rancher-workload-pods.json create mode 100644 charts/rancher-project-monitoring/0.2.0-rc1/files/rancher/workloads/rancher-workload.json create mode 100644 charts/rancher-project-monitoring/0.2.0-rc1/questions.yaml create mode 100644 charts/rancher-project-monitoring/0.2.0-rc1/templates/NOTES.txt create mode 100644 charts/rancher-project-monitoring/0.2.0-rc1/templates/_helpers.tpl create mode 100644 charts/rancher-project-monitoring/0.2.0-rc1/templates/alertmanager/alertmanager.yaml create mode 100644 charts/rancher-project-monitoring/0.2.0-rc1/templates/alertmanager/extrasecret.yaml create mode 100644 charts/rancher-project-monitoring/0.2.0-rc1/templates/alertmanager/ingress.yaml create mode 100644 charts/rancher-project-monitoring/0.2.0-rc1/templates/alertmanager/podDisruptionBudget.yaml create mode 100644 charts/rancher-project-monitoring/0.2.0-rc1/templates/alertmanager/psp-role.yaml create mode 100644 charts/rancher-project-monitoring/0.2.0-rc1/templates/alertmanager/psp-rolebinding.yaml create mode 100644 charts/rancher-project-monitoring/0.2.0-rc1/templates/alertmanager/psp.yaml create mode 100644 charts/rancher-project-monitoring/0.2.0-rc1/templates/alertmanager/secret.yaml create mode 100644 charts/rancher-project-monitoring/0.2.0-rc1/templates/alertmanager/service.yaml create mode 100644 charts/rancher-project-monitoring/0.2.0-rc1/templates/alertmanager/serviceaccount.yaml create mode 100644 charts/rancher-project-monitoring/0.2.0-rc1/templates/alertmanager/servicemonitor.yaml create mode 100644 charts/rancher-project-monitoring/0.2.0-rc1/templates/dashboard-roles.yaml create mode 100644 charts/rancher-project-monitoring/0.2.0-rc1/templates/dashboard-values-configmap.yaml create mode 100644 charts/rancher-project-monitoring/0.2.0-rc1/templates/dashboards/rancher/pods-dashboards.yaml create mode 100644 charts/rancher-project-monitoring/0.2.0-rc1/templates/dashboards/rancher/workload-dashboards.yaml create mode 100644 charts/rancher-project-monitoring/0.2.0-rc1/templates/grafana/configmap-dashboards.yaml create mode 100644 charts/rancher-project-monitoring/0.2.0-rc1/templates/grafana/configmaps-datasources.yaml create mode 100644 charts/rancher-project-monitoring/0.2.0-rc1/templates/grafana/dashboards-1.14/alertmanager-overview.yaml create mode 100644 charts/rancher-project-monitoring/0.2.0-rc1/templates/grafana/dashboards-1.14/cluster-total.yaml create mode 100644 charts/rancher-project-monitoring/0.2.0-rc1/templates/grafana/dashboards-1.14/grafana-overview.yaml create mode 100644 charts/rancher-project-monitoring/0.2.0-rc1/templates/grafana/dashboards-1.14/k8s-resources-namespace.yaml create mode 100644 charts/rancher-project-monitoring/0.2.0-rc1/templates/grafana/dashboards-1.14/k8s-resources-node.yaml create mode 100644 charts/rancher-project-monitoring/0.2.0-rc1/templates/grafana/dashboards-1.14/k8s-resources-pod.yaml create mode 100644 charts/rancher-project-monitoring/0.2.0-rc1/templates/grafana/dashboards-1.14/k8s-resources-project.yaml create mode 100644 charts/rancher-project-monitoring/0.2.0-rc1/templates/grafana/dashboards-1.14/k8s-resources-workload.yaml create mode 100644 charts/rancher-project-monitoring/0.2.0-rc1/templates/grafana/dashboards-1.14/k8s-resources-workloads-namespace.yaml create mode 100644 charts/rancher-project-monitoring/0.2.0-rc1/templates/grafana/dashboards-1.14/namespace-by-pod.yaml create mode 100644 charts/rancher-project-monitoring/0.2.0-rc1/templates/grafana/dashboards-1.14/namespace-by-workload.yaml create mode 100644 charts/rancher-project-monitoring/0.2.0-rc1/templates/grafana/dashboards-1.14/persistentvolumesusage.yaml create mode 100644 charts/rancher-project-monitoring/0.2.0-rc1/templates/grafana/dashboards-1.14/pod-total.yaml create mode 100644 charts/rancher-project-monitoring/0.2.0-rc1/templates/grafana/dashboards-1.14/prometheus.yaml create mode 100644 charts/rancher-project-monitoring/0.2.0-rc1/templates/grafana/dashboards-1.14/workload-total.yaml create mode 100644 charts/rancher-project-monitoring/0.2.0-rc1/templates/hardened.yaml create mode 100644 charts/rancher-project-monitoring/0.2.0-rc1/templates/prometheus/_rules.tpl create mode 100644 charts/rancher-project-monitoring/0.2.0-rc1/templates/prometheus/clusterrole.yaml create mode 100644 charts/rancher-project-monitoring/0.2.0-rc1/templates/prometheus/clusterrolebinding.yaml create mode 100644 charts/rancher-project-monitoring/0.2.0-rc1/templates/prometheus/extrasecret.yaml create mode 100644 charts/rancher-project-monitoring/0.2.0-rc1/templates/prometheus/federate.yaml create mode 100644 charts/rancher-project-monitoring/0.2.0-rc1/templates/prometheus/ingress.yaml create mode 100644 charts/rancher-project-monitoring/0.2.0-rc1/templates/prometheus/nginx-config.yaml create mode 100644 charts/rancher-project-monitoring/0.2.0-rc1/templates/prometheus/podDisruptionBudget.yaml create mode 100644 charts/rancher-project-monitoring/0.2.0-rc1/templates/prometheus/prometheus.yaml create mode 100644 charts/rancher-project-monitoring/0.2.0-rc1/templates/prometheus/psp-clusterrole.yaml create mode 100644 charts/rancher-project-monitoring/0.2.0-rc1/templates/prometheus/psp-clusterrolebinding.yaml create mode 100644 charts/rancher-project-monitoring/0.2.0-rc1/templates/prometheus/psp.yaml create mode 100644 charts/rancher-project-monitoring/0.2.0-rc1/templates/prometheus/rules-1.14/alertmanager.rules.yaml create mode 100644 charts/rancher-project-monitoring/0.2.0-rc1/templates/prometheus/rules-1.14/general.rules.yaml create mode 100644 charts/rancher-project-monitoring/0.2.0-rc1/templates/prometheus/rules-1.14/kubernetes-apps.yaml create mode 100644 charts/rancher-project-monitoring/0.2.0-rc1/templates/prometheus/rules-1.14/kubernetes-storage.yaml create mode 100644 charts/rancher-project-monitoring/0.2.0-rc1/templates/prometheus/rules-1.14/prometheus.yaml create mode 100644 charts/rancher-project-monitoring/0.2.0-rc1/templates/prometheus/service.yaml create mode 100644 charts/rancher-project-monitoring/0.2.0-rc1/templates/prometheus/serviceaccount.yaml create mode 100644 charts/rancher-project-monitoring/0.2.0-rc1/templates/prometheus/servicemonitor.yaml create mode 100644 charts/rancher-project-monitoring/0.2.0-rc1/templates/validate-install-crd.yaml create mode 100644 charts/rancher-project-monitoring/0.2.0-rc1/values.yaml diff --git a/assets/prometheus-federator/prometheus-federator-0.2.0-rc1.tgz b/assets/prometheus-federator/prometheus-federator-0.2.0-rc1.tgz new file mode 100644 index 0000000000000000000000000000000000000000..805d5601bf6b502009dfccfa0d191682f72a06cf GIT binary patch literal 19198 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 GWB~xol8iC{ literal 0 HcmV?d00001 diff --git a/assets/rancher-project-monitoring/rancher-project-monitoring-0.2.0-rc1.tgz b/assets/rancher-project-monitoring/rancher-project-monitoring-0.2.0-rc1.tgz new file mode 100644 index 0000000000000000000000000000000000000000..a3c88271b6c60a4a81108b5857ce32df86e7048a GIT binary patch literal 120536 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
    vT_)xe%S$uANU_5h!d3Z)Cb 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
    (0)JEGVy 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 a&%^WZJUn0G`Tqd`0RR62&=*ifPX literal 0 HcmV?d00001 diff --git a/charts/prometheus-federator/0.2.0-rc1/Chart.yaml b/charts/prometheus-federator/0.2.0-rc1/Chart.yaml new file mode 100644 index 00000000..038902e8 --- /dev/null +++ b/charts/prometheus-federator/0.2.0-rc1/Chart.yaml @@ -0,0 +1,20 @@ +annotations: + catalog.cattle.io/certified: rancher + catalog.cattle.io/display-name: Prometheus Federator + catalog.cattle.io/kube-version: '>=1.16.0-0' + catalog.cattle.io/namespace: cattle-monitoring-system + catalog.cattle.io/os: linux,windows + catalog.cattle.io/permits-os: linux,windows + catalog.cattle.io/provides-gvr: helm.cattle.io.projecthelmchart/v1alpha1 + catalog.cattle.io/rancher-version: '>= 2.6.5-0 <= 2.6.100-0' + catalog.cattle.io/release-name: prometheus-federator +apiVersion: v2 +appVersion: 0.2.0-rc1 +dependencies: +- condition: helmProjectOperator.enabled + name: helmProjectOperator + repository: file://./charts/helmProjectOperator +description: Prometheus Federator +icon: https://raw.githubusercontent.com/rancher/prometheus-federator/main/assets/logos/prometheus-federator.svg +name: prometheus-federator +version: 0.2.0-rc1 diff --git a/charts/prometheus-federator/0.2.0-rc1/README.md b/charts/prometheus-federator/0.2.0-rc1/README.md new file mode 100644 index 00000000..7da4edfc --- /dev/null +++ b/charts/prometheus-federator/0.2.0-rc1/README.md @@ -0,0 +1,120 @@ +# Prometheus Federator + +This chart is deploys a Helm Project Operator (based on the [rancher/helm-project-operator](https://github.com/rancher/helm-project-operator)), an operator that manages deploying Helm charts each containing a Project Monitoring Stack, where each stack contains: +- [Prometheus](https://prometheus.io/) (managed externally by [Prometheus Operator](https://github.com/prometheus-operator/prometheus-operator)) +- [Alertmanager](https://prometheus.io/docs/alerting/latest/alertmanager/) (managed externally by [Prometheus Operator](https://github.com/prometheus-operator/prometheus-operator)) +- [Grafana](https://github.com/helm/charts/tree/master/stable/grafana) (deployed via an embedded Helm chart) +- Default PrometheusRules and Grafana dashboards based on the collection of community-curated resources from [kube-prometheus](https://github.com/prometheus-operator/kube-prometheus/) +- Default ServiceMonitors that watch the deployed resources + +> **Important Note: Prometheus Federator is designed to be deployed alongside an existing Prometheus Operator deployment in a cluster that has already installed the Prometheus Operator CRDs.** + +By default, the chart is configured and intended to be deployed alongside [rancher-monitoring](https://rancher.com/docs/rancher/v2.6/en/monitoring-alerting/), which deploys Prometheus Operator alongside a Cluster Prometheus that each Project Monitoring Stack is configured to federate namespace-scoped metrics from by default. + +## Pre-Installation: Using Prometheus Federator with Rancher and rancher-monitoring + +If you are running your cluster on [Rancher](https://rancher.com/) and already have [rancher-monitoring](https://rancher.com/docs/rancher/v2.6/en/monitoring-alerting/) deployed onto your cluster, Prometheus Federator's default configuration should already be configured to work with your existing Cluster Monitoring Stack; however, here are some notes on how we recommend you configure rancher-monitoring to optimize the security and usability of Prometheus Federator in your cluster: + +### Ensure the cattle-monitoring-system namespace is placed into the System Project (or a similarly locked down Project that has access to other Projects in the cluster) + +Prometheus Operator's security model expects that the namespace it is deployed into (`cattle-monitoring-system`) has limited access for anyone except Cluster Admins to avoid privilege escalation via execing into Pods (such as the Jobs executing Helm operations). In addition, deploying Prometheus Federator and all Project Prometheus stacks into the System Project ensures that the each Project Prometheus is able to reach out to scrape workloads across all Projects (even if Network Policies are defined via Project Network Isolation) but has limited access for Project Owners, Project Members, and other users to be able to access data they shouldn't have access to (i.e. being allowed to exec into pods, set up the ability to scrape namespaces outside of a given Project, etc.). + +### Configure rancher-monitoring to only watch for resources created by the Helm chart itself + +Since each Project Monitoring Stack will watch the other namespaces and collect additional custom workload metrics or dashboards already, it's recommended to configure the following settings on all selectors to ensure that the Cluster Prometheus Stack only monitors resources created by the Helm Chart itself: + +``` +matchLabels: + release: "rancher-monitoring" +``` + +The following selector fields are recommended to have this value: +- `.Values.alertmanager.alertmanagerSpec.alertmanagerConfigSelector` +- `.Values.prometheus.prometheusSpec.serviceMonitorSelector` +- `.Values.prometheus.prometheusSpec.podMonitorSelector` +- `.Values.prometheus.prometheusSpec.ruleSelector` +- `.Values.prometheus.prometheusSpec.probeSelector` + +Once this setting is turned on, you can always create ServiceMonitors or PodMonitors that are picked up by the Cluster Prometheus by adding the label `release: "rancher-monitoring"` to them (in which case they will be ignored by Project Monitoring Stacks automatically by default, even if the namespace in which those ServiceMonitors or PodMonitors reside in are not system namespaces). + +> Note: If you don't want to allow users to be able to create ServiceMonitors and PodMonitors that aggregate into the Cluster Prometheus in Project namespaces, you can additionally set the namespaceSelectors on the chart to only target system namespaces (which must contain `cattle-monitoring-system` and `cattle-dashboards`, where resources are deployed into by default by rancher-monitoring; you will also need to monitor the `default` namespace to get apiserver metrics or create a custom ServiceMonitor to scrape apiserver metrics from the Service residing in the default namespace) to limit your Cluster Prometheus from picking up other Prometheus Operator CRs; in that case, it would be recommended to turn `.Values.prometheus.prometheusSpec.ignoreNamespaceSelectors=true` to allow you to define ServiceMonitors that can monitor non-system namespaces from within a system namespace. + +In addition, if you modified the default `.Values.grafana.sidecar.*.searchNamespace` values on the Grafana Helm subchart for Monitoring V2, it is also recommended to remove the overrides or ensure that your defaults are scoped to only system namespaces for the following values: +- `.Values.grafana.sidecar.dashboards.searchNamespace` (default `cattle-dashboards`) +- `.Values.grafana.sidecar.datasources.searchNamespace` (default `null`, which means it uses the release namespace `cattle-monitoring-system`) +- `.Values.grafana.sidecar.plugins.searchNamespace` (default `null`, which means it uses the release namespace `cattle-monitoring-system`) +- `.Values.grafana.sidecar.notifiers.searchNamespace` (default `null`, which means it uses the release namespace `cattle-monitoring-system`) + +### Increase the CPU / memory limits of the Cluster Prometheus + +Depending on a cluster's setup, it's generally recommended to give a large amount of dedicated memory to the Cluster Prometheus to avoid restarts due to out-of-memory errors (OOMKilled), usually caused by churn created in the cluster that causes a large number of high cardinality metrics to be generated and ingested by Prometheus within one block of time; this is one of the reasons why the default Rancher Monitoring stack expects around 4GB of RAM to be able to operate in a normal-sized cluster. However, when introducing Project Monitoring Stacks that are all sending `/federate` requests to the same Cluster Prometheus and are reliant on the Cluster Prometheus being "up" to federate that system data on their namespaces, it's even more important that the Cluster Prometheus has an ample amount of CPU / memory assigned to it to prevent an outage that can cause data gaps across all Project Prometheis in the cluster. + +> Note: There are no specific recommendations on how much memory the Cluster Prometheus should be configured with since it depends entirely on the user's setup (namely the likelihood of encountering a high churn rate and the scale of metrics that could be generated at that time); it generally varies per setup. + +## How does the operator work? + +1. On deploying this chart, users can create ProjectHelmCharts CRs with `spec.helmApiVersion` set to `monitoring.cattle.io/v1alpha1` (also known as "Project Monitors" in the Rancher UI) in a **Project Registration Namespace (`cattle-project-`)**. +2. On seeing each ProjectHelmChartCR, the operator will automatically deploy a Project Prometheus stack on the Project Owner's behalf in the **Project Release Namespace (`cattle-project--monitoring`)** based on a HelmChart CR and a HelmRelease CR automatically created by the ProjectHelmChart controller in the **Operator / System Namespace**. +3. RBAC will automatically be assigned in the Project Release Namespace to allow users to view the Prometheus, Alertmanager, and Grafana UIs of the Project Monitoring Stack deployed; this will be based on RBAC defined on the Project Registration Namespace against the [default Kubernetes user-facing roles](https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles) (see below for more information about configuring RBAC). + +### What is a Project? + +In Prometheus Federator, a Project is a group of namespaces that can be identified by a `metav1.LabelSelector`; by default, the label used to identify projects is `field.cattle.io/projectId`, the label used to identify namespaces that are contained within a given [Rancher](https://rancher.com/) Project. + +### Configuring the Helm release created by a ProjectHelmChart + +The `spec.values` of this ProjectHelmChart resources will correspond to the `values.yaml` override to be supplied to the underlying Helm chart deployed by the operator on the user's behalf; to see the underlying chart's `values.yaml` spec, either: +- View to the chart's definition located at [`rancher/prometheus-federator` under `charts/rancher-project-monitoring`](https://github.com/rancher/prometheus-federator/blob/main/charts/rancher-project-monitoring) (where the chart version will be tied to the version of this operator) +- Look for the ConfigMap named `monitoring.cattle.io.v1alpha1` that is automatically created in each Project Registration Namespace, which will contain both the `values.yaml` and `questions.yaml` that was used to configure the chart (which was embedded directly into the `prometheus-federator` binary). + +### Namespaces + +As a Project Operator based on [rancher/helm-project-operator](https://github.com/rancher/helm-project-operator), Prometheus Federator has three different classifications of namespaces that the operator looks out for: +1. **Operator / System Namespace**: this is the namespace that the operator is deployed into (e.g. `cattle-monitoring-system`). This namespace will contain all HelmCharts and HelmReleases for all ProjectHelmCharts watched by this operator. **Only Cluster Admins should have access to this namespace.** +2. **Project Registration Namespace (`cattle-project-`)**: this is the set of namespaces that the operator watches for ProjectHelmCharts within. The RoleBindings and ClusterRoleBindings that apply to this namespace will also be the source of truth for the auto-assigned RBAC created in the Project Release Namespace (see more details below). **Project Owners (admin), Project Members (edit), and Read-Only Members (view) should have access to this namespace**. +> Note: Project Registration Namespaces will be auto-generated by the operator and imported into the Project it is tied to if `.Values.global.cattle.projectLabel` is provided (which is set to `field.cattle.io/projectId` by default); this indicates that a Project Registration Namespace should be created by the operator if at least one namespace is observed with that label. The operator will not let these namespaces be deleted unless either all namespaces with that label are gone (e.g. this is the last namespace in that project, in which case the namespace will be marked with the label `"helm.cattle.io/helm-project-operator-orphaned": "true"`, which signals that it can be deleted) or it is no longer watching that project (because the project ID was provided under `.Values.helmProjectOperator.otherSystemProjectLabelValues`, which serves as a denylist for Projects). These namespaces will also never be auto-deleted to avoid destroying user data; it is recommended that users clean up these namespaces manually if desired on creating or deleting a project +> Note: if `.Values.global.cattle.projectLabel` is not provided, the Operator / System Namespace will also be the Project Registration Namespace +3. **Project Release Namespace (`cattle-project--monitoring`)**: this is the set of namespaces that the operator deploys Project Monitoring Stacks within on behalf of a ProjectHelmChart; the operator will also automatically assign RBAC to Roles created in this namespace by the Project Monitoring Stack based on bindings found in the Project Registration Namespace. **Only Cluster Admins should have access to this namespace; Project Owners (admin), Project Members (edit), and Read-Only Members (view) will be assigned limited access to this namespace by the deployed Helm Chart and Prometheus Federator.** +> Note: Project Release Namespaces are automatically deployed and imported into the project whose ID is specified under `.Values.helmProjectOperator.projectReleaseNamespaces.labelValue` (which defaults to the value of `.Values.global.cattle.systemProjectId` if not specified) whenever a ProjectHelmChart is specified in a Project Registration Namespace +> Note: Project Release Namespaces follow the same orphaning conventions as Project Registration Namespaces (see note above) +> Note: if `.Values.projectReleaseNamespaces.enabled` is false, the Project Release Namespace will be the same as the Project Registration Namespace + +### Helm Resources (HelmChart, HelmRelease) + +On deploying a ProjectHelmChart, the Prometheus Federator will automatically create and manage two child custom resources that manage the underlying Helm resources in turn: +- A HelmChart CR (managed via an embedded [k3s-io/helm-contoller](https://github.com/k3s-io/helm-controller) in the operator): this custom resource automatically creates a Job in the same namespace that triggers a `helm install`, `helm upgrade`, or `helm uninstall` depending on the change applied to the HelmChart CR; this CR is automatically updated on changes to the ProjectHelmChart (e.g. modifying the values.yaml) or changes to the underlying Project definition (e.g. adding or removing namespaces from a project). +> **Important Note: If a ProjectHelmChart is not deploying or updating the underlying Project Monitoring Stack for some reason, the Job created by this resource in the Operator / System namespace should be the first place you check to see if there's something wrong with the Helm operation; however, this is generally only accessible by a Cluster Admin.** +- A HelmRelease CR (managed via an embedded [rancher/helm-locker](https://github.com/rancher/helm-locker) in the operator): this custom resource automatically locks a deployed Helm release in place and automatically overwrites updates to underlying resources unless the change happens via a Helm operation (`helm install`, `helm upgrade`, or `helm uninstall` performed by the HelmChart CR). +> Note: HelmRelease CRs emit Kubernetes Events that detect when an underlying Helm release is being modified and locks it back to place; to view these events, you can use `kubectl describe helmrelease -n `; you can also view the logs on this operator to see when changes are detected and which resources were attempted to be modified + +Both of these resources are created for all Helm charts in the Operator / System namespaces to avoid escalation of privileges to underprivileged users. + +### RBAC + +As described in the section on namespaces above, Prometheus Federator expects that Project Owners, Project Members, and other users in the cluster with Project-level permissions (e.g. permissions in a certain set of namespaces identified by a single label selector) have minimal permissions in any namespaces except the Project Registration Namespace (which is imported into the project by default) and those that already comprise their projects. Therefore, in order to allow Project Owners to assign specific chart permissions to other users in their Project namespaces, the Helm Project Operator will automatically watch the following bindings: +- ClusterRoleBindings +- RoleBindings in the Project Release Namespace + +On observing a change to one of those types of bindings, the Helm Project Operator will check whether the `roleRef` that the the binding points to matches a ClusterRole with the name provided under `helmProjectOperator.releaseRoleBindings.clusterRoleRefs.admin`, `helmProjectOperator.releaseRoleBindings.clusterRoleRefs.edit`, or `helmProjectOperator.releaseRoleBindings.clusterRoleRefs.view`; by default, these roleRefs correspond will correspond to `admin`, `edit`, and `view` respectively, which are the [default Kubernetes user-facing roles](https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles). + +> Note: for Rancher RBAC users, these [default Kubernetes user-facing roles](https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles) directly correlate to the `Project Owner`, `Project Member`, and `Read-Only` default Project Role Templates. + +If the `roleRef` matches, the Helm Project Operator will filter the `subjects` of the binding for all Users and Groups and use that to automatically construct a RoleBinding for each Role in the Project Release Namespace with the same name as the role and the following labels: +- `helm.cattle.io/project-helm-chart-role: {{ .Release.Name }}` +- `helm.cattle.io/project-helm-chart-role-aggregate-from: ` + +By default, the `rancher-project-monitoring` (the underlying chart deployed by Prometheus Federator) creates three default Roles per Project Release Namespace that provide `admin`, `edit`, and `view` users to permissions to view the Prometheus, Alertmanager, and Grafana UIs of the Project Monitoring Stack to provide least privilege; however, if a Cluster Admin would like to assign additional permissions to certain users, they can either directly assign RoleBindings in the Project Release Namespace to certain users or created Roles with the above two labels on them to allow Project Owners to control assigning those RBAC roles to users in their Project Registration namespaces. + +### Advanced Helm Project Operator Configuration + +|Value|Configuration| +|---|---------------------------| +|`helmProjectOperator.valuesOverride`| Allows an Operator to override values that are set on each ProjectHelmChart deployment on an operator-level; user-provided options (specified on the `spec.values` of the ProjectHelmChart) are automatically overridden if operator-level values are provided. For an exmaple, see how the default value overrides `federate.targets` (note: when overriding list values like `federate.targets`, user-provided list values will **not** be concatenated) | +|`helmProjectOperator.projectReleaseNamespaces.labelValues`| The value of the Project that all Project Release Namespaces should be auto-imported into (via label and annotation). Not recommended to be overridden on a Rancher setup. | +|`helmProjectOperator.otherSystemProjectLabelValues`| Other namespaces that the operator should treat as a system namespace that should not be monitored. By default, all namespaces that match `global.cattle.systemProjectId` will not be matched. `cattle-monitoring-system`, `cattle-dashboards`, and `kube-system` are explicitly marked as system namespaces as well, regardless of label or annotation. | +|`helmProjectOperator.releaseRoleBindings.aggregate`| Whether to automatically create RBAC resources in Project Release namespaces +|`helmProjectOperator.releaseRoleBindings.clusterRoleRefs.`| ClusterRoles to reference to discover subjects to create RoleBindings for in the Project Release Namespace for all corresponding Project Release Roles. See RBAC above for more information | +|`helmProjectOperator.hardenedNamespaces.enabled`| Whether to automatically patch the default ServiceAccount with `automountServiceAccountToken: false` and create a default NetworkPolicy in all managed namespaces in the cluster; the default values ensure that the creation of the namespace does not break a CIS 1.16 hardened scan | +|`helmProjectOperator.hardenedNamespaces.configuration`| The configuration to be supplied to the default ServiceAccount or auto-generated NetworkPolicy on managing a namespace | +|`helmProjectOperator.helmController.enabled`| Whether to enable an embedded k3s-io/helm-controller instance within the Helm Project Operator. Should be disabled for RKE2/K3s clusters before v1.23.14 / v1.24.8 / v1.25.4 since RKE2/K3s clusters already run Helm Controller at a cluster-wide level to manage internal Kubernetes components | +|`helmProjectOperator.helmLocker.enabled`| Whether to enable an embedded rancher/helm-locker instance within the Helm Project Operator. | diff --git a/charts/prometheus-federator/0.2.0-rc1/app-README.md b/charts/prometheus-federator/0.2.0-rc1/app-README.md new file mode 100644 index 00000000..8554713d --- /dev/null +++ b/charts/prometheus-federator/0.2.0-rc1/app-README.md @@ -0,0 +1,10 @@ +# Prometheus Federator + +This chart deploys an operator that manages Project Monitoring Stacks composed of the following set of resources that are scoped to project namespaces: +- [Prometheus](https://prometheus.io/) (managed externally by [Prometheus Operator](https://github.com/prometheus-operator/prometheus-operator)) +- [Alertmanager](https://prometheus.io/docs/alerting/latest/alertmanager/) (managed externally by [Prometheus Operator](https://github.com/prometheus-operator/prometheus-operator)) +- [Grafana](https://github.com/helm/charts/tree/master/stable/grafana) (deployed via an embedded Helm chart) +- Default PrometheusRules and Grafana dashboards based on the collection of community-curated resources from [kube-prometheus](https://github.com/prometheus-operator/kube-prometheus/) +- Default ServiceMonitors that watch the deployed Prometheus, Grafana, and Alertmanager + +Since this Project Monitoring Stack deploys Prometheus Operator CRs, an existing Prometheus Operator instance must already be deployed in the cluster for Prometheus Federator to successfully be able to deploy Project Monitoring Stacks. It is recommended to use [`rancher-monitoring`](https://rancher.com/docs/rancher/v2.6/en/monitoring-alerting/) for this. For more information on how the chart works or advanced configurations, please read the `README.md`. \ No newline at end of file diff --git a/charts/prometheus-federator/0.2.0-rc1/charts/helmProjectOperator/Chart.yaml b/charts/prometheus-federator/0.2.0-rc1/charts/helmProjectOperator/Chart.yaml new file mode 100644 index 00000000..8693beb7 --- /dev/null +++ b/charts/prometheus-federator/0.2.0-rc1/charts/helmProjectOperator/Chart.yaml @@ -0,0 +1,15 @@ +annotations: + catalog.cattle.io/certified: rancher + catalog.cattle.io/display-name: Helm Project Operator + catalog.cattle.io/kube-version: '>=1.16.0-0' + catalog.cattle.io/namespace: cattle-helm-system + catalog.cattle.io/os: linux,windows + catalog.cattle.io/permits-os: linux,windows + catalog.cattle.io/provides-gvr: helm.cattle.io.projecthelmchart/v1alpha1 + catalog.cattle.io/rancher-version: '>= 2.6.0-0 <=2.6.99-0' + catalog.cattle.io/release-name: helm-project-operator +apiVersion: v2 +appVersion: 0.0.1 +description: Helm Project Operator +name: helmProjectOperator +version: 0.0.2 diff --git a/charts/prometheus-federator/0.2.0-rc1/charts/helmProjectOperator/README.md b/charts/prometheus-federator/0.2.0-rc1/charts/helmProjectOperator/README.md new file mode 100644 index 00000000..99505b9e --- /dev/null +++ b/charts/prometheus-federator/0.2.0-rc1/charts/helmProjectOperator/README.md @@ -0,0 +1,77 @@ +# Helm Project Operator + +## How does the operator work? + +1. On deploying a Helm Project Operator, users can create ProjectHelmCharts CRs with `spec.helmApiVersion` set to `dummy.cattle.io/v1alpha1` in a **Project Registration Namespace (`cattle-project-`)**. +2. On seeing each ProjectHelmChartCR, the operator will automatically deploy the embedded Helm chart on the Project Owner's behalf in the **Project Release Namespace (`cattle-project--dummy`)** based on a HelmChart CR and a HelmRelease CR automatically created by the ProjectHelmChart controller in the **Operator / System Namespace**. +3. RBAC will automatically be assigned in the Project Release Namespace to allow users to based on Role created in the Project Release Namespace with a given set of labels; this will be based on RBAC defined on the Project Registration Namespace against the [default Kubernetes user-facing roles](https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles) (see below for more information about configuring RBAC). + +### What is a Project? + +In Helm Project Operator, a Project is a group of namespaces that can be identified by a `metav1.LabelSelector`; by default, the label used to identify projects is `field.cattle.io/projectId`, the label used to identify namespaces that are contained within a given [Rancher](https://rancher.com/) Project. + +### What is a ProjectHelmChart? + +A ProjectHelmChart is an instance of a (project-scoped) Helm chart deployed on behalf of a user who has permissions to create ProjectHelmChart resources in a Project Registration namespace. + +Generally, the best way to think about the ProjectHelmChart model is by comparing it to two other models: +1. Managed Kubernetes providers (EKS, GKE, AKS, etc.): in this model, a user has the ability to say "I want a Kubernetes cluster" but the underlying cloud provider is responsible for provisioning the infrastructure and offering **limited view and access** of the underlying resources created on their behalf; similarly, Helm Project Operator allows a Project Owner to say "I want this Helm chart deployed", but the underlying Operator is responsible for "provisioning" (deploying) the Helm chart and offering **limited view and access** of the underlying Kubernetes resources created on their behalf (based on configuring "least-privilege" Kubernetes RBAC for the Project Owners / Members in the newly created Project Release Namespace). +2. Dynamically-provisioned Persistent Volumes: in this model, a single resource (PersistentVolume) exists that allows you to specify a Storage Class that actually implements provisioning the underlying storage via a Storage Class Provisioner (e.g. Longhorn). Similarly, the ProjectHelmChart exists that allows you to specify a `spec.helmApiVersion` ("storage class") that actually implements deploying the underlying Helm chart via a Helm Project Operator (e.g. [`rancher/prometheus-federator`](https://github.com/rancher/prometheus-federator)). + +### Configuring the Helm release created by a ProjectHelmChart + +The `spec.values` of this ProjectHelmChart resources will correspond to the `values.yaml` override to be supplied to the underlying Helm chart deployed by the operator on the user's behalf; to see the underlying chart's `values.yaml` spec, either: +- View to the chart's definition located at [`rancher/helm-project-operator` under `charts/example-chart`](https://github.com/rancher/helm-project-operator/blob/main/charts/example-chart) (where the chart version will be tied to the version of this operator) +- Look for the ConfigMap named `dummy.cattle.io.v1alpha1` that is automatically created in each Project Registration Namespace, which will contain both the `values.yaml` and `questions.yaml` that was used to configure the chart (which was embedded directly into the `helm-project-operator` binary). + +### Namespaces + +All Helm Project Operators have three different classifications of namespaces that the operator looks out for: +1. **Operator / System Namespace**: this is the namespace that the operator is deployed into (e.g. `cattle-helm-system`). This namespace will contain all HelmCharts and HelmReleases for all ProjectHelmCharts watched by this operator. **Only Cluster Admins should have access to this namespace.** +2. **Project Registration Namespace (`cattle-project-`)**: this is the set of namespaces that the operator watches for ProjectHelmCharts within. The RoleBindings and ClusterRoleBindings that apply to this namespace will also be the source of truth for the auto-assigned RBAC created in the Project Release Namespace (see more details below). **Project Owners (admin), Project Members (edit), and Read-Only Members (view) should have access to this namespace**. +> Note: Project Registration Namespaces will be auto-generated by the operator and imported into the Project it is tied to if `.Values.global.cattle.projectLabel` is provided (which is set to `field.cattle.io/projectId` by default); this indicates that a Project Registration Namespace should be created by the operator if at least one namespace is observed with that label. The operator will not let these namespaces be deleted unless either all namespaces with that label are gone (e.g. this is the last namespace in that project, in which case the namespace will be marked with the label `"helm.cattle.io/helm-project-operator-orphaned": "true"`, which signals that it can be deleted) or it is no longer watching that project (because the project ID was provided under `.Values.helmProjectOperator.otherSystemProjectLabelValues`, which serves as a denylist for Projects). These namespaces will also never be auto-deleted to avoid destroying user data; it is recommended that users clean up these namespaces manually if desired on creating or deleting a project +> Note: if `.Values.global.cattle.projectLabel` is not provided, the Operator / System Namespace will also be the Project Registration Namespace +3. **Project Release Namespace (`cattle-project--dummy`)**: this is the set of namespaces that the operator deploys Helm charts within on behalf of a ProjectHelmChart; the operator will also automatically assign RBAC to Roles created in this namespace by the Helm charts based on bindings found in the Project Registration Namespace. **Only Cluster Admins should have access to this namespace; Project Owners (admin), Project Members (edit), and Read-Only Members (view) will be assigned limited access to this namespace by the deployed Helm Chart and Helm Project Operator.** +> Note: Project Release Namespaces are automatically deployed and imported into the project whose ID is specified under `.Values.helmProjectOperator.projectReleaseNamespaces.labelValue` (which defaults to the value of `.Values.global.cattle.systemProjectId` if not specified) whenever a ProjectHelmChart is specified in a Project Registration Namespace +> Note: Project Release Namespaces follow the same orphaning conventions as Project Registration Namespaces (see note above) +> Note: if `.Values.projectReleaseNamespaces.enabled` is false, the Project Release Namespace will be the same as the Project Registration Namespace + +### Helm Resources (HelmChart, HelmRelease) + +On deploying a ProjectHelmChart, the Prometheus Federator will automatically create and manage two child custom resources that manage the underlying Helm resources in turn: +- A HelmChart CR (managed via an embedded [k3s-io/helm-contoller](https://github.com/k3s-io/helm-controller) in the operator): this custom resource automatically creates a Job in the same namespace that triggers a `helm install`, `helm upgrade`, or `helm uninstall` depending on the change applied to the HelmChart CR; this CR is automatically updated on changes to the ProjectHelmChart (e.g. modifying the values.yaml) or changes to the underlying Project definition (e.g. adding or removing namespaces from a project). +> **Important Note: If a ProjectHelmChart is not deploying or updating the underlying Project Monitoring Stack for some reason, the Job created by this resource in the Operator / System namespace should be the first place you check to see if there's something wrong with the Helm operation; however, this is generally only accessible by a Cluster Admin.** +- A HelmRelease CR (managed via an embedded [rancher/helm-locker](https://github.com/rancher/helm-locker) in the operator): this custom resource automatically locks a deployed Helm release in place and automatically overwrites updates to underlying resources unless the change happens via a Helm operation (`helm install`, `helm upgrade`, or `helm uninstall` performed by the HelmChart CR). +> Note: HelmRelease CRs emit Kubernetes Events that detect when an underlying Helm release is being modified and locks it back to place; to view these events, you can use `kubectl describe helmrelease -n `; you can also view the logs on this operator to see when changes are detected and which resources were attempted to be modified + +Both of these resources are created for all Helm charts in the Operator / System namespaces to avoid escalation of privileges to underprivileged users. + +### RBAC + +As described in the section on namespaces above, Prometheus Federator expects that Project Owners, Project Members, and other users in the cluster with Project-level permissions (e.g. permissions in a certain set of namespaces identified by a single label selector) have minimal permissions in any namespaces except the Project Registration Namespace (which is imported into the project by default) and those that already comprise their projects. Therefore, in order to allow Project Owners to assign specific chart permissions to other users in their Project namespaces, the Helm Project Operator will automatically watch the following bindings: +- ClusterRoleBindings +- RoleBindings in the Project Release Namespace + +On observing a change to one of those types of bindings, the Helm Project Operator will check whether the `roleRef` that the the binding points to matches a ClusterRole with the name provided under `helmProjectOperator.releaseRoleBindings.clusterRoleRefs.admin`, `helmProjectOperator.releaseRoleBindings.clusterRoleRefs.edit`, or `helmProjectOperator.releaseRoleBindings.clusterRoleRefs.view`; by default, these roleRefs correspond will correspond to `admin`, `edit`, and `view` respectively, which are the [default Kubernetes user-facing roles](https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles). + +> Note: for Rancher RBAC users, these [default Kubernetes user-facing roles](https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles) directly correlate to the `Project Owner`, `Project Member`, and `Read-Only` default Project Role Templates. + +If the `roleRef` matches, the Helm Project Operator will filter the `subjects` of the binding for all Users and Groups and use that to automatically construct a RoleBinding for each Role in the Project Release Namespace with the same name as the role and the following labels: +- `helm.cattle.io/project-helm-chart-role: {{ .Release.Name }}` +- `helm.cattle.io/project-helm-chart-role-aggregate-from: ` + +By default, the `example-chart` (the underlying chart deployed by Helm Project Operator) does not create any default roles; however, if a Cluster Admin would like to assign additional permissions to certain users, they can either directly assign RoleBindings in the Project Release Namespace to certain users or created Roles with the above two labels on them to allow Project Owners to control assigning those RBAC roles to users in their Project Registration namespaces. + +### Advanced Helm Project Operator Configuration + +|Value|Configuration| +|---|---------------------------| +|`valuesOverride`| Allows an Operator to override values that are set on each ProjectHelmChart deployment on an operator-level; user-provided options (specified on the `spec.values` of the ProjectHelmChart) are automatically overridden if operator-level values are provided. For an exmaple, see how the default value overrides `federate.targets` (note: when overriding list values like `federate.targets`, user-provided list values will **not** be concatenated) | +|`projectReleaseNamespaces.labelValues`| The value of the Project that all Project Release Namespaces should be auto-imported into (via label and annotation). Not recommended to be overridden on a Rancher setup. | +|`otherSystemProjectLabelValues`| Other namespaces that the operator should treat as a system namespace that should not be monitored. By default, all namespaces that match `global.cattle.systemProjectId` will not be matched. `kube-system` is explicitly marked as a system namespace as well, regardless of label or annotation. | +|`releaseRoleBindings.aggregate`| Whether to automatically create RBAC resources in Project Release namespaces +|`releaseRoleBindings.clusterRoleRefs.`| ClusterRoles to reference to discover subjects to create RoleBindings for in the Project Release Namespace for all corresponding Project Release Roles. See RBAC above for more information | +|`hardenedNamespaces.enabled`| Whether to automatically patch the default ServiceAccount with `automountServiceAccountToken: false` and create a default NetworkPolicy in all managed namespaces in the cluster; the default values ensure that the creation of the namespace does not break a CIS 1.16 hardened scan | +|`hardenedNamespaces.configuration`| The configuration to be supplied to the default ServiceAccount or auto-generated NetworkPolicy on managing a namespace | +|`helmController.enabled`| Whether to enable an embedded k3s-io/helm-controller instance within the Helm Project Operator. Should be disabled for RKE2 clusters since RKE2 clusters already run Helm Controller to manage internal Kubernetes components | +|`helmLocker.enabled`| Whether to enable an embedded rancher/helm-locker instance within the Helm Project Operator. | \ No newline at end of file diff --git a/charts/prometheus-federator/0.2.0-rc1/charts/helmProjectOperator/questions.yaml b/charts/prometheus-federator/0.2.0-rc1/charts/helmProjectOperator/questions.yaml new file mode 100644 index 00000000..d5fac339 --- /dev/null +++ b/charts/prometheus-federator/0.2.0-rc1/charts/helmProjectOperator/questions.yaml @@ -0,0 +1,37 @@ +questions: +- variable: helmController.enabled + label: Enable Embedded Helm Controller + description: 'Note: If you are running Prometheus Federator in an RKE2 cluster, this should be disabled.' + type: boolean + group: Helm Controller +- variable: helmLocker.enabled + label: Enable Embedded Helm Locker + type: boolean + group: Helm Locker +- variable: projectReleaseNamespaces.labelValue + label: Project Release Namespace Project ID + description: By default, the System Project is selected. This can be overriden to a different Project (e.g. p-xxxxx) + type: string + required: false + group: Namespaces +- variable: releaseRoleBindings.clusterRoleRefs.admin + label: Admin ClusterRole + description: By default, admin selects Project Owners. This can be overridden to a different ClusterRole (e.g. rt-xxxxx) + type: string + default: admin + required: false + group: RBAC +- variable: releaseRoleBindings.clusterRoleRefs.edit + label: Edit ClusterRole + description: By default, edit selects Project Members. This can be overridden to a different ClusterRole (e.g. rt-xxxxx) + type: string + default: edit + required: false + group: RBAC +- variable: releaseRoleBindings.clusterRoleRefs.view + label: View ClusterRole + description: By default, view selects Read-Only users. This can be overridden to a different ClusterRole (e.g. rt-xxxxx) + type: string + default: view + required: false + group: RBAC \ No newline at end of file diff --git a/charts/prometheus-federator/0.2.0-rc1/charts/helmProjectOperator/templates/NOTES.txt b/charts/prometheus-federator/0.2.0-rc1/charts/helmProjectOperator/templates/NOTES.txt new file mode 100644 index 00000000..aa34aa63 --- /dev/null +++ b/charts/prometheus-federator/0.2.0-rc1/charts/helmProjectOperator/templates/NOTES.txt @@ -0,0 +1,3 @@ +{{ $.Chart.Name }} has been installed. Check its status by running: + kubectl --namespace {{ template "helm-project-operator.namespace" . }} get pods -l "release={{ $.Release.Name }}" + diff --git a/charts/prometheus-federator/0.2.0-rc1/charts/helmProjectOperator/templates/_helpers.tpl b/charts/prometheus-federator/0.2.0-rc1/charts/helmProjectOperator/templates/_helpers.tpl new file mode 100644 index 00000000..104178de --- /dev/null +++ b/charts/prometheus-federator/0.2.0-rc1/charts/helmProjectOperator/templates/_helpers.tpl @@ -0,0 +1,66 @@ +# Rancher +{{- define "system_default_registry" -}} +{{- if .Values.global.cattle.systemDefaultRegistry -}} +{{- printf "%s/" .Values.global.cattle.systemDefaultRegistry -}} +{{- end -}} +{{- end -}} + +# Windows Support + +{{/* +Windows cluster will add default taint for linux nodes, +add below linux tolerations to workloads could be scheduled to those linux nodes +*/}} + +{{- define "linux-node-tolerations" -}} +- key: "cattle.io/os" + value: "linux" + effect: "NoSchedule" + operator: "Equal" +{{- end -}} + +{{- define "linux-node-selector" -}} +{{- if semverCompare "<1.14-0" .Capabilities.KubeVersion.GitVersion -}} +beta.kubernetes.io/os: linux +{{- else -}} +kubernetes.io/os: linux +{{- end -}} +{{- end -}} + +# Helm Project Operator + +{{/* vim: set filetype=mustache: */}} +{{/* Expand the name of the chart. This is suffixed with -alertmanager, which means subtract 13 from longest 63 available */}} +{{- define "helm-project-operator.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 50 | trimSuffix "-" -}} +{{- end }} + +{{/* +Allow the release namespace to be overridden for multi-namespace deployments in combined charts +*/}} +{{- define "helm-project-operator.namespace" -}} + {{- if .Values.namespaceOverride -}} + {{- .Values.namespaceOverride -}} + {{- else -}} + {{- .Release.Namespace -}} + {{- end -}} +{{- end -}} + +{{/* Create chart name and version as used by the chart label. */}} +{{- define "helm-project-operator.chartref" -}} +{{- replace "+" "_" .Chart.Version | printf "%s-%s" .Chart.Name -}} +{{- end }} + +{{/* Generate basic labels */}} +{{- define "helm-project-operator.labels" }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +app.kubernetes.io/instance: {{ .Release.Name }} +app.kubernetes.io/version: "{{ replace "+" "_" .Chart.Version }}" +app.kubernetes.io/part-of: {{ template "helm-project-operator.name" . }} +chart: {{ template "helm-project-operator.chartref" . }} +release: {{ $.Release.Name | quote }} +heritage: {{ $.Release.Service | quote }} +{{- if .Values.commonLabels}} +{{ toYaml .Values.commonLabels }} +{{- end }} +{{- end }} diff --git a/charts/prometheus-federator/0.2.0-rc1/charts/helmProjectOperator/templates/cleanup.yaml b/charts/prometheus-federator/0.2.0-rc1/charts/helmProjectOperator/templates/cleanup.yaml new file mode 100644 index 00000000..4c5967ed --- /dev/null +++ b/charts/prometheus-federator/0.2.0-rc1/charts/helmProjectOperator/templates/cleanup.yaml @@ -0,0 +1,70 @@ +apiVersion: batch/v1 +kind: Job +metadata: + name: {{ template "helm-project-operator.name" . }}-cleanup + namespace: {{ template "helm-project-operator.namespace" . }} + labels: {{ include "helm-project-operator.labels" . | nindent 4 }} + app: {{ template "helm-project-operator.name" . }} + annotations: + "helm.sh/hook": pre-delete + "helm.sh/hook-delete-policy": before-hook-creation, hook-succeeded, hook-failed +spec: + template: + metadata: + name: {{ template "helm-project-operator.name" . }}-cleanup + labels: {{ include "helm-project-operator.labels" . | nindent 8 }} + app: {{ template "helm-project-operator.name" . }} + spec: + serviceAccountName: {{ template "helm-project-operator.name" . }} + securityContext: + runAsNonRoot: false + runAsUser: 0 + initContainers: + - name: add-cleanup-annotations + image: {{ template "system_default_registry" . }}{{ .Values.cleanup.image.repository }}:{{ .Values.cleanup.image.tag }} + imagePullPolicy: IfNotPresent + command: + - /bin/sh + - -c + - > + echo "Labeling all ProjectHelmCharts with helm.cattle.io/helm-project-operator-cleanup=true"; + EXPECTED_HELM_API_VERSION={{ .Values.helmApiVersion }}; + IFS=$'\n'; + for namespace in $(kubectl get namespaces -l helm.cattle.io/helm-project-operated=true --no-headers -o=custom-columns=NAME:.metadata.name); do + for projectHelmChartAndHelmApiVersion in $(kubectl get projecthelmcharts -n ${namespace} --no-headers -o=custom-columns=NAME:.metadata.name,HELMAPIVERSION:.spec.helmApiVersion); do + projectHelmChartAndHelmApiVersion=$(echo ${projectHelmChartAndHelmApiVersion} | xargs); + projectHelmChart=$(echo ${projectHelmChartAndHelmApiVersion} | cut -d' ' -f1); + helmApiVersion=$(echo ${projectHelmChartAndHelmApiVersion} | cut -d' ' -f2); + if [[ ${helmApiVersion} != ${EXPECTED_HELM_API_VERSION} ]]; then + echo "Skipping marking ${namespace}/${projectHelmChart} with cleanup annotation since spec.helmApiVersion: ${helmApiVersion} is not ${EXPECTED_HELM_API_VERSION}"; + continue; + fi; + kubectl label projecthelmcharts -n ${namespace} ${projectHelmChart} helm.cattle.io/helm-project-operator-cleanup=true --overwrite; + done; + done; + containers: + - name: ensure-subresources-deleted + image: {{ template "system_default_registry" . }}{{ .Values.cleanup.image.repository }}:{{ .Values.cleanup.image.tag }} + imagePullPolicy: IfNotPresent + command: + - /bin/sh + - -c + - > + SYSTEM_NAMESPACE={{ .Release.Namespace }} + EXPECTED_HELM_API_VERSION={{ .Values.helmApiVersion }}; + HELM_API_VERSION_TRUNCATED=$(echo ${EXPECTED_HELM_API_VERSION} | cut -d'/' -f0); + echo "Ensuring HelmCharts and HelmReleases are deleted from ${SYSTEM_NAMESPACE}..."; + while [[ "$(kubectl get helmcharts,helmreleases -l helm.cattle.io/helm-api-version=${HELM_API_VERSION_TRUNCATED} -n ${SYSTEM_NAMESPACE} 2>&1)" != "No resources found in ${SYSTEM_NAMESPACE} namespace." ]]; do + echo "waiting for HelmCharts and HelmReleases to be deleted from ${SYSTEM_NAMESPACE}... sleeping 3 seconds"; + sleep 3; + done; + echo "Successfully deleted all HelmCharts and HelmReleases in ${SYSTEM_NAMESPACE}!"; + restartPolicy: OnFailure + nodeSelector: {{ include "linux-node-selector" . | nindent 8 }} + {{- if .Values.cleanup.nodeSelector }} + {{- toYaml .Values.cleanup.nodeSelector | nindent 8 }} + {{- end }} + tolerations: {{ include "linux-node-tolerations" . | nindent 8 }} + {{- if .Values.cleanup.tolerations }} + {{- toYaml .Values.cleanup.tolerations | nindent 8 }} + {{- end }} diff --git a/charts/prometheus-federator/0.2.0-rc1/charts/helmProjectOperator/templates/clusterrole.yaml b/charts/prometheus-federator/0.2.0-rc1/charts/helmProjectOperator/templates/clusterrole.yaml new file mode 100644 index 00000000..60ed263b --- /dev/null +++ b/charts/prometheus-federator/0.2.0-rc1/charts/helmProjectOperator/templates/clusterrole.yaml @@ -0,0 +1,57 @@ +{{- if and .Values.global.rbac.create .Values.global.rbac.userRoles.create }} +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: {{ template "helm-project-operator.name" . }}-admin + labels: {{ include "helm-project-operator.labels" . | nindent 4 }} + {{- if .Values.global.rbac.userRoles.aggregateToDefaultRoles }} + rbac.authorization.k8s.io/aggregate-to-admin: "true" + {{- end }} +rules: +- apiGroups: + - helm.cattle.io + resources: + - projecthelmcharts + - projecthelmcharts/finalizers + - projecthelmcharts/status + verbs: + - '*' +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: {{ template "helm-project-operator.name" . }}-edit + labels: {{ include "helm-project-operator.labels" . | nindent 4 }} + {{- if .Values.global.rbac.userRoles.aggregateToDefaultRoles }} + rbac.authorization.k8s.io/aggregate-to-edit: "true" + {{- end }} +rules: +- apiGroups: + - helm.cattle.io + resources: + - projecthelmcharts + - projecthelmcharts/status + verbs: + - 'get' + - 'list' + - 'watch' +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: {{ template "helm-project-operator.name" . }}-view + labels: {{ include "helm-project-operator.labels" . | nindent 4 }} + {{- if .Values.global.rbac.userRoles.aggregateToDefaultRoles }} + rbac.authorization.k8s.io/aggregate-to-view: "true" + {{- end }} +rules: +- apiGroups: + - helm.cattle.io + resources: + - projecthelmcharts + - projecthelmcharts/status + verbs: + - 'get' + - 'list' + - 'watch' +{{- end }} diff --git a/charts/prometheus-federator/0.2.0-rc1/charts/helmProjectOperator/templates/configmap.yaml b/charts/prometheus-federator/0.2.0-rc1/charts/helmProjectOperator/templates/configmap.yaml new file mode 100644 index 00000000..d4def157 --- /dev/null +++ b/charts/prometheus-federator/0.2.0-rc1/charts/helmProjectOperator/templates/configmap.yaml @@ -0,0 +1,14 @@ +## Note: If you add another entry to this ConfigMap, make sure a corresponding env var is set +## in the deployment of the operator to ensure that a Helm upgrade will force the operator +## to reload the values in the ConfigMap and redeploy +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ template "helm-project-operator.name" . }}-config + namespace: {{ template "helm-project-operator.namespace" . }} + labels: {{ include "helm-project-operator.labels" . | nindent 4 }} +data: + hardened.yaml: |- +{{ .Values.hardenedNamespaces.configuration | toYaml | indent 4 }} + values.yaml: |- +{{ .Values.valuesOverride | toYaml | indent 4 }} diff --git a/charts/prometheus-federator/0.2.0-rc1/charts/helmProjectOperator/templates/deployment.yaml b/charts/prometheus-federator/0.2.0-rc1/charts/helmProjectOperator/templates/deployment.yaml new file mode 100644 index 00000000..4fe0e987 --- /dev/null +++ b/charts/prometheus-federator/0.2.0-rc1/charts/helmProjectOperator/templates/deployment.yaml @@ -0,0 +1,121 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ template "helm-project-operator.name" . }} + namespace: {{ template "helm-project-operator.namespace" . }} + labels: {{ include "helm-project-operator.labels" . | nindent 4 }} + app: {{ template "helm-project-operator.name" . }} +spec: + replicas: 1 + selector: + matchLabels: + app: {{ template "helm-project-operator.name" . }} + release: {{ $.Release.Name | quote }} + template: + metadata: + labels: {{ include "helm-project-operator.labels" . | nindent 8 }} + app: {{ template "helm-project-operator.name" . }} + spec: + containers: + - name: {{ template "helm-project-operator.name" . }} + image: "{{ template "system_default_registry" . }}{{ .Values.image.repository }}:{{ .Values.image.tag }}" + imagePullPolicy: "{{ .Values.image.pullPolicy }}" + args: + - {{ template "helm-project-operator.name" . }} + - --namespace={{ template "helm-project-operator.namespace" . }} + - --controller-name={{ template "helm-project-operator.name" . }} + - --values-override-file=/etc/helmprojectoperator/config/values.yaml +{{- if .Values.global.cattle.systemDefaultRegistry }} + - --system-default-registry={{ .Values.global.cattle.systemDefaultRegistry }} +{{- end }} +{{- if .Values.global.cattle.url }} + - --cattle-url={{ .Values.global.cattle.url }} +{{- end }} +{{- if .Values.global.cattle.projectLabel }} + - --project-label={{ .Values.global.cattle.projectLabel }} +{{- end }} +{{- if not .Values.projectReleaseNamespaces.enabled }} + - --system-project-label-values={{ join "," (append .Values.otherSystemProjectLabelValues .Values.global.cattle.systemProjectId) }} +{{- else if and (ne (len .Values.global.cattle.systemProjectId) 0) (ne (len .Values.projectReleaseNamespaces.labelValue) 0) (ne .Values.projectReleaseNamespaces.labelValue .Values.global.cattle.systemProjectId) }} + - --system-project-label-values={{ join "," (append .Values.otherSystemProjectLabelValues .Values.global.cattle.systemProjectId) }} +{{- else if len .Values.otherSystemProjectLabelValues }} + - --system-project-label-values={{ join "," .Values.otherSystemProjectLabelValues }} +{{- end }} +{{- if .Values.projectReleaseNamespaces.enabled }} +{{- if .Values.projectReleaseNamespaces.labelValue }} + - --project-release-label-value={{ .Values.projectReleaseNamespaces.labelValue }} +{{- else if .Values.global.cattle.systemProjectId }} + - --project-release-label-value={{ .Values.global.cattle.systemProjectId }} +{{- end }} +{{- end }} +{{- if .Values.global.cattle.clusterId }} + - --cluster-id={{ .Values.global.cattle.clusterId }} +{{- end }} +{{- if .Values.releaseRoleBindings.aggregate }} +{{- if .Values.releaseRoleBindings.clusterRoleRefs }} +{{- if .Values.releaseRoleBindings.clusterRoleRefs.admin }} + - --admin-cluster-role={{ .Values.releaseRoleBindings.clusterRoleRefs.admin }} +{{- end }} +{{- if .Values.releaseRoleBindings.clusterRoleRefs.edit }} + - --edit-cluster-role={{ .Values.releaseRoleBindings.clusterRoleRefs.edit }} +{{- end }} +{{- if .Values.releaseRoleBindings.clusterRoleRefs.view }} + - --view-cluster-role={{ .Values.releaseRoleBindings.clusterRoleRefs.view }} +{{- end }} +{{- end }} +{{- end }} +{{- if .Values.hardenedNamespaces.enabled }} + - --hardening-options-file=/etc/helmprojectoperator/config/hardening.yaml +{{- else }} + - --disable-hardening +{{- end }} +{{- if .Values.debug }} + - --debug + - --debug-level={{ .Values.debugLevel }} +{{- end }} +{{- if not .Values.helmController.enabled }} + - --disable-embedded-helm-controller +{{- else }} + - --helm-job-image={{ template "system_default_registry" . }}{{ .Values.helmController.job.image.repository }}:{{ .Values.helmController.job.image.tag }} +{{- end }} +{{- if not .Values.helmLocker.enabled }} + - --disable-embedded-helm-locker +{{- end }} +{{- if .Values.additionalArgs }} +{{- toYaml .Values.additionalArgs | nindent 10 }} +{{- end }} + env: + - name: NODE_NAME + valueFrom: + fieldRef: + fieldPath: spec.nodeName + ## Note: The below two values only exist to force Helm to upgrade the deployment on + ## a change to the contents of the ConfigMap during an upgrade. Neither serve + ## any practical purpose and can be removed and replaced with a configmap reloader + ## in a future change if dynamic updates are required. + - name: HARDENING_OPTIONS_SHA_256_HASH + value: {{ .Values.hardenedNamespaces.configuration | toYaml | sha256sum }} + - name: VALUES_OVERRIDE_SHA_256_HASH + value: {{ .Values.valuesOverride | toYaml | sha256sum }} +{{- if .Values.resources }} + resources: {{ toYaml .Values.resources | nindent 12 }} +{{- end }} + volumeMounts: + - name: config + mountPath: "/etc/helmprojectoperator/config" + serviceAccountName: {{ template "helm-project-operator.name" . }} +{{- if .Values.securityContext }} + securityContext: {{ toYaml .Values.securityContext | indent 8 }} +{{- end }} + nodeSelector: {{ include "linux-node-selector" . | nindent 8 }} +{{- if .Values.nodeSelector }} +{{- toYaml .Values.nodeSelector | nindent 8 }} +{{- end }} + tolerations: {{ include "linux-node-tolerations" . | nindent 8 }} +{{- if .Values.tolerations }} +{{- toYaml .Values.tolerations | nindent 8 }} +{{- end }} + volumes: + - name: config + configMap: + name: {{ template "helm-project-operator.name" . }}-config \ No newline at end of file diff --git a/charts/prometheus-federator/0.2.0-rc1/charts/helmProjectOperator/templates/psp.yaml b/charts/prometheus-federator/0.2.0-rc1/charts/helmProjectOperator/templates/psp.yaml new file mode 100644 index 00000000..1ca2fd00 --- /dev/null +++ b/charts/prometheus-federator/0.2.0-rc1/charts/helmProjectOperator/templates/psp.yaml @@ -0,0 +1,68 @@ +{{- if .Values.global.rbac.pspEnabled }} +apiVersion: policy/v1beta1 +kind: PodSecurityPolicy +metadata: + name: {{ template "helm-project-operator.name" . }}-psp + namespace: {{ template "helm-project-operator.namespace" . }} + labels: {{ include "helm-project-operator.labels" . | nindent 4 }} + app: {{ template "helm-project-operator.name" . }} +{{- if .Values.global.rbac.pspAnnotations }} + annotations: {{ toYaml .Values.global.rbac.pspAnnotations | nindent 4 }} +{{- end }} +spec: + privileged: false + hostNetwork: false + hostIPC: false + hostPID: false + runAsUser: + # Permits the container to run with root privileges as well. + rule: 'RunAsAny' + seLinux: + # This policy assumes the nodes are using AppArmor rather than SELinux. + rule: 'RunAsAny' + supplementalGroups: + rule: 'MustRunAs' + ranges: + # Forbid adding the root group. + - min: 0 + max: 65535 + fsGroup: + rule: 'MustRunAs' + ranges: + # Forbid adding the root group. + - min: 0 + max: 65535 + readOnlyRootFilesystem: false +--- +kind: ClusterRole +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: {{ template "helm-project-operator.name" . }}-psp + labels: {{ include "helm-project-operator.labels" . | nindent 4 }} + app: {{ template "helm-project-operator.name" . }} +rules: +{{- if semverCompare "> 1.15.0-0" .Capabilities.KubeVersion.GitVersion }} +- apiGroups: ['policy'] +{{- else }} +- apiGroups: ['extensions'] +{{- end }} + resources: ['podsecuritypolicies'] + verbs: ['use'] + resourceNames: + - {{ template "helm-project-operator.name" . }}-psp +--- +kind: ClusterRoleBinding +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: {{ template "helm-project-operator.name" . }}-psp + labels: {{ include "helm-project-operator.labels" . | nindent 4 }} + app: {{ template "helm-project-operator.name" . }} +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: {{ template "helm-project-operator.name" . }}-psp +subjects: + - kind: ServiceAccount + name: {{ template "helm-project-operator.name" . }} + namespace: {{ template "helm-project-operator.namespace" . }} +{{- end }} diff --git a/charts/prometheus-federator/0.2.0-rc1/charts/helmProjectOperator/templates/rbac.yaml b/charts/prometheus-federator/0.2.0-rc1/charts/helmProjectOperator/templates/rbac.yaml new file mode 100644 index 00000000..56cb3646 --- /dev/null +++ b/charts/prometheus-federator/0.2.0-rc1/charts/helmProjectOperator/templates/rbac.yaml @@ -0,0 +1,123 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: {{ template "helm-project-operator.name" . }} + labels: {{ include "helm-project-operator.labels" . | nindent 4 }} + app: {{ template "helm-project-operator.name" . }} +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: "cluster-admin" # see note below + # apiGroup: rbac.authorization.k8s.io + # kind: ClusterRole + # name: {{ template "helm-project-operator.name" . }} +subjects: +- kind: ServiceAccount + name: {{ template "helm-project-operator.name" . }} + namespace: {{ template "helm-project-operator.namespace" . }} +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ template "helm-project-operator.name" . }} + namespace: {{ template "helm-project-operator.namespace" . }} + labels: {{ include "helm-project-operator.labels" . | nindent 4 }} + app: {{ template "helm-project-operator.name" . }} +{{- if .Values.global.imagePullSecrets }} +imagePullSecrets: {{ toYaml .Values.global.imagePullSecrets | nindent 2 }} +{{- end }} +# --- +# NOTE: +# As of now, due to the fact that the k3s-io/helm-controller can only deploy jobs that are cluster-bound to the cluster-admin +# ClusterRole, the only way for this operator to be able to perform that binding is if it is also bound to the cluster-admin ClusterRole. +# +# As a result, this ClusterRole will be left as a work-in-progress until changes are made in k3s-io/helm-controller to allow us to grant +# only scoped down permissions to the Job that is deployed. +# +# apiVersion: rbac.authorization.k8s.io/v1 +# kind: ClusterRole +# metadata: +# name: {{ template "helm-project-operator.name" . }} +# labels: {{ include "helm-project-operator.labels" . | nindent 4 }} +# app: {{ template "helm-project-operator.name" . }} +# rules: +# # Helm Project Operator +# - apiGroups: +# - helm.cattle.io +# resources: +# - projecthelmcharts +# - projecthelmcharts/status +# verbs: +# - "*" +# - apiGroups: +# - "" +# resources: +# - namespaces +# verbs: +# - create +# - get +# - list +# - watch +# - update +# - patch +# # Helm Controller +# - apiGroups: +# - helm.cattle.io +# resources: +# - helmcharts +# - helmcharts/status +# - helmchartconfigs +# - helmchartconfigs/status +# verbs: +# - "*" +# - apiGroups: +# - batch +# resources: +# - jobs +# verbs: +# - "*" +# - apiGroups: +# - "" +# resources: +# - serviceaccounts +# verbs: +# - "*" +# - apiGroups: +# - rbac.authorization.k8s.io +# resources: +# - clusterrolebindings +# verbs: +# - "*" +# # Helm Locker +# - apiGroups: +# - helm.cattle.io +# resources: +# - helmreleases +# - helmreleases/status +# verbs: +# - "*" +# - apiGroups: +# - "" +# resources: +# - secrets +# verbs: +# - create +# - get +# - list +# - watch +# - update +# - patch +# # Common +# - apiGroups: +# - "" +# resources: +# - configmaps +# verbs: +# - "*" +# - apiGroups: +# - "" +# - events.k8s.io +# resources: +# - events +# verbs: +# - "*" diff --git a/charts/prometheus-federator/0.2.0-rc1/charts/helmProjectOperator/templates/system-namespaces-configmap.yaml b/charts/prometheus-federator/0.2.0-rc1/charts/helmProjectOperator/templates/system-namespaces-configmap.yaml new file mode 100644 index 00000000..ebfe336b --- /dev/null +++ b/charts/prometheus-federator/0.2.0-rc1/charts/helmProjectOperator/templates/system-namespaces-configmap.yaml @@ -0,0 +1,62 @@ +{{- if .Values.systemNamespacesConfigMap.create }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ template "helm-project-operator.name" . }}-system-namespaces + namespace: {{ template "helm-project-operator.namespace" . }} + labels: {{ include "helm-project-operator.labels" . | nindent 4 }} +data: + system-namespaces.json: |- + { +{{- if .Values.projectReleaseNamespaces.enabled }} +{{- if .Values.projectReleaseNamespaces.labelValue }} + "projectReleaseLabelValue": {{ .Values.projectReleaseNamespaces.labelValue | quote }}, +{{- else if .Values.global.cattle.systemProjectId }} + "projectReleaseLabelValue": {{ .Values.global.cattle.systemProjectId | quote }}, +{{- else }} + "projectReleaseLabelValue": "", +{{- end }} +{{- else }} + "projectReleaseLabelValue": "", +{{- end }} +{{- if not .Values.projectReleaseNamespaces.enabled }} + "systemProjectLabelValues": {{ append .Values.otherSystemProjectLabelValues .Values.global.cattle.systemProjectId | toJson }} +{{- else if and (ne (len .Values.global.cattle.systemProjectId) 0) (ne (len .Values.projectReleaseNamespaces.labelValue) 0) (ne .Values.projectReleaseNamespaces.labelValue .Values.global.cattle.systemProjectId) }} + "systemProjectLabelValues": {{ append .Values.otherSystemProjectLabelValues .Values.global.cattle.systemProjectId | toJson }} +{{- else if len .Values.otherSystemProjectLabelValues }} + "systemProjectLabelValues": {{ .Values.otherSystemProjectLabelValues | toJson }} +{{- else }} + "systemProjectLabelValues": [] +{{- end }} + } +--- +{{- if (and .Values.systemNamespacesConfigMap.rbac.enabled .Values.systemNamespacesConfigMap.rbac.subjects) }} +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: {{ template "helm-project-operator.name" . }}-system-namespaces + namespace: {{ template "helm-project-operator.namespace" . }} + labels: {{ include "helm-project-operator.labels" . | nindent 4 }} +rules: +- apiGroups: + - "" + resources: + - configmaps + resourceNames: + - "{{ template "helm-project-operator.name" . }}-system-namespaces" + verbs: + - 'get' +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: {{ template "helm-project-operator.name" . }}-system-namespaces + namespace: {{ template "helm-project-operator.namespace" . }} + labels: {{ include "helm-project-operator.labels" . | nindent 4 }} +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: {{ template "helm-project-operator.name" . }}-system-namespaces +subjects: {{ .Values.systemNamespacesConfigMap.rbac.subjects | toYaml | nindent 2 }} +{{- end }} +{{- end }} \ No newline at end of file diff --git a/charts/prometheus-federator/0.2.0-rc1/charts/helmProjectOperator/values.yaml b/charts/prometheus-federator/0.2.0-rc1/charts/helmProjectOperator/values.yaml new file mode 100644 index 00000000..2f7445e3 --- /dev/null +++ b/charts/prometheus-federator/0.2.0-rc1/charts/helmProjectOperator/values.yaml @@ -0,0 +1,184 @@ +# Default values for helm-project-operator. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +# Helm Project Operator Configuration + +global: + cattle: + clusterId: "" + projectLabel: field.cattle.io/projectId + systemDefaultRegistry: "" + systemProjectId: "" + url: "" + rbac: + ## Create RBAC resources for ServiceAccounts and users + ## + create: true + + userRoles: + ## Create default user ClusterRoles to allow users to interact with ProjectHelmCharts + create: true + ## Aggregate default user ClusterRoles into default k8s ClusterRoles + aggregateToDefaultRoles: true + + pspEnabled: true + pspAnnotations: {} + ## Specify pod annotations + ## Ref: https://kubernetes.io/docs/concepts/policy/pod-security-policy/#apparmor + ## Ref: https://kubernetes.io/docs/concepts/policy/pod-security-policy/#seccomp + ## Ref: https://kubernetes.io/docs/concepts/policy/pod-security-policy/#sysctl + ## + # seccomp.security.alpha.kubernetes.io/allowedProfileNames: '*' + # seccomp.security.alpha.kubernetes.io/defaultProfileName: 'docker/default' + # apparmor.security.beta.kubernetes.io/defaultProfileName: 'runtime/default' + + ## Reference to one or more secrets to be used when pulling images + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ + ## + imagePullSecrets: [] + # - name: "image-pull-secret" + +helmApiVersion: dummy.cattle.io/v1alpha1 + +## valuesOverride overrides values that are set on each ProjectHelmChart deployment on an operator-level +## User-provided values will be overwritten based on the values provided here +valuesOverride: {} + +## projectReleaseNamespaces are auto-generated namespaces that are created to host Helm Releases +## managed by this operator on behalf of a ProjectHelmChart +projectReleaseNamespaces: + ## Enabled determines whether Project Release Namespaces should be created. If false, the underlying + ## Helm release will be deployed in the Project Registration Namespace + enabled: true + ## labelValue is the value of the Project that the projectReleaseNamespace should be created within + ## If empty, this will be set to the value of global.cattle.systemProjectId + ## If global.cattle.systemProjectId is also empty, project release namespaces will be disabled + labelValue: "" + +## otherSystemProjectLabelValues are project labels that identify namespaces as those that should be treated as system projects +## i.e. they will be entirely ignored by the operator +## By default, the global.cattle.systemProjectId will be in this list +otherSystemProjectLabelValues: [] + +## releaseRoleBindings configures RoleBindings automatically created by the Helm Project Operator +## in Project Release Namespaces where underlying Helm charts are deployed +releaseRoleBindings: + ## aggregate enables creating these RoleBindings off aggregating RoleBindings in the + ## Project Registration Namespace or ClusterRoleBindings that bind users to the ClusterRoles + ## specified under clusterRoleRefs + aggregate: true + + ## clusterRoleRefs are the ClusterRoles whose RoleBinding or ClusterRoleBindings should determine + ## the RoleBindings created in the Project Release Namespace + ## + ## By default, these are set to create RoleBindings based on the RoleBindings / ClusterRoleBindings + ## attached to the default K8s user-facing ClusterRoles of admin, edit, and view. + ## ref: https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles + ## + clusterRoleRefs: + admin: admin + edit: edit + view: view + +hardenedNamespaces: + # Whether to automatically manage the configuration of the default ServiceAccount and + # auto-create a NetworkPolicy for each namespace created by this operator + enabled: true + + configuration: + # Values to be applied to each default ServiceAccount created in a managed namespace + serviceAccountSpec: + secrets: [] + imagePullSecrets: [] + automountServiceAccountToken: false + # Values to be applied to each default generated NetworkPolicy created in a managed namespace + networkPolicySpec: + podSelector: {} + egress: [] + ingress: [] + policyTypes: ["Ingress", "Egress"] + +## systemNamespacesConfigMap is a ConfigMap created to allow users to see valid entries +## for registering a ProjectHelmChart for a given Project on the Rancher Dashboard UI. +## It does not need to be enabled for a non-Rancher use case. +systemNamespacesConfigMap: + ## Create indicates whether the system namespaces configmap should be created + ## This is a required value for integration with Rancher Dashboard + create: true + + ## RBAC provides options around the RBAC created to allow users to be able to view + ## the systemNamespacesConfigMap; if not specified, only users with the ability to + ## view ConfigMaps in the namespace where this chart is deployed will be able to + ## properly view the system namespaces on the Rancher Dashboard UI + rbac: + ## enabled indicates that we should deploy a RoleBinding and Role to view this ConfigMap + enabled: true + ## subjects are the subjects that should be bound to this default RoleBinding + ## By default, we allow anyone who is authenticated to the system to be able to view + ## this ConfigMap in the deployment namespace + subjects: + - kind: Group + name: system:authenticated + +nameOverride: "" + +namespaceOverride: "" + +image: + repository: rancher/helm-project-operator + tag: v0.0.1 + pullPolicy: IfNotPresent + +helmController: + # Note: should be disabled for RKE2 clusters since they already run Helm Controller to manage internal Kubernetes components + enabled: true + + job: + image: + repository: rancher/klipper-helm + tag: v0.7.0-build20220315 + +helmLocker: + enabled: true + +# Additional arguments to be passed into the Helm Project Operator image +additionalArgs: [] + +## Define which Nodes the Pods are scheduled on. +## ref: https://kubernetes.io/docs/user-guide/node-selection/ +## +nodeSelector: {} + +## Tolerations for use with node taints +## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ +## +tolerations: [] +# - key: "key" +# operator: "Equal" +# value: "value" +# effect: "NoSchedule" + +resources: {} + # limits: + # memory: 500Mi + # cpu: 1000m + # requests: + # memory: 100Mi + # cpu: 100m + +securityContext: {} + # allowPrivilegeEscalation: false + # readOnlyRootFilesystem: true + +debug: false +debugLevel: 0 + +cleanup: + image: + repository: rancher/shell + tag: v0.1.18 + + nodeSelector: {} + + tolerations: [] diff --git a/charts/prometheus-federator/0.2.0-rc1/questions.yaml b/charts/prometheus-federator/0.2.0-rc1/questions.yaml new file mode 100644 index 00000000..981e1c06 --- /dev/null +++ b/charts/prometheus-federator/0.2.0-rc1/questions.yaml @@ -0,0 +1,37 @@ +questions: +- variable: helmProjectOperator.helmController.enabled + label: Enable Embedded Helm Controller + description: 'Note: If you are running Prometheus Federator in an RKE2 / K3s cluster before v1.23.14 / v1.24.8 / v1.25.4, this should be disabled.' + type: boolean + group: Helm Controller +- variable: helmProjectOperator.helmLocker.enabled + label: Enable Embedded Helm Locker + type: boolean + group: Helm Locker +- variable: helmProjectOperator.projectReleaseNamespaces.labelValue + label: Project Release Namespace Project ID + description: By default, the System Project is selected. This can be overriden to a different Project (e.g. p-xxxxx) + type: string + required: false + group: Namespaces +- variable: helmProjectOperator.releaseRoleBindings.clusterRoleRefs.admin + label: Admin ClusterRole + description: By default, admin selects Project Owners. This can be overridden to a different ClusterRole (e.g. rt-xxxxx) + type: string + default: admin + required: false + group: RBAC +- variable: helmProjectOperator.releaseRoleBindings.clusterRoleRefs.edit + label: Edit ClusterRole + description: By default, edit selects Project Members. This can be overridden to a different ClusterRole (e.g. rt-xxxxx) + type: string + default: edit + required: false + group: RBAC +- variable: helmProjectOperator.releaseRoleBindings.clusterRoleRefs.view + label: View ClusterRole + description: By default, view selects Read-Only users. This can be overridden to a different ClusterRole (e.g. rt-xxxxx) + type: string + default: view + required: false + group: RBAC \ No newline at end of file diff --git a/charts/prometheus-federator/0.2.0-rc1/templates/NOTES.txt b/charts/prometheus-federator/0.2.0-rc1/templates/NOTES.txt new file mode 100644 index 00000000..f551f366 --- /dev/null +++ b/charts/prometheus-federator/0.2.0-rc1/templates/NOTES.txt @@ -0,0 +1,3 @@ +{{ $.Chart.Name }} has been installed. Check its status by running: + kubectl --namespace {{ template "prometheus-federator.namespace" . }} get pods -l "release={{ $.Release.Name }}" + diff --git a/charts/prometheus-federator/0.2.0-rc1/templates/_helpers.tpl b/charts/prometheus-federator/0.2.0-rc1/templates/_helpers.tpl new file mode 100644 index 00000000..15ea4e5c --- /dev/null +++ b/charts/prometheus-federator/0.2.0-rc1/templates/_helpers.tpl @@ -0,0 +1,66 @@ +# Rancher +{{- define "system_default_registry" -}} +{{- if .Values.global.cattle.systemDefaultRegistry -}} +{{- printf "%s/" .Values.global.cattle.systemDefaultRegistry -}} +{{- end -}} +{{- end -}} + +# Windows Support + +{{/* +Windows cluster will add default taint for linux nodes, +add below linux tolerations to workloads could be scheduled to those linux nodes +*/}} + +{{- define "linux-node-tolerations" -}} +- key: "cattle.io/os" + value: "linux" + effect: "NoSchedule" + operator: "Equal" +{{- end -}} + +{{- define "linux-node-selector" -}} +{{- if semverCompare "<1.14-0" .Capabilities.KubeVersion.GitVersion -}} +beta.kubernetes.io/os: linux +{{- else -}} +kubernetes.io/os: linux +{{- end -}} +{{- end -}} + +# Helm Project Operator + +{{/* vim: set filetype=mustache: */}} +{{/* Expand the name of the chart. This is suffixed with -alertmanager, which means subtract 13 from longest 63 available */}} +{{- define "prometheus-federator.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 50 | trimSuffix "-" -}} +{{- end }} + +{{/* +Allow the release namespace to be overridden for multi-namespace deployments in combined charts +*/}} +{{- define "prometheus-federator.namespace" -}} + {{- if .Values.namespaceOverride -}} + {{- .Values.namespaceOverride -}} + {{- else -}} + {{- .Release.Namespace -}} + {{- end -}} +{{- end -}} + +{{/* Create chart name and version as used by the chart label. */}} +{{- define "prometheus-federator.chartref" -}} +{{- replace "+" "_" .Chart.Version | printf "%s-%s" .Chart.Name -}} +{{- end }} + +{{/* Generate basic labels */}} +{{- define "prometheus-federator.labels" }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +app.kubernetes.io/instance: {{ .Release.Name }} +app.kubernetes.io/version: "{{ replace "+" "_" .Chart.Version }}" +app.kubernetes.io/part-of: {{ template "prometheus-federator.name" . }} +chart: {{ template "prometheus-federator.chartref" . }} +release: {{ $.Release.Name | quote }} +heritage: {{ $.Release.Service | quote }} +{{- if .Values.commonLabels}} +{{ toYaml .Values.commonLabels }} +{{- end }} +{{- end }} diff --git a/charts/prometheus-federator/0.2.0-rc1/values.yaml b/charts/prometheus-federator/0.2.0-rc1/values.yaml new file mode 100644 index 00000000..f44a6def --- /dev/null +++ b/charts/prometheus-federator/0.2.0-rc1/values.yaml @@ -0,0 +1,92 @@ +# Default values for helm-project-operator. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +# Prometheus Federator Configuration + +global: + cattle: + systemDefaultRegistry: "" + projectLabel: field.cattle.io/projectId + clusterId: "" + systemProjectId: "" + url: "" + rbac: + pspEnabled: true + pspAnnotations: {} + ## Specify pod annotations + ## Ref: https://kubernetes.io/docs/concepts/policy/pod-security-policy/#apparmor + ## Ref: https://kubernetes.io/docs/concepts/policy/pod-security-policy/#seccomp + ## Ref: https://kubernetes.io/docs/concepts/policy/pod-security-policy/#sysctl + ## + # seccomp.security.alpha.kubernetes.io/allowedProfileNames: '*' + # seccomp.security.alpha.kubernetes.io/defaultProfileName: 'docker/default' + # apparmor.security.beta.kubernetes.io/defaultProfileName: 'runtime/default' + + ## Reference to one or more secrets to be used when pulling images + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ + ## + imagePullSecrets: [] + # - name: "image-pull-secret" + +helmProjectOperator: + enabled: true + + # ensures that all resources created by subchart show up as prometheus-federator + helmApiVersion: monitoring.cattle.io/v1alpha1 + + nameOverride: prometheus-federator + + helmController: + # Note: should be disabled for RKE2 clusters since they already run Helm Controller to manage internal Kubernetes components + enabled: true + + helmLocker: + enabled: true + + ## valuesOverride overrides values that are set on each Project Prometheus Stack Helm Chart deployment on an operator level + ## all values provided here will override any user-provided values automatically + valuesOverride: + + federate: + # Change this to point at all Prometheuses you want all your Project Prometheus Stacks to federate from + # By default, this matches the default deployment of Rancher Monitoring + targets: + - rancher-monitoring-prometheus.cattle-monitoring-system.svc:9090 + + image: + repository: rancher/prometheus-federator + tag: v0.2.0-rc1 + pullPolicy: IfNotPresent + + # Additional arguments to be passed into the Prometheus Federator image + additionalArgs: [] + + ## Define which Nodes the Pods are scheduled on. + ## ref: https://kubernetes.io/docs/user-guide/node-selection/ + ## + nodeSelector: {} + + ## Tolerations for use with node taints + ## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ + ## + tolerations: [] + # - key: "key" + # operator: "Equal" + # value: "value" + # effect: "NoSchedule" + + resources: {} + # limits: + # memory: 500Mi + # cpu: 1000m + # requests: + # memory: 100Mi + # cpu: 100m + + securityContext: {} + # allowPrivilegeEscalation: false + # readOnlyRootFilesystem: true + + debug: false + debugLevel: 0 \ No newline at end of file diff --git a/charts/rancher-project-monitoring/0.2.0-rc1/Chart.yaml b/charts/rancher-project-monitoring/0.2.0-rc1/Chart.yaml new file mode 100644 index 00000000..f4227bb0 --- /dev/null +++ b/charts/rancher-project-monitoring/0.2.0-rc1/Chart.yaml @@ -0,0 +1,33 @@ +annotations: + catalog.cattle.io/certified: rancher + catalog.cattle.io/display-name: Project Monitoring + catalog.cattle.io/hidden: "true" + catalog.cattle.io/kube-version: '>=1.16.0-0 < 1.25.0-0' + catalog.cattle.io/permits-os: linux,windows + catalog.cattle.io/rancher-version: '>= 2.6.5-0 <= 2.8.0-0' + catalog.cattle.io/release-name: rancher-project-monitoring +apiVersion: v2 +appVersion: 0.59.1 +dependencies: +- condition: grafana.enabled + name: grafana + repository: file://./charts/grafana +description: Collects several related Helm charts, Grafana dashboards, and Prometheus + rules combined with documentation and scripts to provide easy to operate end-to-end + Kubernetes cluster monitoring with Prometheus. Depends on the existence of a Cluster + Prometheus deployed via Prometheus Operator +home: https://github.com/prometheus-operator/kube-prometheus +icon: https://raw.githubusercontent.com/prometheus/prometheus.github.io/master/assets/prometheus_logo-cb55bb5c346.png +keywords: +- prometheus +- monitoring +kubeVersion: '>=1.16.0-0' +maintainers: +- email: arvind.iyengar@suse.com + name: Arvind +- email: amangeet.samra@suse.com + name: Geet + url: https://github.com/geethub97 +name: rancher-project-monitoring +type: application +version: 0.2.0-rc1 diff --git a/charts/rancher-project-monitoring/0.2.0-rc1/README.md b/charts/rancher-project-monitoring/0.2.0-rc1/README.md new file mode 100644 index 00000000..eab333c3 --- /dev/null +++ b/charts/rancher-project-monitoring/0.2.0-rc1/README.md @@ -0,0 +1,29 @@ +# rancher-project-monitoring + +This chart installs a project-scoped version of [`rancher-monitoring`](https://rancher.com/docs/rancher/v2.6/en/monitoring-alerting), a Helm chart based off of [`kube-prometheus stack`](https://github.com/prometheus-operator/kube-prometheus). It deploys a collection of Kubernetes manifests, [Grafana](http://grafana.com/) dashboards, and [Prometheus rules](https://prometheus.io/docs/prometheus/latest/configuration/recording_rules/) combined with documentation and scripts to provide easy to operate end-to-end Kubernetes project monitoring with [Prometheus](https://prometheus.io/) using the [Prometheus Operator](https://github.com/prometheus-operator/prometheus-operator). See the [kube-prometheus](https://github.com/prometheus-operator/kube-prometheus) README for details about components, dashboards, and alerts. + +## Prerequisites + +- Kubernetes 1.16+ +- Helm 3+ + +## Install Chart + +This chart is not intended for standalone use; it's intended to be deployed via [Prometheus Federator](https://github.com/rancher/prometheus-federator). For a Prometheus Stack intended to be deployed standalone, please use [rancher-monitoring](https://rancher.com/docs/rancher/v2.6/en/monitoring-alerting/) or the upstream [`kube-prometheus-stack`](https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack) project. + +## Dependencies + +This chart is designed to be deployed alongside an existing Prometheus Operator deployment in a cluster that has already installed the Prometheus Operator CRDs. Specifically, the chart is configured and intended to be deployed alongside [`rancher-monitoring`](https://rancher.com/docs/rancher/v2.6/en/monitoring-alerting/), which deploys Prometheus Operator alongside a Cluster Prometheus that `rancher-project-monitoring` is configured to federate namespace-scoped metrics from by default. + +### Configuration + +Since this chart installs a project-scoped version of [`rancher-monitoring`](https://rancher.com/docs/rancher/v2.6/en/monitoring-alerting/), a Helm chart based off of [`kube-prometheus-stack`](https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack), most of the options that apply to either of those charts will apply to this chart (e.g. support for configuring persistent volumes, ingresses, etc.) and can be passed in as part of the `spec.values` of the ProjectHelmChart that deploys this chart; however, certain advanced functionality (such as Thanos support) and options that pose security risks in Project environments (e.g. ability to `ignoreNamespaceSelectors` or modify the existing namepaceSelectors of the Cluster Prometheus, ability to mount additional scrape configs, etc.) have been removed from the `values.yaml` of the chart. For more information on how to configure values and what they mean, please see the comments and options provided on the `values.yaml` packaged with this chart. + +## Further Information + +For more in-depth documentation of configuration options meanings, please see + +- [`rancher-monitoring`](https://rancher.com/docs/rancher/v2.6/en/monitoring-alerting/) +- [Prometheus Operator](https://github.com/prometheus-operator/prometheus-operator) +- [Prometheus](https://prometheus.io/docs/introduction/overview/) +- [Grafana](https://github.com/grafana/helm-charts/tree/main/charts/grafana#grafana-helm-chart) \ No newline at end of file diff --git a/charts/rancher-project-monitoring/0.2.0-rc1/app-README.md b/charts/rancher-project-monitoring/0.2.0-rc1/app-README.md new file mode 100644 index 00000000..6b833291 --- /dev/null +++ b/charts/rancher-project-monitoring/0.2.0-rc1/app-README.md @@ -0,0 +1,10 @@ +# Rancher Project Monitoring and Alerting + +The chart installs a Project Monitoring Stack, which contains: +- [Prometheus](https://prometheus.io/) (managed externally by [Prometheus Operator](https://github.com/prometheus-operator/prometheus-operator)) +- [Alertmanager](https://prometheus.io/docs/alerting/latest/alertmanager/) (managed externally by [Prometheus Operator](https://github.com/prometheus-operator/prometheus-operator)) +- [Grafana](https://github.com/helm/charts/tree/master/stable/grafana) (deployed via an embedded Helm chart) +- Default PrometheusRules and Grafana dashboards based on the collection of community-curated resources from [kube-prometheus](https://github.com/prometheus-operator/kube-prometheus/) +- Default ServiceMonitors that watch the deployed resources + +Note: This chart is not intended for standalone use; it's intended to be deployed via [Prometheus Federator](https://github.com/rancher/prometheus-federator). \ No newline at end of file diff --git a/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/.helmignore b/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/.helmignore new file mode 100644 index 00000000..8cade131 --- /dev/null +++ b/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/.helmignore @@ -0,0 +1,23 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.vscode +.project +.idea/ +*.tmproj +OWNERS diff --git a/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/Chart.yaml b/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/Chart.yaml new file mode 100644 index 00000000..f5215183 --- /dev/null +++ b/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/Chart.yaml @@ -0,0 +1,29 @@ +annotations: + catalog.cattle.io/hidden: "true" + catalog.cattle.io/kube-version: '>= 1.16.0-0 < 1.25.0-0' + catalog.cattle.io/os: linux + catalog.rancher.io/certified: rancher + catalog.rancher.io/namespace: cattle-monitoring-system + catalog.rancher.io/release-name: rancher-grafana +apiVersion: v2 +appVersion: 9.1.5 +description: The leading tool for querying and visualizing time series and metrics. +home: https://grafana.net +icon: https://raw.githubusercontent.com/grafana/grafana/master/public/img/logo_transparent_400x.png +kubeVersion: ^1.8.0-0 +maintainers: +- email: zanhsieh@gmail.com + name: zanhsieh +- email: rluckie@cisco.com + name: rtluckie +- email: maor.friedman@redhat.com + name: maorfr +- email: miroslav.hadzhiev@gmail.com + name: Xtigyro +- email: mail@torstenwalter.de + name: torstenwalter +name: grafana +sources: +- https://github.com/grafana/grafana +type: application +version: 6.38.6 diff --git a/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/README.md b/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/README.md new file mode 100644 index 00000000..f3d31768 --- /dev/null +++ b/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/README.md @@ -0,0 +1,571 @@ +# Grafana Helm Chart + +* Installs the web dashboarding system [Grafana](http://grafana.org/) + +## Get Repo Info + +```console +helm repo add grafana https://grafana.github.io/helm-charts +helm repo update +``` + +_See [helm repo](https://helm.sh/docs/helm/helm_repo/) for command documentation._ + +## Installing the Chart + +To install the chart with the release name `my-release`: + +```console +helm install my-release grafana/grafana +``` + +## Uninstalling the Chart + +To uninstall/delete the my-release deployment: + +```console +helm delete my-release +``` + +The command removes all the Kubernetes components associated with the chart and deletes the release. + +## Upgrading an existing Release to a new major version + +A major chart version change (like v1.2.3 -> v2.0.0) indicates that there is an +incompatible breaking change needing manual actions. + +### To 4.0.0 (And 3.12.1) + +This version requires Helm >= 2.12.0. + +### To 5.0.0 + +You have to add --force to your helm upgrade command as the labels of the chart have changed. + +### To 6.0.0 + +This version requires Helm >= 3.1.0. + +## Configuration + +| Parameter | Description | Default | +|-------------------------------------------|-----------------------------------------------|---------------------------------------------------------| +| `replicas` | Number of nodes | `1` | +| `podDisruptionBudget.minAvailable` | Pod disruption minimum available | `nil` | +| `podDisruptionBudget.maxUnavailable` | Pod disruption maximum unavailable | `nil` | +| `deploymentStrategy` | Deployment strategy | `{ "type": "RollingUpdate" }` | +| `livenessProbe` | Liveness Probe settings | `{ "httpGet": { "path": "/api/health", "port": 3000 } "initialDelaySeconds": 60, "timeoutSeconds": 30, "failureThreshold": 10 }` | +| `readinessProbe` | Readiness Probe settings | `{ "httpGet": { "path": "/api/health", "port": 3000 } }`| +| `securityContext` | Deployment securityContext | `{"runAsUser": 472, "runAsGroup": 472, "fsGroup": 472}` | +| `priorityClassName` | Name of Priority Class to assign pods | `nil` | +| `image.repository` | Image repository | `grafana/grafana` | +| `image.tag` | Overrides the Grafana image tag whose default is the chart appVersion (`Must be >= 5.0.0`) | `` | +| `image.sha` | Image sha (optional) | `` | +| `image.pullPolicy` | Image pull policy | `IfNotPresent` | +| `image.pullSecrets` | Image pull secrets (can be templated) | `[]` | +| `service.enabled` | Enable grafana service | `true` | +| `service.type` | Kubernetes service type | `ClusterIP` | +| `service.port` | Kubernetes port where service is exposed | `80` | +| `service.portName` | Name of the port on the service | `service` | +| `service.appProtocol` | Adds the appProtocol field to the service | `` | +| `service.targetPort` | Internal service is port | `3000` | +| `service.nodePort` | Kubernetes service nodePort | `nil` | +| `service.annotations` | Service annotations (can be templated) | `{}` | +| `service.labels` | Custom labels | `{}` | +| `service.clusterIP` | internal cluster service IP | `nil` | +| `service.loadBalancerIP` | IP address to assign to load balancer (if supported) | `nil` | +| `service.loadBalancerSourceRanges` | list of IP CIDRs allowed access to lb (if supported) | `[]` | +| `service.externalIPs` | service external IP addresses | `[]` | +| `headlessService` | Create a headless service | `false` | +| `extraExposePorts` | Additional service ports for sidecar containers| `[]` | +| `hostAliases` | adds rules to the pod's /etc/hosts | `[]` | +| `ingress.enabled` | Enables Ingress | `false` | +| `ingress.annotations` | Ingress annotations (values are templated) | `{}` | +| `ingress.labels` | Custom labels | `{}` | +| `ingress.path` | Ingress accepted path | `/` | +| `ingress.pathType` | Ingress type of path | `Prefix` | +| `ingress.hosts` | Ingress accepted hostnames | `["chart-example.local"]` | +| `ingress.extraPaths` | Ingress extra paths to prepend to every host configuration. Useful when configuring [custom actions with AWS ALB Ingress Controller](https://kubernetes-sigs.github.io/aws-alb-ingress-controller/guide/ingress/annotation/#actions). Requires `ingress.hosts` to have one or more host entries. | `[]` | +| `ingress.tls` | Ingress TLS configuration | `[]` | +| `resources` | CPU/Memory resource requests/limits | `{}` | +| `nodeSelector` | Node labels for pod assignment | `{}` | +| `tolerations` | Toleration labels for pod assignment | `[]` | +| `affinity` | Affinity settings for pod assignment | `{}` | +| `extraInitContainers` | Init containers to add to the grafana pod | `{}` | +| `extraContainers` | Sidecar containers to add to the grafana pod | `""` | +| `extraContainerVolumes` | Volumes that can be mounted in sidecar containers | `[]` | +| `extraLabels` | Custom labels for all manifests | `{}` | +| `schedulerName` | Name of the k8s scheduler (other than default) | `nil` | +| `persistence.enabled` | Use persistent volume to store data | `false` | +| `persistence.type` | Type of persistence (`pvc` or `statefulset`) | `pvc` | +| `persistence.size` | Size of persistent volume claim | `10Gi` | +| `persistence.existingClaim` | Use an existing PVC to persist data (can be templated) | `nil` | +| `persistence.storageClassName` | Type of persistent volume claim | `nil` | +| `persistence.accessModes` | Persistence access modes | `[ReadWriteOnce]` | +| `persistence.annotations` | PersistentVolumeClaim annotations | `{}` | +| `persistence.finalizers` | PersistentVolumeClaim finalizers | `[ "kubernetes.io/pvc-protection" ]` | +| `persistence.subPath` | Mount a sub dir of the persistent volume (can be templated) | `nil` | +| `persistence.inMemory.enabled` | If persistence is not enabled, whether to mount the local storage in-memory to improve performance | `false` | +| `persistence.inMemory.sizeLimit` | SizeLimit for the in-memory local storage | `nil` | +| `initChownData.enabled` | If false, don't reset data ownership at startup | true | +| `initChownData.image.repository` | init-chown-data container image repository | `busybox` | +| `initChownData.image.tag` | init-chown-data container image tag | `1.31.1` | +| `initChownData.image.sha` | init-chown-data container image sha (optional)| `""` | +| `initChownData.image.pullPolicy` | init-chown-data container image pull policy | `IfNotPresent` | +| `initChownData.resources` | init-chown-data pod resource requests & limits | `{}` | +| `schedulerName` | Alternate scheduler name | `nil` | +| `env` | Extra environment variables passed to pods | `{}` | +| `envValueFrom` | Environment variables from alternate sources. See the API docs on [EnvVarSource](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.17/#envvarsource-v1-core) for format details. Can be templated | `{}` | +| `envFromSecret` | Name of a Kubernetes secret (must be manually created in the same namespace) containing values to be added to the environment. Can be templated | `""` | +| `envFromSecrets` | List of Kubernetes secrets (must be manually created in the same namespace) containing values to be added to the environment. Can be templated | `[]` | +| `envFromConfigMaps` | List of Kubernetes ConfigMaps (must be manually created in the same namespace) containing values to be added to the environment. Can be templated | `[]` | +| `envRenderSecret` | Sensible environment variables passed to pods and stored as secret | `{}` | +| `enableServiceLinks` | Inject Kubernetes services as environment variables. | `true` | +| `extraSecretMounts` | Additional grafana server secret mounts | `[]` | +| `extraVolumeMounts` | Additional grafana server volume mounts | `[]` | +| `createConfigmap` | Enable creating the grafana configmap | `true` | +| `extraConfigmapMounts` | Additional grafana server configMap volume mounts (values are templated) | `[]` | +| `extraEmptyDirMounts` | Additional grafana server emptyDir volume mounts | `[]` | +| `plugins` | Plugins to be loaded along with Grafana | `[]` | +| `datasources` | Configure grafana datasources (passed through tpl) | `{}` | +| `alerting` | Configure grafana alerting (passed through tpl) | `{}` | +| `notifiers` | Configure grafana notifiers | `{}` | +| `dashboardProviders` | Configure grafana dashboard providers | `{}` | +| `dashboards` | Dashboards to import | `{}` | +| `dashboardsConfigMaps` | ConfigMaps reference that contains dashboards | `{}` | +| `grafana.ini` | Grafana's primary configuration | `{}` | +| `ldap.enabled` | Enable LDAP authentication | `false` | +| `ldap.existingSecret` | The name of an existing secret containing the `ldap.toml` file, this must have the key `ldap-toml`. | `""` | +| `ldap.config` | Grafana's LDAP configuration | `""` | +| `annotations` | Deployment annotations | `{}` | +| `labels` | Deployment labels | `{}` | +| `podAnnotations` | Pod annotations | `{}` | +| `podLabels` | Pod labels | `{}` | +| `podPortName` | Name of the grafana port on the pod | `grafana` | +| `lifecycleHooks` | Lifecycle hooks for podStart and preStop [Example](https://kubernetes.io/docs/tasks/configure-pod-container/attach-handler-lifecycle-event/#define-poststart-and-prestop-handlers) | `{}` | +| `sidecar.image.repository` | Sidecar image repository | `quay.io/kiwigrid/k8s-sidecar` | +| `sidecar.image.tag` | Sidecar image tag | `1.19.2` | +| `sidecar.image.sha` | Sidecar image sha (optional) | `""` | +| `sidecar.imagePullPolicy` | Sidecar image pull policy | `IfNotPresent` | +| `sidecar.resources` | Sidecar resources | `{}` | +| `sidecar.securityContext` | Sidecar securityContext | `{}` | +| `sidecar.enableUniqueFilenames` | Sets the kiwigrid/k8s-sidecar UNIQUE_FILENAMES environment variable. If set to `true` the sidecar will create unique filenames where duplicate data keys exist between ConfigMaps and/or Secrets within the same or multiple Namespaces. | `false` | +| `sidecar.dashboards.enabled` | Enables the cluster wide search for dashboards and adds/updates/deletes them in grafana | `false` | +| `sidecar.dashboards.SCProvider` | Enables creation of sidecar provider | `true` | +| `sidecar.dashboards.provider.name` | Unique name of the grafana provider | `sidecarProvider` | +| `sidecar.dashboards.provider.orgid` | Id of the organisation, to which the dashboards should be added | `1` | +| `sidecar.dashboards.provider.folder` | Logical folder in which grafana groups dashboards | `""` | +| `sidecar.dashboards.provider.disableDelete` | Activate to avoid the deletion of imported dashboards | `false` | +| `sidecar.dashboards.provider.allowUiUpdates` | Allow updating provisioned dashboards from the UI | `false` | +| `sidecar.dashboards.provider.type` | Provider type | `file` | +| `sidecar.dashboards.provider.foldersFromFilesStructure` | Allow Grafana to replicate dashboard structure from filesystem. | `false` | +| `sidecar.dashboards.watchMethod` | Method to use to detect ConfigMap changes. With WATCH the sidecar will do a WATCH requests, with SLEEP it will list all ConfigMaps, then sleep for 60 seconds. | `WATCH` | +| `sidecar.skipTlsVerify` | Set to true to skip tls verification for kube api calls | `nil` | +| `sidecar.dashboards.label` | Label that config maps with dashboards should have to be added | `grafana_dashboard` | +| `sidecar.dashboards.labelValue` | Label value that config maps with dashboards should have to be added | `""` | +| `sidecar.dashboards.folder` | Folder in the pod that should hold the collected dashboards (unless `sidecar.dashboards.defaultFolderName` is set). This path will be mounted. | `/tmp/dashboards` | +| `sidecar.dashboards.folderAnnotation` | The annotation the sidecar will look for in configmaps to override the destination folder for files | `nil` | +| `sidecar.dashboards.defaultFolderName` | The default folder name, it will create a subfolder under the `sidecar.dashboards.folder` and put dashboards in there instead | `nil` | +| `sidecar.dashboards.script` | Absolute path to shell script to execute after a configmap got reloaded. | `nil` | +| `sidecar.dashboards.resource` | Should the sidecar looks into secrets, configmaps or both. | `both` | +| `sidecar.dashboards.extraMounts` | Additional dashboard sidecar volume mounts. | `[]` | +| `sidecar.datasources.enabled` | Enables the cluster wide search for datasources and adds/updates/deletes them in grafana |`false` | +| `sidecar.datasources.label` | Label that config maps with datasources should have to be added | `grafana_datasource` | +| `sidecar.datasources.labelValue` | Label value that config maps with datasources should have to be added | `""` | +| `sidecar.datasources.resource` | Should the sidecar looks into secrets, configmaps or both. | `both` | +| `sidecar.datasources.reloadURL` | Full url of datasource configuration reload API endpoint, to invoke after a config-map change | `"http://localhost:3000/api/admin/provisioning/datasources/reload"` | +| `sidecar.datasources.skipReload` | Enabling this omits defining the REQ_URL and REQ_METHOD environment variables | `false` | +| `sidecar.notifiers.enabled` | Enables the cluster wide search for notifiers and adds/updates/deletes them in grafana | `false` | +| `sidecar.notifiers.label` | Label that config maps with notifiers should have to be added | `grafana_notifier` | +| `sidecar.notifiers.resource` | Should the sidecar looks into secrets, configmaps or both. | `both` | +| `smtp.existingSecret` | The name of an existing secret containing the SMTP credentials. | `""` | +| `smtp.userKey` | The key in the existing SMTP secret containing the username. | `"user"` | +| `smtp.passwordKey` | The key in the existing SMTP secret containing the password. | `"password"` | +| `admin.existingSecret` | The name of an existing secret containing the admin credentials (can be templated). | `""` | +| `admin.userKey` | The key in the existing admin secret containing the username. | `"admin-user"` | +| `admin.passwordKey` | The key in the existing admin secret containing the password. | `"admin-password"` | +| `serviceAccount.autoMount` | Automount the service account token in the pod| `true` | +| `serviceAccount.annotations` | ServiceAccount annotations | | +| `serviceAccount.create` | Create service account | `true` | +| `serviceAccount.name` | Service account name to use, when empty will be set to created account if `serviceAccount.create` is set else to `default` | `` | +| `serviceAccount.nameTest` | Service account name to use for test, when empty will be set to created account if `serviceAccount.create` is set else to `default` | `nil` | +| `rbac.create` | Create and use RBAC resources | `true` | +| `rbac.namespaced` | Creates Role and Rolebinding instead of the default ClusterRole and ClusteRoleBindings for the grafana instance | `false` | +| `rbac.useExistingRole` | Set to a rolename to use existing role - skipping role creating - but still doing serviceaccount and rolebinding to the rolename set here. | `nil` | +| `rbac.pspEnabled` | Create PodSecurityPolicy (with `rbac.create`, grant roles permissions as well) | `true` | +| `rbac.pspUseAppArmor` | Enforce AppArmor in created PodSecurityPolicy (requires `rbac.pspEnabled`) | `true` | +| `rbac.extraRoleRules` | Additional rules to add to the Role | [] | +| `rbac.extraClusterRoleRules` | Additional rules to add to the ClusterRole | [] | +| `command` | Define command to be executed by grafana container at startup | `nil` | +| `testFramework.enabled` | Whether to create test-related resources | `true` | +| `testFramework.image` | `test-framework` image repository. | `bats/bats` | +| `testFramework.tag` | `test-framework` image tag. | `v1.4.1` | +| `testFramework.imagePullPolicy` | `test-framework` image pull policy. | `IfNotPresent` | +| `testFramework.securityContext` | `test-framework` securityContext | `{}` | +| `downloadDashboards.env` | Environment variables to be passed to the `download-dashboards` container | `{}` | +| `downloadDashboards.envFromSecret` | Name of a Kubernetes secret (must be manually created in the same namespace) containing values to be added to the environment. Can be templated | `""` | +| `downloadDashboards.resources` | Resources of `download-dashboards` container | `{}` | +| `downloadDashboardsImage.repository` | Curl docker image repo | `curlimages/curl` | +| `downloadDashboardsImage.tag` | Curl docker image tag | `7.73.0` | +| `downloadDashboardsImage.sha` | Curl docker image sha (optional) | `""` | +| `downloadDashboardsImage.pullPolicy` | Curl docker image pull policy | `IfNotPresent` | +| `namespaceOverride` | Override the deployment namespace | `""` (`Release.Namespace`) | +| `serviceMonitor.enabled` | Use servicemonitor from prometheus operator | `false` | +| `serviceMonitor.namespace` | Namespace this servicemonitor is installed in | | +| `serviceMonitor.interval` | How frequently Prometheus should scrape | `1m` | +| `serviceMonitor.path` | Path to scrape | `/metrics` | +| `serviceMonitor.scheme` | Scheme to use for metrics scraping | `http` | +| `serviceMonitor.tlsConfig` | TLS configuration block for the endpoint | `{}` | +| `serviceMonitor.labels` | Labels for the servicemonitor passed to Prometheus Operator | `{}` | +| `serviceMonitor.scrapeTimeout` | Timeout after which the scrape is ended | `30s` | +| `serviceMonitor.relabelings` | MetricRelabelConfigs to apply to samples before ingestion. | `[]` | +| `revisionHistoryLimit` | Number of old ReplicaSets to retain | `10` | +| `imageRenderer.enabled` | Enable the image-renderer deployment & service | `false` | +| `imageRenderer.image.repository` | image-renderer Image repository | `grafana/grafana-image-renderer` | +| `imageRenderer.image.tag` | image-renderer Image tag | `latest` | +| `imageRenderer.image.sha` | image-renderer Image sha (optional) | `""` | +| `imageRenderer.image.pullPolicy` | image-renderer ImagePullPolicy | `Always` | +| `imageRenderer.env` | extra env-vars for image-renderer | `{}` | +| `imageRenderer.serviceAccountName` | image-renderer deployment serviceAccountName | `""` | +| `imageRenderer.securityContext` | image-renderer deployment securityContext | `{}` | +| `imageRenderer.hostAliases` | image-renderer deployment Host Aliases | `[]` | +| `imageRenderer.priorityClassName` | image-renderer deployment priority class | `''` | +| `imageRenderer.service.enabled` | Enable the image-renderer service | `true` | +| `imageRenderer.service.portName` | image-renderer service port name | `http` | +| `imageRenderer.service.port` | image-renderer port used by deployment | `8081` | +| `imageRenderer.service.targetPort` | image-renderer service port used by service | `8081` | +| `imageRenderer.appProtocol` | Adds the appProtocol field to the service | `` | +| `imageRenderer.grafanaSubPath` | Grafana sub path to use for image renderer callback url | `''` | +| `imageRenderer.podPortName` | name of the image-renderer port on the pod | `http` | +| `imageRenderer.revisionHistoryLimit` | number of image-renderer replica sets to keep | `10` | +| `imageRenderer.networkPolicy.limitIngress` | Enable a NetworkPolicy to limit inbound traffic from only the created grafana pods | `true` | +| `imageRenderer.networkPolicy.limitEgress` | Enable a NetworkPolicy to limit outbound traffic to only the created grafana pods | `false` | +| `imageRenderer.resources` | Set resource limits for image-renderer pdos | `{}` | +| `imageRenderer.nodeSelector` | Node labels for pod assignment | `{}` | +| `imageRenderer.tolerations` | Toleration labels for pod assignment | `[]` | +| `imageRenderer.affinity` | Affinity settings for pod assignment | `{}` | +| `networkPolicy.enabled` | Enable creation of NetworkPolicy resources. | `false` | +| `networkPolicy.allowExternal` | Don't require client label for connections | `true` | +| `networkPolicy.explicitNamespacesSelector` | A Kubernetes LabelSelector to explicitly select namespaces from which traffic could be allowed | `{}` | +| `networkPolicy.ingress` | Enable the creation of an ingress network policy | `true` | +| `networkPolicy.egress.enabled` | Enable the creation of an egress network policy | `false` | +| `networkPolicy.egress.ports` | An array of ports to allow for the egress | `[]` | +| `enableKubeBackwardCompatibility` | Enable backward compatibility of kubernetes where pod's defintion version below 1.13 doesn't have the enableServiceLinks option | `false` | + + + +### Example ingress with path + +With grafana 6.3 and above +```yaml +grafana.ini: + server: + domain: monitoring.example.com + root_url: "%(protocol)s://%(domain)s/grafana" + serve_from_sub_path: true +ingress: + enabled: true + hosts: + - "monitoring.example.com" + path: "/grafana" +``` + +### Example of extraVolumeMounts + +Volume can be type persistentVolumeClaim or hostPath but not both at same time. +If neither existingClaim or hostPath argument is given then type is emptyDir. + +```yaml +- extraVolumeMounts: + - name: plugins + mountPath: /var/lib/grafana/plugins + subPath: configs/grafana/plugins + existingClaim: existing-grafana-claim + readOnly: false + - name: dashboards + mountPath: /var/lib/grafana/dashboards + hostPath: /usr/shared/grafana/dashboards + readOnly: false +``` + +## Import dashboards + +There are a few methods to import dashboards to Grafana. Below are some examples and explanations as to how to use each method: + +```yaml +dashboards: + default: + some-dashboard: + json: | + { + "annotations": + + ... + # Complete json file here + ... + + "title": "Some Dashboard", + "uid": "abcd1234", + "version": 1 + } + custom-dashboard: + # This is a path to a file inside the dashboards directory inside the chart directory + file: dashboards/custom-dashboard.json + prometheus-stats: + # Ref: https://grafana.com/dashboards/2 + gnetId: 2 + revision: 2 + datasource: Prometheus + local-dashboard: + url: https://raw.githubusercontent.com/user/repository/master/dashboards/dashboard.json +``` + +## BASE64 dashboards + +Dashboards could be stored on a server that does not return JSON directly and instead of it returns a Base64 encoded file (e.g. Gerrit) +A new parameter has been added to the url use case so if you specify a b64content value equals to true after the url entry a Base64 decoding is applied before save the file to disk. +If this entry is not set or is equals to false not decoding is applied to the file before saving it to disk. + +### Gerrit use case + +Gerrit API for download files has the following schema: where {project-name} and +{file-id} usually has '/' in their values and so they MUST be replaced by %2F so if project-name is user/repo, branch-id is master and file-id is equals to dir1/dir2/dashboard +the url value is + +## Sidecar for dashboards + +If the parameter `sidecar.dashboards.enabled` is set, a sidecar container is deployed in the grafana +pod. This container watches all configmaps (or secrets) in the cluster and filters out the ones with +a label as defined in `sidecar.dashboards.label`. The files defined in those configmaps are written +to a folder and accessed by grafana. Changes to the configmaps are monitored and the imported +dashboards are deleted/updated. + +A recommendation is to use one configmap per dashboard, as a reduction of multiple dashboards inside +one configmap is currently not properly mirrored in grafana. + +Example dashboard config: + +```yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: sample-grafana-dashboard + labels: + grafana_dashboard: "1" +data: + k8s-dashboard.json: |- + [...] +``` + +## Sidecar for datasources + +If the parameter `sidecar.datasources.enabled` is set, an init container is deployed in the grafana +pod. This container lists all secrets (or configmaps, though not recommended) in the cluster and +filters out the ones with a label as defined in `sidecar.datasources.label`. The files defined in +those secrets are written to a folder and accessed by grafana on startup. Using these yaml files, +the data sources in grafana can be imported. + +Secrets are recommended over configmaps for this usecase because datasources usually contain private +data like usernames and passwords. Secrets are the more appropriate cluster resource to manage those. + +Example values to add a datasource adapted from [Grafana](http://docs.grafana.org/administration/provisioning/#example-datasource-config-file): + +```yaml +datasources: + datasources.yaml: + apiVersion: 1 + datasources: + # name of the datasource. Required + - name: Graphite + # datasource type. Required + type: graphite + # access mode. proxy or direct (Server or Browser in the UI). Required + access: proxy + # org id. will default to orgId 1 if not specified + orgId: 1 + # url + url: http://localhost:8080 + # database password, if used + password: + # database user, if used + user: + # database name, if used + database: + # enable/disable basic auth + basicAuth: + # basic auth username + basicAuthUser: + # basic auth password + basicAuthPassword: + # enable/disable with credentials headers + withCredentials: + # mark as default datasource. Max one per org + isDefault: + # fields that will be converted to json and stored in json_data + jsonData: + graphiteVersion: "1.1" + tlsAuth: true + tlsAuthWithCACert: true + # json object of data that will be encrypted. + secureJsonData: + tlsCACert: "..." + tlsClientCert: "..." + tlsClientKey: "..." + version: 1 + # allow users to edit datasources from the UI. + editable: false +``` + +## Sidecar for notifiers + +If the parameter `sidecar.notifiers.enabled` is set, an init container is deployed in the grafana +pod. This container lists all secrets (or configmaps, though not recommended) in the cluster and +filters out the ones with a label as defined in `sidecar.notifiers.label`. The files defined in +those secrets are written to a folder and accessed by grafana on startup. Using these yaml files, +the notification channels in grafana can be imported. The secrets must be created before +`helm install` so that the notifiers init container can list the secrets. + +Secrets are recommended over configmaps for this usecase because alert notification channels usually contain +private data like SMTP usernames and passwords. Secrets are the more appropriate cluster resource to manage those. + +Example datasource config adapted from [Grafana](https://grafana.com/docs/grafana/latest/administration/provisioning/#alert-notification-channels): + +```yaml +notifiers: + - name: notification-channel-1 + type: slack + uid: notifier1 + # either + org_id: 2 + # or + org_name: Main Org. + is_default: true + send_reminder: true + frequency: 1h + disable_resolve_message: false + # See `Supported Settings` section for settings supporter for each + # alert notification type. + settings: + recipient: 'XXX' + token: 'xoxb' + uploadImage: true + url: https://slack.com + +delete_notifiers: + - name: notification-channel-1 + uid: notifier1 + org_id: 2 + - name: notification-channel-2 + # default org_id: 1 +``` + +## How to serve Grafana with a path prefix (/grafana) + +In order to serve Grafana with a prefix (e.g., ), add the following to your values.yaml. + +```yaml +ingress: + enabled: true + annotations: + kubernetes.io/ingress.class: "nginx" + nginx.ingress.kubernetes.io/rewrite-target: /$1 + nginx.ingress.kubernetes.io/use-regex: "true" + + path: /grafana/?(.*) + hosts: + - k8s.example.dev + +grafana.ini: + server: + root_url: http://localhost:3000/grafana # this host can be localhost +``` + +## How to securely reference secrets in grafana.ini + +This example uses Grafana [file providers](https://grafana.com/docs/grafana/latest/administration/configuration/#file-provider) for secret values and the `extraSecretMounts` configuration flag (Additional grafana server secret mounts) to mount the secrets. + +In grafana.ini: + +```yaml +grafana.ini: + [auth.generic_oauth] + enabled = true + client_id = $__file{/etc/secrets/auth_generic_oauth/client_id} + client_secret = $__file{/etc/secrets/auth_generic_oauth/client_secret} +``` + +Existing secret, or created along with helm: + +```yaml +--- +apiVersion: v1 +kind: Secret +metadata: + name: auth-generic-oauth-secret +type: Opaque +stringData: + client_id: + client_secret: +``` + +Include in the `extraSecretMounts` configuration flag: + +```yaml +- extraSecretMounts: + - name: auth-generic-oauth-secret-mount + secretName: auth-generic-oauth-secret + defaultMode: 0440 + mountPath: /etc/secrets/auth_generic_oauth + readOnly: true +``` + +### extraSecretMounts using a Container Storage Interface (CSI) provider + +This example uses a CSI driver e.g. retrieving secrets using [Azure Key Vault Provider](https://github.com/Azure/secrets-store-csi-driver-provider-azure) + +```yaml +- extraSecretMounts: + - name: secrets-store-inline + mountPath: /run/secrets + readOnly: true + csi: + driver: secrets-store.csi.k8s.io + readOnly: true + volumeAttributes: + secretProviderClass: "my-provider" + nodePublishSecretRef: + name: akv-creds +``` + +## Image Renderer Plug-In + +This chart supports enabling [remote image rendering](https://github.com/grafana/grafana-image-renderer/blob/master/README.md#run-in-docker) + +```yaml +imageRenderer: + enabled: true +``` + +### Image Renderer NetworkPolicy + +By default the image-renderer pods will have a network policy which only allows ingress traffic from the created grafana instance + +### High Availability for unified alerting + +If you want to run Grafana in a high availability cluster you need to enable +the headless service by setting `headlessService: true` in your `values.yaml` +file. + +As next step you have to setup the `grafana.ini` in your `values.yaml` in a way +that it will make use of the headless service to obtain all the IPs of the +cluster. You should replace ``{{ Name }}`` with the name of your helm deployment. + +```yaml +grafana.ini: + ... + unified_alerting: + enabled: true + ha_peers: {{ Name }}-headless:9094 + alerting: + enabled: false +``` diff --git a/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/dashboards/custom-dashboard.json b/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/dashboards/custom-dashboard.json new file mode 100644 index 00000000..9e26dfee --- /dev/null +++ b/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/dashboards/custom-dashboard.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/NOTES.txt b/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/NOTES.txt new file mode 100644 index 00000000..1fc8436d --- /dev/null +++ b/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/NOTES.txt @@ -0,0 +1,54 @@ +1. Get your '{{ .Values.adminUser }}' user password by running: + + kubectl get secret --namespace {{ template "grafana.namespace" . }} {{ template "grafana.fullname" . }} -o jsonpath="{.data.admin-password}" | base64 --decode ; echo + +2. The Grafana server can be accessed via port {{ .Values.service.port }} on the following DNS name from within your cluster: + + {{ template "grafana.fullname" . }}.{{ template "grafana.namespace" . }}.svc.cluster.local +{{ if .Values.ingress.enabled }} + If you bind grafana to 80, please update values in values.yaml and reinstall: + ``` + securityContext: + runAsUser: 0 + runAsGroup: 0 + fsGroup: 0 + + command: + - "setcap" + - "'cap_net_bind_service=+ep'" + - "/usr/sbin/grafana-server &&" + - "sh" + - "/run.sh" + ``` + Details refer to https://grafana.com/docs/installation/configuration/#http-port. + Or grafana would always crash. + + From outside the cluster, the server URL(s) are: +{{- range .Values.ingress.hosts }} + http://{{ . }} +{{- end }} +{{ else }} + Get the Grafana URL to visit by running these commands in the same shell: +{{ if contains "NodePort" .Values.service.type -}} + export NODE_PORT=$(kubectl get --namespace {{ template "grafana.namespace" . }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "grafana.fullname" . }}) + export NODE_IP=$(kubectl get nodes --namespace {{ template "grafana.namespace" . }} -o jsonpath="{.items[0].status.addresses[0].address}") + echo http://$NODE_IP:$NODE_PORT +{{ else if contains "LoadBalancer" .Values.service.type -}} + NOTE: It may take a few minutes for the LoadBalancer IP to be available. + You can watch the status of by running 'kubectl get svc --namespace {{ template "grafana.namespace" . }} -w {{ template "grafana.fullname" . }}' + export SERVICE_IP=$(kubectl get svc --namespace {{ template "grafana.namespace" . }} {{ template "grafana.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}') + http://$SERVICE_IP:{{ .Values.service.port -}} +{{ else if contains "ClusterIP" .Values.service.type }} + export POD_NAME=$(kubectl get pods --namespace {{ template "grafana.namespace" . }} -l "app.kubernetes.io/name={{ template "grafana.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") + kubectl --namespace {{ template "grafana.namespace" . }} port-forward $POD_NAME 3000 +{{- end }} +{{- end }} + +3. Login with the password from step 1 and the username: {{ .Values.adminUser }} + +{{- if not .Values.persistence.enabled }} +################################################################################# +###### WARNING: Persistence is disabled!!! You will lose your data when ##### +###### the Grafana pod is terminated. ##### +################################################################################# +{{- end }} diff --git a/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/_helpers.tpl b/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/_helpers.tpl new file mode 100644 index 00000000..05458114 --- /dev/null +++ b/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/_helpers.tpl @@ -0,0 +1,203 @@ +# Rancher +{{- define "system_default_registry" -}} +{{- if .Values.global.cattle.systemDefaultRegistry -}} +{{- printf "%s/" .Values.global.cattle.systemDefaultRegistry -}} +{{- end -}} +{{- end -}} + +# Windows Support + +{{/* +Windows cluster will add default taint for linux nodes, +add below linux tolerations to workloads could be scheduled to those linux nodes +*/}} + +{{- define "linux-node-tolerations" -}} +- key: "cattle.io/os" + value: "linux" + effect: "NoSchedule" + operator: "Equal" +{{- end -}} + +{{- define "linux-node-selector" -}} +{{- if semverCompare "<1.14-0" .Capabilities.KubeVersion.GitVersion -}} +beta.kubernetes.io/os: linux +{{- else -}} +kubernetes.io/os: linux +{{- end -}} +{{- end -}} + +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "grafana.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "grafana.fullname" -}} +{{- if .Values.fullnameOverride -}} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "grafana.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create the name of the service account +*/}} +{{- define "grafana.serviceAccountName" -}} +{{- if .Values.serviceAccount.create -}} + {{ default (include "grafana.fullname" .) .Values.serviceAccount.name }} +{{- else -}} + {{ default "default" .Values.serviceAccount.name }} +{{- end -}} +{{- end -}} + +{{- define "grafana.serviceAccountNameTest" -}} +{{- if .Values.serviceAccount.create -}} + {{ default (print (include "grafana.fullname" .) "-test") .Values.serviceAccount.nameTest }} +{{- else -}} + {{ default "default" .Values.serviceAccount.nameTest }} +{{- end -}} +{{- end -}} + +{{/* +Allow the release namespace to be overridden for multi-namespace deployments in combined charts +*/}} +{{- define "grafana.namespace" -}} + {{- if .Values.namespaceOverride -}} + {{- .Values.namespaceOverride -}} + {{- else -}} + {{- .Release.Namespace -}} + {{- end -}} +{{- end -}} + +{{/* +Common labels +*/}} +{{- define "grafana.labels" -}} +helm.sh/chart: {{ include "grafana.chart" . }} +{{ include "grafana.selectorLabels" . }} +{{- if or .Chart.AppVersion .Values.image.tag }} +app.kubernetes.io/version: {{ .Values.image.tag | default .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- if .Values.extraLabels }} +{{ toYaml .Values.extraLabels }} +{{- end }} +{{- end -}} + +{{/* +Selector labels +*/}} +{{- define "grafana.selectorLabels" -}} +app.kubernetes.io/name: {{ include "grafana.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end -}} + +{{/* +Common labels +*/}} +{{- define "grafana.imageRenderer.labels" -}} +helm.sh/chart: {{ include "grafana.chart" . }} +{{ include "grafana.imageRenderer.selectorLabels" . }} +{{- if or .Chart.AppVersion .Values.image.tag }} +app.kubernetes.io/version: {{ .Values.image.tag | default .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end -}} + +{{/* +Selector labels ImageRenderer +*/}} +{{- define "grafana.imageRenderer.selectorLabels" -}} +app.kubernetes.io/name: {{ include "grafana.name" . }}-image-renderer +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end -}} + +{{/* +Looks if there's an existing secret and reuse its password. If not it generates +new password and use it. +*/}} +{{- define "grafana.password" -}} +{{- $secret := (lookup "v1" "Secret" (include "grafana.namespace" .) (include "grafana.fullname" .) ) -}} + {{- if $secret -}} + {{- index $secret "data" "admin-password" -}} + {{- else -}} + {{- (randAlphaNum 40) | b64enc | quote -}} + {{- end -}} +{{- end -}} + +{{/* +Return the appropriate apiVersion for rbac. +*/}} +{{- define "grafana.rbac.apiVersion" -}} + {{- if .Capabilities.APIVersions.Has "rbac.authorization.k8s.io/v1" }} + {{- print "rbac.authorization.k8s.io/v1" -}} + {{- else -}} + {{- print "rbac.authorization.k8s.io/v1beta1" -}} + {{- end -}} +{{- end -}} + +{{/* +Return the appropriate apiVersion for ingress. +*/}} +{{- define "grafana.ingress.apiVersion" -}} + {{- if and (.Capabilities.APIVersions.Has "networking.k8s.io/v1") (semverCompare ">= 1.19-0" .Capabilities.KubeVersion.Version) -}} + {{- print "networking.k8s.io/v1" -}} + {{- else if .Capabilities.APIVersions.Has "networking.k8s.io/v1beta1" -}} + {{- print "networking.k8s.io/v1beta1" -}} + {{- else -}} + {{- print "extensions/v1beta1" -}} + {{- end -}} +{{- end -}} + +{{/* +Return the appropriate apiVersion for podDisruptionBudget. +*/}} +{{- define "grafana.podDisruptionBudget.apiVersion" -}} + {{- if $.Capabilities.APIVersions.Has "policy/v1/PodDisruptionBudget" -}} + {{- print "policy/v1" -}} + {{- else -}} + {{- print "policy/v1beta1" -}} + {{- end -}} +{{- end -}} + +{{/* +Return if ingress is stable. +*/}} +{{- define "grafana.ingress.isStable" -}} + {{- eq (include "grafana.ingress.apiVersion" .) "networking.k8s.io/v1" -}} +{{- end -}} + +{{/* +Return if ingress supports ingressClassName. +*/}} +{{- define "grafana.ingress.supportsIngressClassName" -}} + {{- or (eq (include "grafana.ingress.isStable" .) "true") (and (eq (include "grafana.ingress.apiVersion" .) "networking.k8s.io/v1beta1") (semverCompare ">= 1.18-0" .Capabilities.KubeVersion.Version)) -}} +{{- end -}} + +{{/* +Return if ingress supports pathType. +*/}} +{{- define "grafana.ingress.supportsPathType" -}} + {{- or (eq (include "grafana.ingress.isStable" .) "true") (and (eq (include "grafana.ingress.apiVersion" .) "networking.k8s.io/v1beta1") (semverCompare ">= 1.18-0" .Capabilities.KubeVersion.Version)) -}} +{{- end -}} diff --git a/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/_pod.tpl b/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/_pod.tpl new file mode 100644 index 00000000..ae36c28a --- /dev/null +++ b/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/_pod.tpl @@ -0,0 +1,885 @@ +{{- define "grafana.pod" -}} +{{- if .Values.schedulerName }} +schedulerName: "{{ .Values.schedulerName }}" +{{- end }} +serviceAccountName: {{ template "grafana.serviceAccountName" . }} +automountServiceAccountToken: {{ .Values.serviceAccount.autoMount }} +{{- with .Values.securityContext }} +securityContext: + {{- toYaml . | nindent 2 }} +{{- end }} +{{- with .Values.hostAliases }} +hostAliases: + {{- toYaml . | nindent 2 }} +{{- end }} +{{- if .Values.priorityClassName }} +priorityClassName: {{ .Values.priorityClassName }} +{{- end }} +{{- if ( or .Values.persistence.enabled .Values.dashboards .Values.sidecar.notifiers.enabled .Values.extraInitContainers (and .Values.sidecar.datasources.enabled .Values.sidecar.datasources.initDatasources)) }} +initContainers: +{{- end }} +{{- if ( and .Values.persistence.enabled .Values.initChownData.enabled ) }} + - name: init-chown-data + {{- if .Values.initChownData.image.sha }} + image: "{{ template "system_default_registry" . }}{{ .Values.initChownData.image.repository }}:{{ .Values.initChownData.image.tag }}@sha256:{{ .Values.initChownData.image.sha }}" + {{- else }} + image: "{{ template "system_default_registry" . }}{{ .Values.initChownData.image.repository }}:{{ .Values.initChownData.image.tag }}" + {{- end }} + imagePullPolicy: {{ .Values.initChownData.image.pullPolicy }} + securityContext: + runAsNonRoot: false + runAsUser: 0 + command: ["chown", "-R", "{{ .Values.securityContext.runAsUser }}:{{ .Values.securityContext.runAsGroup }}", "/var/lib/grafana"] + {{- with .Values.initChownData.resources }} + resources: + {{- toYaml . | nindent 6 }} + {{- end }} + volumeMounts: + - name: storage + mountPath: "/var/lib/grafana" +{{- if .Values.persistence.subPath }} + subPath: {{ tpl .Values.persistence.subPath . }} +{{- end }} +{{- end }} +{{- if .Values.dashboards }} + - name: download-dashboards + {{- if .Values.downloadDashboardsImage.sha }} + image: "{{ template "system_default_registry" . }}{{ .Values.downloadDashboardsImage.repository }}:{{ .Values.downloadDashboardsImage.tag }}@sha256:{{ .Values.downloadDashboardsImage.sha }}" + {{- else }} + image: "{{ template "system_default_registry" . }}{{ .Values.downloadDashboardsImage.repository }}:{{ .Values.downloadDashboardsImage.tag }}" + {{- end }} + imagePullPolicy: {{ .Values.downloadDashboardsImage.pullPolicy }} + command: ["/bin/sh"] + args: [ "-c", "mkdir -p /var/lib/grafana/dashboards/default && /bin/sh -x /etc/grafana/download_dashboards.sh" ] + {{- with .Values.downloadDashboards.resources }} + resources: + {{- toYaml . | nindent 6 }} + {{- end }} + env: +{{- range $key, $value := .Values.downloadDashboards.env }} + - name: "{{ $key }}" + value: "{{ $value }}" +{{- end }} + {{- with .Values.downloadDashboards.securityContext }} + securityContext: + {{- toYaml . | nindent 6 }} + {{- end }} +{{- if .Values.downloadDashboards.envFromSecret }} + envFrom: + - secretRef: + name: {{ tpl .Values.downloadDashboards.envFromSecret . }} +{{- end }} + volumeMounts: + - name: config + mountPath: "/etc/grafana/download_dashboards.sh" + subPath: download_dashboards.sh + - name: storage + mountPath: "/var/lib/grafana" +{{- if .Values.persistence.subPath }} + subPath: {{ tpl .Values.persistence.subPath . }} +{{- end }} + {{- range .Values.extraSecretMounts }} + - name: {{ .name }} + mountPath: {{ .mountPath }} + readOnly: {{ .readOnly }} + {{- end }} +{{- end }} +{{- if and .Values.sidecar.datasources.enabled .Values.sidecar.datasources.initDatasources }} + - name: {{ template "grafana.name" . }}-init-sc-datasources + {{- if .Values.sidecar.image.sha }} + image: "{{ template "system_default_registry" . }}{{ .Values.sidecar.image.repository }}:{{ .Values.sidecar.image.tag }}@sha256:{{ .Values.sidecar.image.sha }}" + {{- else }} + image: "{{ template "system_default_registry" . }}{{ .Values.sidecar.image.repository }}:{{ .Values.sidecar.image.tag }}" + {{- end }} + imagePullPolicy: {{ .Values.sidecar.imagePullPolicy }} + env: + {{- range $key, $value := .Values.sidecar.datasources.env }} + - name: "{{ $key }}" + value: "{{ $value }}" + {{- end }} + {{- if .Values.sidecar.datasources.ignoreAlreadyProcessed }} + - name: IGNORE_ALREADY_PROCESSED + value: "true" + {{- end }} + - name: METHOD + value: "LIST" + - name: LABEL + value: "{{ .Values.sidecar.datasources.label }}" + {{- if .Values.sidecar.datasources.labelValue }} + - name: LABEL_VALUE + value: {{ quote .Values.sidecar.datasources.labelValue }} + {{- end }} + {{- if or .Values.sidecar.logLevel .Values.sidecar.datasources.logLevel }} + - name: LOG_LEVEL + value: {{ default .Values.sidecar.logLevel .Values.sidecar.datasources.logLevel }} + {{- end }} + - name: FOLDER + value: "/etc/grafana/provisioning/datasources" + - name: RESOURCE + value: {{ quote .Values.sidecar.datasources.resource }} + {{- if .Values.sidecar.enableUniqueFilenames }} + - name: UNIQUE_FILENAMES + value: "{{ .Values.sidecar.enableUniqueFilenames }}" + {{- end }} + - name: NAMESPACE + value: "{{ template "project-prometheus-stack.projectNamespaceList" . }}" + {{- if .Values.sidecar.skipTlsVerify }} + - name: SKIP_TLS_VERIFY + value: "{{ .Values.sidecar.skipTlsVerify }}" + {{- end }} + {{- with .Values.sidecar.resources }} + resources: + {{- toYaml . | nindent 6 }} + {{- end }} + {{- with .Values.sidecar.securityContext }} + securityContext: + {{- toYaml . | nindent 6 }} + {{- end }} + volumeMounts: + - name: sc-datasources-volume + mountPath: "/etc/grafana/provisioning/datasources" +{{- end }} +{{- if .Values.sidecar.notifiers.enabled }} + - name: {{ template "grafana.name" . }}-sc-notifiers + {{- if .Values.sidecar.image.sha }} + image: "{{ template "system_default_registry" . }}{{ .Values.sidecar.image.repository }}:{{ .Values.sidecar.image.tag }}@sha256:{{ .Values.sidecar.image.sha }}" + {{- else }} + image: "{{ template "system_default_registry" . }}{{ .Values.sidecar.image.repository }}:{{ .Values.sidecar.image.tag }}" + {{- end }} + imagePullPolicy: {{ .Values.sidecar.imagePullPolicy }} + env: + {{- range $key, $value := .Values.sidecar.notifiers.env }} + - name: "{{ $key }}" + value: "{{ $value }}" + {{- end }} + {{- if .Values.sidecar.notifiers.ignoreAlreadyProcessed }} + - name: IGNORE_ALREADY_PROCESSED + value: "true" + {{- end }} + - name: METHOD + value: LIST + - name: LABEL + value: "{{ .Values.sidecar.notifiers.label }}" + {{- if .Values.sidecar.notifiers.labelValue }} + - name: LABEL_VALUE + value: {{ quote .Values.sidecar.notifiers.labelValue }} + {{- end }} + {{- if or .Values.sidecar.logLevel .Values.sidecar.notifiers.logLevel }} + - name: LOG_LEVEL + value: {{ default .Values.sidecar.logLevel .Values.sidecar.notifiers.logLevel }} + {{- end }} + - name: FOLDER + value: "/etc/grafana/provisioning/notifiers" + - name: RESOURCE + value: {{ quote .Values.sidecar.notifiers.resource }} + {{- if .Values.sidecar.enableUniqueFilenames }} + - name: UNIQUE_FILENAMES + value: "{{ .Values.sidecar.enableUniqueFilenames }}" + {{- end }} + - name: NAMESPACE + value: "{{ template "project-prometheus-stack.projectNamespaceList" . }}" + {{- if .Values.sidecar.skipTlsVerify }} + - name: SKIP_TLS_VERIFY + value: "{{ .Values.sidecar.skipTlsVerify }}" + {{- end }} + {{- with .Values.sidecar.livenessProbe }} + livenessProbe: + {{- toYaml . | nindent 6 }} + {{- end }} + {{- with .Values.sidecar.readinessProbe }} + readinessProbe: + {{- toYaml . | nindent 6 }} + {{- end }} + {{- with .Values.sidecar.resources }} + resources: + {{- toYaml . | nindent 6 }} + {{- end }} + {{- with .Values.sidecar.securityContext }} + securityContext: + {{- toYaml . | nindent 6 }} + {{- end }} + volumeMounts: + - name: sc-notifiers-volume + mountPath: "/etc/grafana/provisioning/notifiers" +{{- end}} +{{- if .Values.extraInitContainers }} +{{ tpl (toYaml .Values.extraInitContainers) . | indent 2 }} +{{- end }} +{{- if .Values.image.pullSecrets }} +imagePullSecrets: +{{- $root := . }} +{{- range .Values.image.pullSecrets }} + - name: {{ tpl . $root }} +{{- end }} +{{- end }} +{{- if not .Values.enableKubeBackwardCompatibility }} +enableServiceLinks: {{ .Values.enableServiceLinks }} +{{- end }} +containers: +{{- if .Values.sidecar.dashboards.enabled }} + - name: {{ template "grafana.name" . }}-sc-dashboard + {{- if .Values.sidecar.image.sha }} + image: "{{ template "system_default_registry" . }}{{ .Values.sidecar.image.repository }}:{{ .Values.sidecar.image.tag }}@sha256:{{ .Values.sidecar.image.sha }}" + {{- else }} + image: "{{ template "system_default_registry" . }}{{ .Values.sidecar.image.repository }}:{{ .Values.sidecar.image.tag }}" + {{- end }} + imagePullPolicy: {{ .Values.sidecar.imagePullPolicy }} + env: + {{- range $key, $value := .Values.sidecar.dashboards.env }} + - name: "{{ $key }}" + value: "{{ $value }}" + {{- end }} + {{- if .Values.sidecar.dashboards.ignoreAlreadyProcessed }} + - name: IGNORE_ALREADY_PROCESSED + value: "true" + {{- end }} + - name: METHOD + value: {{ .Values.sidecar.dashboards.watchMethod }} + - name: LABEL + value: "{{ .Values.sidecar.dashboards.label }}" + {{- if .Values.sidecar.dashboards.labelValue }} + - name: LABEL_VALUE + value: {{ quote .Values.sidecar.dashboards.labelValue }} + {{- end }} + {{- if or .Values.sidecar.logLevel .Values.sidecar.dashboards.logLevel }} + - name: LOG_LEVEL + value: {{ default .Values.sidecar.logLevel .Values.sidecar.dashboards.logLevel }} + {{- end }} + - name: FOLDER + value: "{{ .Values.sidecar.dashboards.folder }}{{- with .Values.sidecar.dashboards.defaultFolderName }}/{{ . }}{{- end }}" + - name: RESOURCE + value: {{ quote .Values.sidecar.dashboards.resource }} + {{- if .Values.sidecar.enableUniqueFilenames }} + - name: UNIQUE_FILENAMES + value: "{{ .Values.sidecar.enableUniqueFilenames }}" + {{- end }} + - name: NAMESPACE + value: "{{ template "project-prometheus-stack.projectNamespaceList" . }}" + {{- if .Values.sidecar.skipTlsVerify }} + - name: SKIP_TLS_VERIFY + value: "{{ .Values.sidecar.skipTlsVerify }}" + {{- end }} + {{- if .Values.sidecar.dashboards.folderAnnotation }} + - name: FOLDER_ANNOTATION + value: "{{ .Values.sidecar.dashboards.folderAnnotation }}" + {{- end }} + {{- if .Values.sidecar.dashboards.script }} + - name: SCRIPT + value: "{{ .Values.sidecar.dashboards.script }}" + {{- end }} + {{- if .Values.sidecar.dashboards.watchServerTimeout }} + {{- if ne .Values.sidecar.dashboards.watchMethod "WATCH" }} + {{- fail (printf "Cannot use .Values.sidecar.dashboards.watchServerTimeout with .Values.sidecar.dashboards.watchMethod %s" .Values.sidecar.dashboards.watchMethod) }} + {{- end }} + - name: WATCH_SERVER_TIMEOUT + value: "{{ .Values.sidecar.dashboards.watchServerTimeout }}" + {{- end }} + {{- if .Values.sidecar.dashboards.watchClientTimeout }} + {{- if ne .Values.sidecar.dashboards.watchMethod "WATCH" }} + {{- fail (printf "Cannot use .Values.sidecar.dashboards.watchClientTimeout with .Values.sidecar.dashboards.watchMethod %s" .Values.sidecar.dashboards.watchMethod) }} + {{- end }} + - name: WATCH_CLIENT_TIMEOUT + value: "{{ .Values.sidecar.dashboards.watchClientTimeout }}" + {{- end }} + {{- with .Values.sidecar.livenessProbe }} + livenessProbe: + {{- toYaml . | nindent 6 }} + {{- end }} + {{- with .Values.sidecar.readinessProbe }} + readinessProbe: + {{- toYaml . | nindent 6 }} + {{- end }} + {{- with .Values.sidecar.resources }} + resources: + {{- toYaml . | nindent 6 }} + {{- end }} + {{- with .Values.sidecar.securityContext }} + securityContext: + {{- toYaml . | nindent 6 }} + {{- end }} + volumeMounts: + - name: sc-dashboard-volume + mountPath: {{ .Values.sidecar.dashboards.folder | quote }} + {{- if .Values.sidecar.dashboards.extraMounts }} + {{- toYaml .Values.sidecar.dashboards.extraMounts | trim | nindent 6}} + {{- end }} +{{- end}} +{{- if .Values.sidecar.datasources.enabled }} + - name: {{ template "grafana.name" . }}-sc-datasources + {{- if .Values.sidecar.image.sha }} + image: "{{ template "system_default_registry" . }}{{ .Values.sidecar.image.repository }}:{{ .Values.sidecar.image.tag }}@sha256:{{ .Values.sidecar.image.sha }}" + {{- else }} + image: "{{ template "system_default_registry" . }}{{ .Values.sidecar.image.repository }}:{{ .Values.sidecar.image.tag }}" + {{- end }} + imagePullPolicy: {{ .Values.sidecar.imagePullPolicy }} + env: + {{- range $key, $value := .Values.sidecar.datasources.env }} + - name: "{{ $key }}" + value: "{{ $value }}" + {{- end }} + {{- if .Values.sidecar.datasources.ignoreAlreadyProcessed }} + - name: IGNORE_ALREADY_PROCESSED + value: "true" + {{- end }} + - name: METHOD + value: {{ .Values.sidecar.datasources.watchMethod }} + - name: LABEL + value: "{{ .Values.sidecar.datasources.label }}" + {{- if .Values.sidecar.datasources.labelValue }} + - name: LABEL_VALUE + value: {{ quote .Values.sidecar.datasources.labelValue }} + {{- end }} + {{- if or .Values.sidecar.logLevel .Values.sidecar.datasources.logLevel }} + - name: LOG_LEVEL + value: {{ default .Values.sidecar.logLevel .Values.sidecar.datasources.logLevel }} + {{- end }} + - name: FOLDER + value: "/etc/grafana/provisioning/datasources" + - name: RESOURCE + value: {{ quote .Values.sidecar.datasources.resource }} + {{- if .Values.sidecar.enableUniqueFilenames }} + - name: UNIQUE_FILENAMES + value: "{{ .Values.sidecar.enableUniqueFilenames }}" + {{- end }} + - name: NAMESPACE + value: "{{ template "project-prometheus-stack.projectNamespaceList" . }}" + {{- if .Values.sidecar.skipTlsVerify }} + - name: SKIP_TLS_VERIFY + value: "{{ .Values.sidecar.skipTlsVerify }}" + {{- end }} + {{- if .Values.sidecar.datasources.script }} + - name: SCRIPT + value: "{{ .Values.sidecar.datasources.script }}" + {{- end }} + {{- if and (not .Values.env.GF_SECURITY_ADMIN_USER) (not .Values.env.GF_SECURITY_DISABLE_INITIAL_ADMIN_CREATION) }} + - name: REQ_USERNAME + valueFrom: + secretKeyRef: + name: {{ (tpl .Values.admin.existingSecret .) | default (include "grafana.fullname" .) }} + key: {{ .Values.admin.userKey | default "admin-user" }} + {{- end }} + {{- if and (not .Values.env.GF_SECURITY_ADMIN_PASSWORD) (not .Values.env.GF_SECURITY_ADMIN_PASSWORD__FILE) (not .Values.env.GF_SECURITY_DISABLE_INITIAL_ADMIN_CREATION) }} + - name: REQ_PASSWORD + valueFrom: + secretKeyRef: + name: {{ (tpl .Values.admin.existingSecret .) | default (include "grafana.fullname" .) }} + key: {{ .Values.admin.passwordKey | default "admin-password" }} + {{- end }} + {{- if not .Values.sidecar.datasources.skipReload }} + - name: REQ_URL + value: {{ .Values.sidecar.datasources.reloadURL }} + - name: REQ_METHOD + value: POST + {{- end }} + {{- if .Values.sidecar.datasources.watchServerTimeout }} + {{- if ne .Values.sidecar.datasources.watchMethod "WATCH" }} + {{- fail (printf "Cannot use .Values.sidecar.datasources.watchServerTimeout with .Values.sidecar.datasources.watchMethod %s" .Values.sidecar.datasources.watchMethod) }} + {{- end }} + - name: WATCH_SERVER_TIMEOUT + value: "{{ .Values.sidecar.datasources.watchServerTimeout }}" + {{- end }} + {{- if .Values.sidecar.datasources.watchClientTimeout }} + {{- if ne .Values.sidecar.datasources.watchMethod "WATCH" }} + {{- fail (printf "Cannot use .Values.sidecar.datasources.watchClientTimeout with .Values.sidecar.datasources.watchMethod %s" .Values.sidecar.datasources.watchMethod) }} + {{- end }} + - name: WATCH_CLIENT_TIMEOUT + value: "{{ .Values.sidecar.datasources.watchClientTimeout }}" + {{- end }} + {{- with .Values.sidecar.livenessProbe }} + livenessProbe: + {{- toYaml . | nindent 6 }} + {{- end }} + {{- with .Values.sidecar.readinessProbe }} + readinessProbe: + {{- toYaml . | nindent 6 }} + {{- end }} + {{- with .Values.sidecar.resources }} + resources: + {{- toYaml . | nindent 6 }} + {{- end }} + {{- with .Values.sidecar.securityContext }} + securityContext: + {{- toYaml . | nindent 6 }} + {{- end }} + volumeMounts: + - name: sc-datasources-volume + mountPath: "/etc/grafana/provisioning/datasources" +{{- end}} +{{- if .Values.sidecar.plugins.enabled }} + - name: {{ template "grafana.name" . }}-sc-plugins + {{- if .Values.sidecar.image.sha }} + image: "{{ template "system_default_registry" . }}{{ .Values.sidecar.image.repository }}:{{ .Values.sidecar.image.tag }}@sha256:{{ .Values.sidecar.image.sha }}" + {{- else }} + image: "{{ template "system_default_registry" . }}{{ .Values.sidecar.image.repository }}:{{ .Values.sidecar.image.tag }}" + {{- end }} + imagePullPolicy: {{ .Values.sidecar.imagePullPolicy }} + env: + {{- range $key, $value := .Values.sidecar.plugins.env }} + - name: "{{ $key }}" + value: "{{ $value }}" + {{- end }} + {{- if .Values.sidecar.plugins.ignoreAlreadyProcessed }} + - name: IGNORE_ALREADY_PROCESSED + value: "true" + {{- end }} + - name: METHOD + value: {{ .Values.sidecar.plugins.watchMethod }} + - name: LABEL + value: "{{ .Values.sidecar.plugins.label }}" + {{- if .Values.sidecar.plugins.labelValue }} + - name: LABEL_VALUE + value: {{ quote .Values.sidecar.plugins.labelValue }} + {{- end }} + {{- if or .Values.sidecar.logLevel .Values.sidecar.plugins.logLevel }} + - name: LOG_LEVEL + value: {{ default .Values.sidecar.logLevel .Values.sidecar.plugins.logLevel }} + {{- end }} + - name: FOLDER + value: "/etc/grafana/provisioning/plugins" + - name: RESOURCE + value: {{ quote .Values.sidecar.plugins.resource }} + {{- if .Values.sidecar.enableUniqueFilenames }} + - name: UNIQUE_FILENAMES + value: "{{ .Values.sidecar.enableUniqueFilenames }}" + {{- end }} + - name: NAMESPACE + value: "{{ template "project-prometheus-stack.projectNamespaceList" . }}" + {{- if .Values.sidecar.plugins.script }} + - name: SCRIPT + value: "{{ .Values.sidecar.plugins.script }}" + {{- end }} + {{- if .Values.sidecar.skipTlsVerify }} + - name: SKIP_TLS_VERIFY + value: "{{ .Values.sidecar.skipTlsVerify }}" + {{- end }} + {{- if and (not .Values.env.GF_SECURITY_ADMIN_USER) (not .Values.env.GF_SECURITY_DISABLE_INITIAL_ADMIN_CREATION) }} + - name: REQ_USERNAME + valueFrom: + secretKeyRef: + name: {{ (tpl .Values.admin.existingSecret .) | default (include "grafana.fullname" .) }} + key: {{ .Values.admin.userKey | default "admin-user" }} + {{- end }} + {{- if and (not .Values.env.GF_SECURITY_ADMIN_PASSWORD) (not .Values.env.GF_SECURITY_ADMIN_PASSWORD__FILE) (not .Values.env.GF_SECURITY_DISABLE_INITIAL_ADMIN_CREATION) }} + - name: REQ_PASSWORD + valueFrom: + secretKeyRef: + name: {{ (tpl .Values.admin.existingSecret .) | default (include "grafana.fullname" .) }} + key: {{ .Values.admin.passwordKey | default "admin-password" }} + {{- end }} + {{- if not .Values.sidecar.plugins.skipReload }} + - name: REQ_URL + value: {{ .Values.sidecar.plugins.reloadURL }} + - name: REQ_METHOD + value: POST + {{- end }} + {{- if .Values.sidecar.plugins.watchServerTimeout }} + {{- if ne .Values.sidecar.plugins.watchMethod "WATCH" }} + {{- fail (printf "Cannot use .Values.sidecar.plugins.watchServerTimeout with .Values.sidecar.plugins.watchMethod %s" .Values.sidecar.plugins.watchMethod) }} + {{- end }} + - name: WATCH_SERVER_TIMEOUT + value: "{{ .Values.sidecar.plugins.watchServerTimeout }}" + {{- end }} + {{- if .Values.sidecar.plugins.watchClientTimeout }} + {{- if ne .Values.sidecar.plugins.watchMethod "WATCH" }} + {{- fail (printf "Cannot use .Values.sidecar.plugins.watchClientTimeout with .Values.sidecar.plugins.watchMethod %s" .Values.sidecar.plugins.watchMethod) }} + {{- end }} + - name: WATCH_CLIENT_TIMEOUT + value: "{{ .Values.sidecar.plugins.watchClientTimeout }}" + {{- end }} + {{- with .Values.sidecar.livenessProbe }} + livenessProbe: + {{- toYaml . | nindent 6 }} + {{- end }} + {{- with .Values.sidecar.readinessProbe }} + readinessProbe: + {{- toYaml . | nindent 6 }} + {{- end }} + {{- with .Values.sidecar.resources }} + resources: + {{- toYaml . | nindent 6 }} + {{- end }} + {{- with .Values.sidecar.securityContext }} + securityContext: + {{- toYaml . | nindent 6 }} + {{- end }} + volumeMounts: + - name: sc-plugins-volume + mountPath: "/etc/grafana/provisioning/plugins" +{{- end}} + - name: {{ .Chart.Name }} + {{- if .Values.image.sha }} + image: "{{ template "system_default_registry" . }}{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}@sha256:{{ .Values.image.sha }}" + {{- else }} + image: "{{ template "system_default_registry" . }}{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" + {{- end }} + imagePullPolicy: {{ .Values.image.pullPolicy }} + {{- if .Values.command }} + command: + {{- range .Values.command }} + - {{ . }} + {{- end }} + {{- end}} + {{- with .Values.containerSecurityContext }} + securityContext: + {{- toYaml . | nindent 6 }} + {{- end }} + volumeMounts: + - name: config + mountPath: "/etc/grafana/grafana.ini" + subPath: grafana.ini + {{- if .Values.ldap.enabled }} + - name: ldap + mountPath: "/etc/grafana/ldap.toml" + subPath: ldap.toml + {{- end }} + {{- $root := . }} + {{- range .Values.extraConfigmapMounts }} + - name: {{ tpl .name $root }} + mountPath: {{ tpl .mountPath $root }} + subPath: {{ (tpl .subPath $root) | default "" }} + readOnly: {{ .readOnly }} + {{- end }} + - name: storage + mountPath: "/var/lib/grafana" +{{- if .Values.persistence.subPath }} + subPath: {{ tpl .Values.persistence.subPath . }} +{{- end }} +{{- if .Values.dashboards }} +{{- range $provider, $dashboards := .Values.dashboards }} +{{- range $key, $value := $dashboards }} +{{- if (or (hasKey $value "json") (hasKey $value "file")) }} + - name: dashboards-{{ $provider }} + mountPath: "/var/lib/grafana/dashboards/{{ $provider }}/{{ $key }}.json" + subPath: "{{ $key }}.json" +{{- end }} +{{- end }} +{{- end }} +{{- end -}} +{{- if .Values.dashboardsConfigMaps }} +{{- range (keys .Values.dashboardsConfigMaps | sortAlpha) }} + - name: dashboards-{{ . }} + mountPath: "/var/lib/grafana/dashboards/{{ . }}" +{{- end }} +{{- end }} +{{- if .Values.datasources }} +{{- range (keys .Values.datasources | sortAlpha) }} + - name: config + mountPath: "/etc/grafana/provisioning/datasources/{{ . }}" + subPath: {{ . | quote }} +{{- end }} +{{- end }} +{{- if .Values.notifiers }} +{{- range (keys .Values.notifiers | sortAlpha) }} + - name: config + mountPath: "/etc/grafana/provisioning/notifiers/{{ . }}" + subPath: {{ . | quote }} +{{- end }} +{{- end }} +{{- if .Values.alerting }} +{{- range (keys .Values.alerting | sortAlpha) }} + - name: config + mountPath: "/etc/grafana/provisioning/alerting/{{ . }}" + subPath: {{ . | quote }} +{{- end }} +{{- end }} +{{- if .Values.dashboardProviders }} +{{- range (keys .Values.dashboardProviders | sortAlpha) }} + - name: config + mountPath: "/etc/grafana/provisioning/dashboards/{{ . }}" + subPath: {{ . | quote }} +{{- end }} +{{- end }} +{{- if .Values.sidecar.dashboards.enabled }} + - name: sc-dashboard-volume + mountPath: {{ .Values.sidecar.dashboards.folder | quote }} +{{ if .Values.sidecar.dashboards.SCProvider }} + - name: sc-dashboard-provider + mountPath: "/etc/grafana/provisioning/dashboards/sc-dashboardproviders.yaml" + subPath: provider.yaml +{{- end}} +{{- end}} +{{- if .Values.sidecar.datasources.enabled }} + - name: sc-datasources-volume + mountPath: "/etc/grafana/provisioning/datasources" +{{- end}} +{{- if .Values.sidecar.plugins.enabled }} + - name: sc-plugins-volume + mountPath: "/etc/grafana/provisioning/plugins" +{{- end}} +{{- if .Values.sidecar.notifiers.enabled }} + - name: sc-notifiers-volume + mountPath: "/etc/grafana/provisioning/notifiers" +{{- end}} + {{- range .Values.extraSecretMounts }} + - name: {{ .name }} + mountPath: {{ .mountPath }} + readOnly: {{ .readOnly }} + subPath: {{ .subPath | default "" }} + {{- end }} + {{- range .Values.extraVolumeMounts }} + - name: {{ .name }} + mountPath: {{ .mountPath }} + subPath: {{ .subPath | default "" }} + readOnly: {{ .readOnly }} + {{- end }} + {{- range .Values.extraEmptyDirMounts }} + - name: {{ .name }} + mountPath: {{ .mountPath }} + {{- end }} + ports: + - name: {{ .Values.podPortName }} + containerPort: {{ .Values.service.targetPort }} + protocol: TCP + env: + {{- if and (not .Values.env.GF_SECURITY_ADMIN_USER) (not .Values.env.GF_SECURITY_DISABLE_INITIAL_ADMIN_CREATION) }} + - name: GF_SECURITY_ADMIN_USER + valueFrom: + secretKeyRef: + name: {{ (tpl .Values.admin.existingSecret .) | default (include "grafana.fullname" .) }} + key: {{ .Values.admin.userKey | default "admin-user" }} + {{- end }} + {{- if and (not .Values.env.GF_SECURITY_ADMIN_PASSWORD) (not .Values.env.GF_SECURITY_ADMIN_PASSWORD__FILE) (not .Values.env.GF_SECURITY_DISABLE_INITIAL_ADMIN_CREATION) }} + - name: GF_SECURITY_ADMIN_PASSWORD + valueFrom: + secretKeyRef: + name: {{ (tpl .Values.admin.existingSecret .) | default (include "grafana.fullname" .) }} + key: {{ .Values.admin.passwordKey | default "admin-password" }} + {{- end }} + {{- if .Values.plugins }} + - name: GF_INSTALL_PLUGINS + valueFrom: + configMapKeyRef: + name: {{ template "grafana.fullname" . }} + key: plugins + {{- end }} + {{- if .Values.smtp.existingSecret }} + - name: GF_SMTP_USER + valueFrom: + secretKeyRef: + name: {{ .Values.smtp.existingSecret }} + key: {{ .Values.smtp.userKey | default "user" }} + - name: GF_SMTP_PASSWORD + valueFrom: + secretKeyRef: + name: {{ .Values.smtp.existingSecret }} + key: {{ .Values.smtp.passwordKey | default "password" }} + {{- end }} + {{- if .Values.imageRenderer.enabled }} + - name: GF_RENDERING_SERVER_URL + value: http://{{ template "grafana.fullname" . }}-image-renderer.{{ template "grafana.namespace" . }}:{{ .Values.imageRenderer.service.port }}/render + - name: GF_RENDERING_CALLBACK_URL + value: {{ .Values.imageRenderer.grafanaProtocol }}://{{ template "grafana.fullname" . }}.{{ template "grafana.namespace" . }}:{{ .Values.service.port }}/{{ .Values.imageRenderer.grafanaSubPath }} + {{- end }} + - name: GF_PATHS_DATA + value: {{ (get .Values "grafana.ini").paths.data }} + - name: GF_PATHS_LOGS + value: {{ (get .Values "grafana.ini").paths.logs }} + - name: GF_PATHS_PLUGINS + value: {{ (get .Values "grafana.ini").paths.plugins }} + - name: GF_PATHS_PROVISIONING + value: {{ (get .Values "grafana.ini").paths.provisioning }} + {{- range $key, $value := .Values.envValueFrom }} + - name: {{ $key | quote }} + valueFrom: +{{ tpl (toYaml $value) $ | indent 10 }} + {{- end }} +{{- range $key, $value := .Values.env }} + - name: "{{ tpl $key $ }}" + value: "{{ tpl (print $value) $ }}" +{{- end }} + {{- if or .Values.envFromSecret (or .Values.envRenderSecret .Values.envFromSecrets) .Values.envFromConfigMaps }} + envFrom: + {{- if .Values.envFromSecret }} + - secretRef: + name: {{ tpl .Values.envFromSecret . }} + {{- end }} + {{- if .Values.envRenderSecret }} + - secretRef: + name: {{ template "grafana.fullname" . }}-env + {{- end }} + {{- range .Values.envFromSecrets }} + - secretRef: + name: {{ tpl .name $ }} + optional: {{ .optional | default false }} + {{- end }} + {{- range .Values.envFromConfigMaps }} + - configMapRef: + name: {{ tpl .name $ }} + optional: {{ .optional | default false }} + {{- end }} + {{- end }} + {{- with .Values.livenessProbe }} + livenessProbe: + {{- toYaml . | nindent 6 }} + {{- end }} + {{- with .Values.readinessProbe }} + readinessProbe: + {{- toYaml . | nindent 6 }} + {{- end }} +{{- if .Values.lifecycleHooks }} + lifecycle: {{ tpl (.Values.lifecycleHooks | toYaml) . | nindent 6 }} +{{- end }} + {{- with .Values.resources }} + resources: + {{- toYaml . | nindent 6 }} + {{- end }} +{{- with .Values.extraContainers }} +{{ tpl . $ | indent 2 }} +{{- end }} +nodeSelector: {{ include "linux-node-selector" . | nindent 2 }} +{{- if .Values.nodeSelector }} +{{ toYaml .Values.nodeSelector | indent 2 }} +{{- end }} +{{- $root := . }} +{{- with .Values.affinity }} +affinity: +{{ tpl (toYaml .) $root | indent 2 }} +{{- end }} +{{- with .Values.topologySpreadConstraints }} +topologySpreadConstraints: + {{- toYaml . | nindent 2 }} +{{- end }} +tolerations: {{ include "linux-node-tolerations" . | nindent 2 }} +{{- if .Values.tolerations }} +{{ toYaml .Values.tolerations | indent 2 }} +{{- end }} +volumes: + - name: config + configMap: + name: {{ template "grafana.fullname" . }} +{{- $root := . }} +{{- range .Values.extraConfigmapMounts }} + - name: {{ tpl .name $root }} + configMap: + name: {{ tpl .configMap $root }} + {{- if .items }} + items: {{ toYaml .items | nindent 6 }} + {{- end }} +{{- end }} + {{- if .Values.dashboards }} + {{- range (keys .Values.dashboards | sortAlpha) }} + - name: dashboards-{{ . }} + configMap: + name: {{ template "grafana.fullname" $ }}-dashboards-{{ . }} + {{- end }} + {{- end }} + {{- if .Values.dashboardsConfigMaps }} + {{ $root := . }} + {{- range $provider, $name := .Values.dashboardsConfigMaps }} + - name: dashboards-{{ $provider }} + configMap: + name: {{ tpl $name $root }} + {{- end }} + {{- end }} + {{- if .Values.ldap.enabled }} + - name: ldap + secret: + {{- if .Values.ldap.existingSecret }} + secretName: {{ .Values.ldap.existingSecret }} + {{- else }} + secretName: {{ template "grafana.fullname" . }} + {{- end }} + items: + - key: ldap-toml + path: ldap.toml + {{- end }} +{{- if and .Values.persistence.enabled (eq .Values.persistence.type "pvc") }} + - name: storage + persistentVolumeClaim: + claimName: {{ tpl (.Values.persistence.existingClaim | default (include "grafana.fullname" .)) . }} +{{- else if and .Values.persistence.enabled (eq .Values.persistence.type "statefulset") }} +# nothing +{{- else }} + - name: storage +{{- if .Values.persistence.inMemory.enabled }} + emptyDir: + medium: Memory +{{- if .Values.persistence.inMemory.sizeLimit }} + sizeLimit: {{ .Values.persistence.inMemory.sizeLimit }} +{{- end -}} +{{- else }} + emptyDir: {} +{{- end -}} +{{- end -}} +{{- if .Values.sidecar.dashboards.enabled }} + - name: sc-dashboard-volume +{{- if .Values.sidecar.dashboards.sizeLimit }} + emptyDir: + sizeLimit: {{ .Values.sidecar.dashboards.sizeLimit }} +{{- else }} + emptyDir: {} +{{- end -}} +{{- if .Values.sidecar.dashboards.SCProvider }} + - name: sc-dashboard-provider + configMap: + name: {{ template "grafana.fullname" . }}-config-dashboards +{{- end }} +{{- end }} +{{- if .Values.sidecar.datasources.enabled }} + - name: sc-datasources-volume +{{- if .Values.sidecar.datasources.sizeLimit }} + emptyDir: + sizeLimit: {{ .Values.sidecar.datasources.sizeLimit }} +{{- else }} + emptyDir: {} +{{- end -}} +{{- end -}} +{{- if .Values.sidecar.plugins.enabled }} + - name: sc-plugins-volume +{{- if .Values.sidecar.plugins.sizeLimit }} + emptyDir: + sizeLimit: {{ .Values.sidecar.plugins.sizeLimit }} +{{- else }} + emptyDir: {} +{{- end -}} +{{- end -}} +{{- if .Values.sidecar.notifiers.enabled }} + - name: sc-notifiers-volume +{{- if .Values.sidecar.notifiers.sizeLimit }} + emptyDir: + sizeLimit: {{ .Values.sidecar.notifiers.sizeLimit }} +{{- else }} + emptyDir: {} +{{- end -}} +{{- end -}} +{{- range .Values.extraSecretMounts }} +{{- if .secretName }} + - name: {{ .name }} + secret: + secretName: {{ .secretName }} + defaultMode: {{ .defaultMode }} + {{- if .items }} + items: {{ toYaml .items | nindent 6 }} + {{- end }} +{{- else if .projected }} + - name: {{ .name }} + projected: {{- toYaml .projected | nindent 6 }} +{{- else if .csi }} + - name: {{ .name }} + csi: {{- toYaml .csi | nindent 6 }} +{{- end }} +{{- end }} +{{- range .Values.extraVolumeMounts }} + - name: {{ .name }} + {{- if .existingClaim }} + persistentVolumeClaim: + claimName: {{ .existingClaim }} + {{- else if .hostPath }} + hostPath: + path: {{ .hostPath }} + {{- else if .csi }} + csi: + data: + {{ toYaml .data | nindent 6 }} + {{- else }} + emptyDir: {} + {{- end }} +{{- end }} +{{- range .Values.extraEmptyDirMounts }} + - name: {{ .name }} + emptyDir: {} +{{- end -}} +{{- if .Values.extraContainerVolumes }} +{{ tpl (toYaml .Values.extraContainerVolumes) . | indent 2 }} +{{- end }} +{{- end }} diff --git a/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/clusterrole.yaml b/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/clusterrole.yaml new file mode 100644 index 00000000..154658b5 --- /dev/null +++ b/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/clusterrole.yaml @@ -0,0 +1,25 @@ +{{- if and .Values.rbac.create (not .Values.rbac.namespaced) (not .Values.rbac.useExistingRole) }} +kind: ClusterRole +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + labels: + {{- include "grafana.labels" . | nindent 4 }} +{{- with .Values.annotations }} + annotations: +{{ toYaml . | indent 4 }} +{{- end }} + name: {{ template "grafana.fullname" . }}-clusterrole +{{- if or .Values.sidecar.dashboards.enabled (or .Values.rbac.extraClusterRoleRules (or .Values.sidecar.datasources.enabled .Values.sidecar.plugins.enabled)) }} +rules: +{{- if or .Values.sidecar.dashboards.enabled (or .Values.sidecar.datasources.enabled .Values.sidecar.plugins.enabled) }} +- apiGroups: [""] # "" indicates the core API group + resources: ["configmaps", "secrets"] + verbs: ["get", "watch", "list"] +{{- end}} +{{- with .Values.rbac.extraClusterRoleRules }} +{{ toYaml . | indent 0 }} +{{- end}} +{{- else }} +rules: [] +{{- end}} +{{- end}} diff --git a/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/clusterrolebinding.yaml b/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/clusterrolebinding.yaml new file mode 100644 index 00000000..4accbfac --- /dev/null +++ b/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/clusterrolebinding.yaml @@ -0,0 +1,24 @@ +{{- if and .Values.rbac.create (not .Values.rbac.namespaced) }} +kind: ClusterRoleBinding +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: {{ template "grafana.fullname" . }}-clusterrolebinding + labels: + {{- include "grafana.labels" . | nindent 4 }} +{{- with .Values.annotations }} + annotations: +{{ toYaml . | indent 4 }} +{{- end }} +subjects: + - kind: ServiceAccount + name: {{ template "grafana.serviceAccountName" . }} + namespace: {{ template "grafana.namespace" . }} +roleRef: + kind: ClusterRole +{{- if (not .Values.rbac.useExistingRole) }} + name: {{ template "grafana.fullname" . }}-clusterrole +{{- else }} + name: {{ .Values.rbac.useExistingRole }} +{{- end }} + apiGroup: rbac.authorization.k8s.io +{{- end -}} diff --git a/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/configmap-dashboard-provider.yaml b/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/configmap-dashboard-provider.yaml new file mode 100644 index 00000000..65d73858 --- /dev/null +++ b/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/configmap-dashboard-provider.yaml @@ -0,0 +1,29 @@ +{{- if .Values.sidecar.dashboards.enabled }} +apiVersion: v1 +kind: ConfigMap +metadata: + labels: + {{- include "grafana.labels" . | nindent 4 }} +{{- with .Values.annotations }} + annotations: +{{ toYaml . | indent 4 }} +{{- end }} + name: {{ template "grafana.fullname" . }}-config-dashboards + namespace: {{ template "grafana.namespace" . }} +data: + provider.yaml: |- + apiVersion: 1 + providers: + - name: '{{ .Values.sidecar.dashboards.provider.name }}' + orgId: {{ .Values.sidecar.dashboards.provider.orgid }} + {{- if not .Values.sidecar.dashboards.provider.foldersFromFilesStructure }} + folder: '{{ .Values.sidecar.dashboards.provider.folder }}' + {{- end}} + type: {{ .Values.sidecar.dashboards.provider.type }} + disableDeletion: {{ .Values.sidecar.dashboards.provider.disableDelete }} + allowUiUpdates: {{ .Values.sidecar.dashboards.provider.allowUiUpdates }} + updateIntervalSeconds: {{ .Values.sidecar.dashboards.provider.updateIntervalSeconds | default 30 }} + options: + foldersFromFilesStructure: {{ .Values.sidecar.dashboards.provider.foldersFromFilesStructure }} + path: {{ .Values.sidecar.dashboards.folder }}{{- with .Values.sidecar.dashboards.defaultFolderName }}/{{ . }}{{- end }} +{{- end}} diff --git a/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/configmap.yaml b/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/configmap.yaml new file mode 100644 index 00000000..2461d175 --- /dev/null +++ b/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/configmap.yaml @@ -0,0 +1,117 @@ +{{- if .Values.createConfigmap }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ template "grafana.fullname" . }} + namespace: {{ template "grafana.namespace" . }} + labels: + {{- include "grafana.labels" . | nindent 4 }} +{{- with .Values.annotations }} + annotations: +{{ toYaml . | indent 4 }} +{{- end }} +data: +{{- if .Values.plugins }} + plugins: {{ join "," .Values.plugins }} +{{- end }} + grafana.ini: | +{{- range $elem, $elemVal := index .Values "grafana.ini" }} + {{- if not (kindIs "map" $elemVal) }} + {{- if kindIs "invalid" $elemVal }} + {{ $elem }} = + {{- else if kindIs "string" $elemVal }} + {{ $elem }} = {{ tpl $elemVal $ }} + {{- else }} + {{ $elem }} = {{ $elemVal }} + {{- end }} + {{- end }} +{{- end }} +{{- range $key, $value := index .Values "grafana.ini" }} + {{- if kindIs "map" $value }} + [{{ $key }}] + {{- range $elem, $elemVal := $value }} + {{- if kindIs "invalid" $elemVal }} + {{ $elem }} = + {{- else if kindIs "string" $elemVal }} + {{ $elem }} = {{ tpl $elemVal $ }} + {{- else }} + {{ $elem }} = {{ $elemVal }} + {{- end }} + {{- end }} + {{- end }} +{{- end }} + +{{- if .Values.datasources }} +{{ $root := . }} + {{- range $key, $value := .Values.datasources }} + {{ $key }}: | +{{ tpl (toYaml $value | indent 4) $root }} + {{- end -}} +{{- end -}} + +{{- if .Values.notifiers }} + {{- range $key, $value := .Values.notifiers }} + {{ $key }}: | +{{ toYaml $value | indent 4 }} + {{- end -}} +{{- end -}} + +{{- if .Values.alerting }} +{{ $root := . }} + {{- range $key, $value := .Values.alerting }} + {{ $key }}: | +{{ tpl (toYaml $value | indent 4) $root }} + {{- end -}} +{{- end -}} + +{{- if .Values.dashboardProviders }} + {{- range $key, $value := .Values.dashboardProviders }} + {{ $key }}: | +{{ toYaml $value | indent 4 }} + {{- end -}} +{{- end -}} + +{{- if .Values.dashboards }} + download_dashboards.sh: | + #!/usr/bin/env sh + set -euf + {{- if .Values.dashboardProviders }} + {{- range $key, $value := .Values.dashboardProviders }} + {{- range $value.providers }} + mkdir -p {{ .options.path }} + {{- end }} + {{- end }} + {{- end }} + {{ $dashboardProviders := .Values.dashboardProviders }} + {{- range $provider, $dashboards := .Values.dashboards }} + {{- range $key, $value := $dashboards }} + {{- if (or (hasKey $value "gnetId") (hasKey $value "url")) }} + curl -skf \ + --connect-timeout 60 \ + --max-time 60 \ + {{- if not $value.b64content }} + -H "Accept: application/json" \ + {{- if $value.token }} + -H "Authorization: token {{ $value.token }}" \ + {{- end }} + {{- if $value.bearerToken }} + -H "Authorization: Bearer {{ $value.bearerToken }}" \ + {{- end }} + {{- if $value.gitlabToken }} + -H "PRIVATE-TOKEN: {{ $value.gitlabToken }}" \ + {{- end }} + -H "Content-Type: application/json;charset=UTF-8" \ + {{ end }} + {{- $dpPath := "" -}} + {{- range $kd := (index $dashboardProviders "dashboardproviders.yaml").providers }} + {{- if eq $kd.name $provider -}} + {{- $dpPath = $kd.options.path -}} + {{- end -}} + {{- end -}} + {{- if $value.url -}}"{{ $value.url }}"{{- else -}}"https://grafana.com/api/dashboards/{{ $value.gnetId }}/revisions/{{- if $value.revision -}}{{ $value.revision }}{{- else -}}1{{- end -}}/download"{{- end -}}{{ if $value.datasource }} | sed '/-- .* --/! s/"datasource":.*,/"datasource": "{{ $value.datasource }}",/g'{{ end }}{{- if $value.b64content -}} | base64 -d {{- end -}} \ + > "{{- if $dpPath -}}{{ $dpPath }}{{- else -}}/var/lib/grafana/dashboards/{{ $provider }}{{- end -}}/{{ $key }}.json" + {{- end }} + {{- end -}} + {{- end }} +{{- end }} +{{- end }} diff --git a/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/dashboards-json-configmap.yaml b/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/dashboards-json-configmap.yaml new file mode 100644 index 00000000..59e0be64 --- /dev/null +++ b/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/dashboards-json-configmap.yaml @@ -0,0 +1,35 @@ +{{- if .Values.dashboards }} +{{ $files := .Files }} +{{- range $provider, $dashboards := .Values.dashboards }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ template "grafana.fullname" $ }}-dashboards-{{ $provider }} + namespace: {{ template "grafana.namespace" $ }} + labels: + {{- include "grafana.labels" $ | nindent 4 }} + dashboard-provider: {{ $provider }} +{{- if $dashboards }} +data: +{{- $dashboardFound := false }} +{{- range $key, $value := $dashboards }} +{{- if (or (hasKey $value "json") (hasKey $value "file")) }} +{{- $dashboardFound = true }} +{{ print $key | indent 2 }}.json: +{{- if hasKey $value "json" }} + |- +{{ $value.json | indent 6 }} +{{- end }} +{{- if hasKey $value "file" }} +{{ toYaml ( $files.Get $value.file ) | indent 4}} +{{- end }} +{{- end }} +{{- end }} +{{- if not $dashboardFound }} + {} +{{- end }} +{{- end }} +--- +{{- end }} + +{{- end }} diff --git a/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/deployment.yaml b/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/deployment.yaml new file mode 100644 index 00000000..fee9c335 --- /dev/null +++ b/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/deployment.yaml @@ -0,0 +1,50 @@ +{{ if (and (not .Values.useStatefulSet) (or (not .Values.persistence.enabled) (eq .Values.persistence.type "pvc"))) }} +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ template "grafana.fullname" . }} + namespace: {{ template "grafana.namespace" . }} + labels: + {{- include "grafana.labels" . | nindent 4 }} +{{- if .Values.labels }} +{{ toYaml .Values.labels | indent 4 }} +{{- end }} +{{- with .Values.annotations }} + annotations: +{{ toYaml . | indent 4 }} +{{- end }} +spec: + {{- if and (not .Values.autoscaling.enabled) (.Values.replicas) }} + replicas: {{ .Values.replicas }} + {{- end }} + revisionHistoryLimit: {{ .Values.revisionHistoryLimit }} + selector: + matchLabels: + {{- include "grafana.selectorLabels" . | nindent 6 }} +{{- with .Values.deploymentStrategy }} + strategy: +{{ toYaml . | trim | indent 4 }} +{{- end }} + template: + metadata: + labels: + {{- include "grafana.selectorLabels" . | nindent 8 }} +{{- with .Values.podLabels }} +{{ toYaml . | indent 8 }} +{{- end }} + annotations: + checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} + checksum/dashboards-json-config: {{ include (print $.Template.BasePath "/dashboards-json-configmap.yaml") . | sha256sum }} + checksum/sc-dashboard-provider-config: {{ include (print $.Template.BasePath "/configmap-dashboard-provider.yaml") . | sha256sum }} +{{- if and (or (and (not .Values.admin.existingSecret) (not .Values.env.GF_SECURITY_ADMIN_PASSWORD__FILE) (not .Values.env.GF_SECURITY_ADMIN_PASSWORD)) (and .Values.ldap.enabled (not .Values.ldap.existingSecret))) (not .Values.env.GF_SECURITY_DISABLE_INITIAL_ADMIN_CREATION) }} + checksum/secret: {{ include (print $.Template.BasePath "/secret.yaml") . | sha256sum }} +{{- end }} +{{- if .Values.envRenderSecret }} + checksum/secret-env: {{ include (print $.Template.BasePath "/secret-env.yaml") . | sha256sum }} +{{- end }} +{{- with .Values.podAnnotations }} +{{ toYaml . | indent 8 }} +{{- end }} + spec: + {{- include "grafana.pod" . | indent 6 }} +{{- end }} diff --git a/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/headless-service.yaml b/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/headless-service.yaml new file mode 100644 index 00000000..b5faddcf --- /dev/null +++ b/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/headless-service.yaml @@ -0,0 +1,22 @@ +{{- if or .Values.headlessService (and .Values.persistence.enabled (not .Values.persistence.existingClaim) (eq .Values.persistence.type "statefulset"))}} +apiVersion: v1 +kind: Service +metadata: + name: {{ template "grafana.fullname" . }}-headless + namespace: {{ template "grafana.namespace" . }} + labels: + {{- include "grafana.labels" . | nindent 4 }} +{{- with .Values.annotations }} + annotations: +{{ toYaml . | indent 4 }} +{{- end }} +spec: + clusterIP: None + selector: + {{- include "grafana.selectorLabels" . | nindent 4 }} + type: ClusterIP + ports: + - protocol: TCP + port: 3000 + targetPort: {{ .Values.service.targetPort }} +{{- end }} diff --git a/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/hpa.yaml b/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/hpa.yaml new file mode 100644 index 00000000..05723974 --- /dev/null +++ b/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/hpa.yaml @@ -0,0 +1,21 @@ +{{- if .Values.autoscaling.enabled }} +apiVersion: autoscaling/v2beta1 +kind: HorizontalPodAutoscaler +metadata: + name: {{ template "grafana.fullname" . }} + namespace: {{ template "grafana.namespace" . }} + labels: + app.kubernetes.io/name: {{ template "grafana.name" . }} + helm.sh/chart: {{ template "grafana.chart" . }} + app.kubernetes.io/managed-by: {{ .Release.Service }} + app.kubernetes.io/instance: {{ .Release.Name }} +spec: + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: {{ template "grafana.fullname" . }} + minReplicas: {{ .Values.autoscaling.minReplicas }} + maxReplicas: {{ .Values.autoscaling.maxReplicas }} + metrics: +{{ toYaml .Values.autoscaling.metrics | indent 4 }} +{{- end }} diff --git a/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/image-renderer-deployment.yaml b/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/image-renderer-deployment.yaml new file mode 100644 index 00000000..97a8675b --- /dev/null +++ b/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/image-renderer-deployment.yaml @@ -0,0 +1,123 @@ +{{ if .Values.imageRenderer.enabled }} +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ template "grafana.fullname" . }}-image-renderer + namespace: {{ template "grafana.namespace" . }} + labels: + {{- include "grafana.imageRenderer.labels" . | nindent 4 }} +{{- if .Values.imageRenderer.labels }} +{{ toYaml .Values.imageRenderer.labels | indent 4 }} +{{- end }} +{{- with .Values.imageRenderer.annotations }} + annotations: +{{ toYaml . | indent 4 }} +{{- end }} +spec: + replicas: {{ .Values.imageRenderer.replicas }} + revisionHistoryLimit: {{ .Values.imageRenderer.revisionHistoryLimit }} + selector: + matchLabels: + {{- include "grafana.imageRenderer.selectorLabels" . | nindent 6 }} +{{- with .Values.imageRenderer.deploymentStrategy }} + strategy: +{{ toYaml . | trim | indent 4 }} +{{- end }} + template: + metadata: + labels: + {{- include "grafana.imageRenderer.selectorLabels" . | nindent 8 }} +{{- with .Values.imageRenderer.podLabels }} +{{ toYaml . | indent 8 }} +{{- end }} + annotations: + checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} +{{- with .Values.imageRenderer.podAnnotations }} +{{ toYaml . | indent 8 }} +{{- end }} + spec: + + {{- if .Values.imageRenderer.schedulerName }} + schedulerName: "{{ .Values.imageRenderer.schedulerName }}" + {{- end }} + {{- if .Values.imageRenderer.serviceAccountName }} + serviceAccountName: "{{ .Values.imageRenderer.serviceAccountName }}" + {{- else }} + serviceAccountName: {{ template "grafana.serviceAccountName" . }} + {{- end }} + {{- if .Values.imageRenderer.securityContext }} + securityContext: + {{- toYaml .Values.imageRenderer.securityContext | nindent 8 }} + {{- end }} + {{- if .Values.imageRenderer.hostAliases }} + hostAliases: + {{- toYaml .Values.imageRenderer.hostAliases | nindent 8 }} + {{- end }} + {{- if .Values.imageRenderer.priorityClassName }} + priorityClassName: {{ .Values.imageRenderer.priorityClassName }} + {{- end }} + {{- if .Values.imageRenderer.image.pullSecrets }} + imagePullSecrets: + {{- $root := . }} + {{- range .Values.imageRenderer.image.pullSecrets }} + - name: {{ tpl . $root }} + {{- end}} + {{- end }} + containers: + - name: {{ .Chart.Name }}-image-renderer + {{- if .Values.imageRenderer.image.sha }} + image: "{{ template "system_default_registry" . }}{{ .Values.imageRenderer.image.repository }}:{{ .Values.imageRenderer.image.tag }}@sha256:{{ .Values.imageRenderer.image.sha }}" + {{- else }} + image: "{{ template "system_default_registry" . }}{{ .Values.imageRenderer.image.repository }}:{{ .Values.imageRenderer.image.tag }}" + {{- end }} + imagePullPolicy: {{ .Values.imageRenderer.image.pullPolicy }} + {{- if .Values.imageRenderer.command }} + command: + {{- range .Values.imageRenderer.command }} + - {{ . }} + {{- end }} + {{- end}} + ports: + - name: {{ .Values.imageRenderer.service.portName }} + containerPort: {{ .Values.imageRenderer.service.targetPort }} + protocol: TCP + livenessProbe: + httpGet: + path: / + port: {{ .Values.imageRenderer.service.portName }} + env: + - name: HTTP_PORT + value: {{ .Values.imageRenderer.service.targetPort | quote }} + {{- range $key, $value := .Values.imageRenderer.env }} + - name: {{ $key | quote }} + value: {{ $value | quote }} + {{- end }} + securityContext: + capabilities: + drop: ['all'] + allowPrivilegeEscalation: false + readOnlyRootFilesystem: true + volumeMounts: + - mountPath: /tmp + name: image-renderer-tmpfs + {{- with .Values.imageRenderer.resources }} + resources: +{{ toYaml . | indent 12 }} + {{- end }} + nodeSelector: {{ include "linux-node-selector" . | nindent 8 }} + {{- if .Values.imageRenderer.nodeSelector }} +{{ toYaml . | indent 8 }} + {{- end }} + {{- $root := . }} + {{- with .Values.imageRenderer.affinity }} + affinity: +{{ tpl (toYaml .) $root | indent 8 }} + {{- end }} + tolerations: {{ include "linux-node-tolerations" . | nindent 8 }} + {{- if .Values.imageRenderer.tolerations }} +{{ toYaml . | indent 8 }} + {{- end }} + volumes: + - name: image-renderer-tmpfs + emptyDir: {} +{{- end }} diff --git a/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/image-renderer-network-policy.yaml b/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/image-renderer-network-policy.yaml new file mode 100644 index 00000000..0d9bdfe4 --- /dev/null +++ b/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/image-renderer-network-policy.yaml @@ -0,0 +1,73 @@ +{{- if and (.Values.imageRenderer.enabled) (.Values.imageRenderer.networkPolicy.limitIngress) }} +--- +apiVersion: networking.k8s.io/v1 +kind: NetworkPolicy +metadata: + name: {{ template "grafana.fullname" . }}-image-renderer-ingress + namespace: {{ template "grafana.namespace" . }} + annotations: + comment: Limit image-renderer ingress traffic from grafana +spec: + podSelector: + matchLabels: + {{- include "grafana.imageRenderer.selectorLabels" . | nindent 6 }} + {{- if .Values.imageRenderer.podLabels }} + {{ toYaml .Values.imageRenderer.podLabels | nindent 6 }} + {{- end }} + + policyTypes: + - Ingress + ingress: + - ports: + - port: {{ .Values.imageRenderer.service.targetPort }} + protocol: TCP + from: + - namespaceSelector: + matchLabels: + name: {{ template "grafana.namespace" . }} + podSelector: + matchLabels: + {{- include "grafana.selectorLabels" . | nindent 14 }} + {{- if .Values.podLabels }} + {{ toYaml .Values.podLabels | nindent 14 }} + {{- end }} +{{ end }} + +{{- if and (.Values.imageRenderer.enabled) (.Values.imageRenderer.networkPolicy.limitEgress) }} +--- +apiVersion: networking.k8s.io/v1 +kind: NetworkPolicy +metadata: + name: {{ template "grafana.fullname" . }}-image-renderer-egress + namespace: {{ template "grafana.namespace" . }} + annotations: + comment: Limit image-renderer egress traffic to grafana +spec: + podSelector: + matchLabels: + {{- include "grafana.imageRenderer.selectorLabels" . | nindent 6 }} + {{- if .Values.imageRenderer.podLabels }} + {{ toYaml .Values.imageRenderer.podLabels | nindent 6 }} + {{- end }} + + policyTypes: + - Egress + egress: + # allow dns resolution + - ports: + - port: 53 + protocol: UDP + - port: 53 + protocol: TCP + # talk only to grafana + - ports: + - port: {{ .Values.service.port }} + protocol: TCP + to: + - podSelector: + matchLabels: + {{- include "grafana.selectorLabels" . | nindent 14 }} + {{- if .Values.podLabels }} + {{ toYaml .Values.podLabels | nindent 14 }} + {{- end }} +{{ end }} diff --git a/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/image-renderer-service.yaml b/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/image-renderer-service.yaml new file mode 100644 index 00000000..fcf707a3 --- /dev/null +++ b/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/image-renderer-service.yaml @@ -0,0 +1,33 @@ +{{ if .Values.imageRenderer.enabled }} +{{ if .Values.imageRenderer.service.enabled }} +apiVersion: v1 +kind: Service +metadata: + name: {{ template "grafana.fullname" . }}-image-renderer + namespace: {{ template "grafana.namespace" . }} + labels: + {{- include "grafana.imageRenderer.labels" . | nindent 4 }} +{{- if .Values.imageRenderer.service.labels }} +{{ toYaml .Values.imageRenderer.service.labels | indent 4 }} +{{- end }} +{{- with .Values.imageRenderer.service.annotations }} + annotations: +{{ toYaml . | indent 4 }} +{{- end }} +spec: + type: ClusterIP + {{- if .Values.imageRenderer.service.clusterIP }} + clusterIP: {{ .Values.imageRenderer.service.clusterIP }} + {{end}} + ports: + - name: {{ .Values.imageRenderer.service.portName }} + port: {{ .Values.imageRenderer.service.port }} + protocol: TCP + targetPort: {{ .Values.imageRenderer.service.targetPort }} + {{- if .Values.imageRenderer.appProtocol }} + appProtocol: {{ .Values.imageRenderer.appProtocol }} + {{- end }} + selector: + {{- include "grafana.imageRenderer.selectorLabels" . | nindent 4 }} +{{ end }} +{{ end }} diff --git a/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/ingress.yaml b/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/ingress.yaml new file mode 100644 index 00000000..7699ceca --- /dev/null +++ b/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/ingress.yaml @@ -0,0 +1,78 @@ +{{- if .Values.ingress.enabled -}} +{{- $ingressApiIsStable := eq (include "grafana.ingress.isStable" .) "true" -}} +{{- $ingressSupportsIngressClassName := eq (include "grafana.ingress.supportsIngressClassName" .) "true" -}} +{{- $ingressSupportsPathType := eq (include "grafana.ingress.supportsPathType" .) "true" -}} +{{- $fullName := include "grafana.fullname" . -}} +{{- $servicePort := .Values.service.port -}} +{{- $ingressPath := .Values.ingress.path -}} +{{- $ingressPathType := .Values.ingress.pathType -}} +{{- $extraPaths := .Values.ingress.extraPaths -}} +apiVersion: {{ include "grafana.ingress.apiVersion" . }} +kind: Ingress +metadata: + name: {{ $fullName }} + namespace: {{ template "grafana.namespace" . }} + labels: + {{- include "grafana.labels" . | nindent 4 }} +{{- if .Values.ingress.labels }} +{{ toYaml .Values.ingress.labels | indent 4 }} +{{- end }} + {{- if .Values.ingress.annotations }} + annotations: + {{- range $key, $value := .Values.ingress.annotations }} + {{ $key }}: {{ tpl $value $ | quote }} + {{- end }} + {{- end }} +spec: + {{- if and $ingressSupportsIngressClassName .Values.ingress.ingressClassName }} + ingressClassName: {{ .Values.ingress.ingressClassName }} + {{- end -}} +{{- if .Values.ingress.tls }} + tls: +{{ tpl (toYaml .Values.ingress.tls) $ | indent 4 }} +{{- end }} + rules: + {{- if .Values.ingress.hosts }} + {{- range .Values.ingress.hosts }} + - host: {{ tpl . $}} + http: + paths: +{{- if $extraPaths }} +{{ toYaml $extraPaths | indent 10 }} +{{- end }} + - path: {{ $ingressPath }} + {{- if $ingressSupportsPathType }} + pathType: {{ $ingressPathType }} + {{- end }} + backend: + {{- if $ingressApiIsStable }} + service: + name: {{ $fullName }} + port: + number: {{ $servicePort }} + {{- else }} + serviceName: {{ $fullName }} + servicePort: {{ $servicePort }} + {{- end }} + {{- end }} + {{- else }} + - http: + paths: + - backend: + {{- if $ingressApiIsStable }} + service: + name: {{ $fullName }} + port: + number: {{ $servicePort }} + {{- else }} + serviceName: {{ $fullName }} + servicePort: {{ $servicePort }} + {{- end }} + {{- if $ingressPath }} + path: {{ $ingressPath }} + {{- end }} + {{- if $ingressSupportsPathType }} + pathType: {{ $ingressPathType }} + {{- end }} + {{- end -}} +{{- end }} diff --git a/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/networkpolicy.yaml b/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/networkpolicy.yaml new file mode 100644 index 00000000..b751d943 --- /dev/null +++ b/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/networkpolicy.yaml @@ -0,0 +1,52 @@ +{{- if .Values.networkPolicy.enabled }} +apiVersion: networking.k8s.io/v1 +kind: NetworkPolicy +metadata: + name: {{ template "grafana.fullname" . }} + namespace: {{ template "grafana.namespace" . }} + labels: + {{- include "grafana.labels" . | nindent 4 }} + {{- with .Values.labels }} + {{ toYaml . | nindent 4 }} + {{- end }} + {{- with .Values.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + policyTypes: + {{- if .Values.networkPolicy.ingress }} + - Ingress + {{- end }} + {{- if .Values.networkPolicy.egress.enabled }} + - Egress + {{- end }} + podSelector: + matchLabels: + {{- include "grafana.selectorLabels" . | nindent 6 }} + + {{- if .Values.networkPolicy.egress.enabled }} + egress: + - ports: + {{ .Values.networkPolicy.egress.ports | toJson }} + {{- end }} + {{- if .Values.networkPolicy.ingress }} + ingress: + - ports: + - port: {{ .Values.service.targetPort }} + {{- if not .Values.networkPolicy.allowExternal }} + from: + - podSelector: + matchLabels: + {{ template "grafana.fullname" . }}-client: "true" + {{- with .Values.networkPolicy.explicitNamespacesSelector }} + - namespaceSelector: + {{- toYaml . | nindent 12 }} + {{- end }} + - podSelector: + matchLabels: + {{- include "grafana.labels" . | nindent 14 }} + role: read + {{- end }} + {{- end }} +{{- end }} diff --git a/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/nginx-config.yaml b/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/nginx-config.yaml new file mode 100644 index 00000000..062fc29c --- /dev/null +++ b/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/nginx-config.yaml @@ -0,0 +1,94 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: grafana-nginx-proxy-config + namespace: {{ template "grafana.namespace" . }} + labels: + {{- include "grafana.labels" . | nindent 4 }} +data: + nginx.conf: |- + worker_processes auto; + error_log /dev/stdout warn; + pid /var/cache/nginx/nginx.pid; + + events { + worker_connections 1024; + } + + http { + include /etc/nginx/mime.types; + log_format main '[$time_local - $status] $remote_addr - $remote_user $request ($http_referer)'; + + proxy_connect_timeout 10; + proxy_read_timeout 180; + proxy_send_timeout 5; + proxy_buffering off; + proxy_cache_path /var/cache/nginx/cache levels=1:2 keys_zone=my_zone:100m inactive=1d max_size=10g; + + map $http_upgrade $connection_upgrade { + default upgrade; + '' close; + } + + server { + listen 8080; + access_log off; + + gzip on; + gzip_min_length 1k; + gzip_comp_level 2; + gzip_types text/plain application/javascript application/x-javascript text/css application/xml text/javascript image/jpeg image/gif image/png; + gzip_vary on; + gzip_disable "MSIE [1-6]\."; + + proxy_set_header Host $http_host; + + location /api/dashboards { + proxy_pass http://localhost:3000; + } + + location /api/search { + proxy_pass http://localhost:3000; + + sub_filter_types application/json; + sub_filter_once off; + sub_filter '"url":"/d' '"url":"d'; + } + + location /api/live/ { + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection $connection_upgrade; + proxy_set_header Host $http_host; + proxy_pass http://localhost:3000; + } + + location / { + proxy_cache my_zone; + proxy_cache_valid 200 302 1d; + proxy_cache_valid 301 30d; + proxy_cache_valid any 5m; + proxy_cache_bypass $http_cache_control; + add_header X-Proxy-Cache $upstream_cache_status; + add_header Cache-Control "public"; + + proxy_pass http://localhost:3000/; + + sub_filter_once off; +{{- if not (empty .Values.global.cattle.clusterId) }} + sub_filter '"appSubUrl":""' '"appSubUrl":"/k8s/clusters/{{ .Values.global.cattle.clusterId }}/api/v1/namespaces/{{ template "grafana.namespace" . }}/services/http:{{ template "grafana.fullname" . }}:{{ .Values.service.port }}/proxy"'; +{{- else }} + sub_filter '"appSubUrl":""' '"appSubUrl":"/api/v1/namespaces/{{ template "grafana.namespace" . }}/services/http:{{ template "grafana.fullname" . }}:{{ .Values.service.port }}/proxy"'; +{{- end }} + sub_filter '"url":"/' '"url":"./'; + sub_filter ':"/avatar/' ':"avatar/'; + + if ($request_filename ~ .*\.(?:js|css|jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|ogg|ogv|webm)$) { + expires 90d; + } + + rewrite ^/k8s/clusters/.*/proxy(.*) /$1 break; + + } + } + } diff --git a/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/poddisruptionbudget.yaml b/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/poddisruptionbudget.yaml new file mode 100644 index 00000000..70901b70 --- /dev/null +++ b/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/poddisruptionbudget.yaml @@ -0,0 +1,22 @@ +{{- if .Values.podDisruptionBudget }} +apiVersion: {{ include "grafana.podDisruptionBudget.apiVersion" . }} +kind: PodDisruptionBudget +metadata: + name: {{ template "grafana.fullname" . }} + namespace: {{ template "grafana.namespace" . }} + labels: + {{- include "grafana.labels" . | nindent 4 }} +{{- if .Values.labels }} +{{ toYaml .Values.labels | indent 4 }} +{{- end }} +spec: +{{- if .Values.podDisruptionBudget.minAvailable }} + minAvailable: {{ .Values.podDisruptionBudget.minAvailable }} +{{- end }} +{{- if .Values.podDisruptionBudget.maxUnavailable }} + maxUnavailable: {{ .Values.podDisruptionBudget.maxUnavailable }} +{{- end }} + selector: + matchLabels: + {{- include "grafana.selectorLabels" . | nindent 6 }} +{{- end }} diff --git a/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/podsecuritypolicy.yaml b/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/podsecuritypolicy.yaml new file mode 100644 index 00000000..04bcd614 --- /dev/null +++ b/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/podsecuritypolicy.yaml @@ -0,0 +1,47 @@ +{{- if .Values.rbac.pspEnabled }} +{{- if .Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy" }} +apiVersion: policy/v1beta1 +kind: PodSecurityPolicy +metadata: + name: {{ template "grafana.fullname" . }} + labels: + {{- include "grafana.labels" . | nindent 4 }} +{{- if .Values.rbac.pspAnnotations }} + annotations: {{ toYaml .Values.rbac.pspAnnotations | nindent 4 }} +{{- end }} +spec: + privileged: false + allowPrivilegeEscalation: false + requiredDropCapabilities: + # Default set from Docker, with DAC_OVERRIDE and CHOWN + - ALL + volumes: + - 'configMap' + - 'emptyDir' + - 'projected' + - 'csi' + - 'secret' + - 'downwardAPI' + - 'persistentVolumeClaim' + hostNetwork: false + hostIPC: false + hostPID: false + runAsUser: + rule: 'RunAsAny' + seLinux: + rule: 'RunAsAny' + supplementalGroups: + rule: 'MustRunAs' + ranges: + # Forbid adding the root group. + - min: 1 + max: 65535 + fsGroup: + rule: 'MustRunAs' + ranges: + # Forbid adding the root group. + - min: 1 + max: 65535 + readOnlyRootFilesystem: false +{{- end }} +{{- end }} diff --git a/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/pvc.yaml b/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/pvc.yaml new file mode 100644 index 00000000..8a3ee122 --- /dev/null +++ b/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/pvc.yaml @@ -0,0 +1,35 @@ +{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) (eq .Values.persistence.type "pvc")}} +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: {{ template "grafana.fullname" . }} + namespace: {{ template "grafana.namespace" . }} + labels: + {{- include "grafana.labels" . | nindent 4 }} + {{- with .Values.persistence.annotations }} + annotations: +{{ toYaml . | indent 4 }} + {{- end }} + {{- with .Values.persistence.finalizers }} + finalizers: +{{ toYaml . | indent 4 }} + {{- end }} +spec: + accessModes: +{{- $_ := required "Must provide at least one access mode for persistent volumes used by Grafana" .Values.persistence.accessModes }} +{{- $_ := required "Must provide at least one access mode for persistent volumes used by Grafana" (first .Values.persistence.accessModes) }} + {{- range .Values.persistence.accessModes }} + - {{ . | quote }} + {{- end }} + resources: + requests: + storage: {{ required "Must provide size for persistent volumes used by Grafana" .Values.persistence.size | quote }} + {{- if .Values.persistence.storageClassName }} + storageClassName: {{ .Values.persistence.storageClassName }} + {{- end -}} + {{- with .Values.persistence.selectorLabels }} + selector: + matchLabels: +{{ toYaml . | indent 6 }} + {{- end }} +{{- end -}} diff --git a/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/role.yaml b/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/role.yaml new file mode 100644 index 00000000..ff2160f4 --- /dev/null +++ b/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/role.yaml @@ -0,0 +1,32 @@ +{{- if and .Values.rbac.create (not .Values.rbac.useExistingRole) -}} +apiVersion: {{ template "grafana.rbac.apiVersion" . }} +kind: Role +metadata: + name: {{ template "grafana.fullname" . }} + namespace: {{ template "grafana.namespace" . }} + labels: + {{- include "grafana.labels" . | nindent 4 }} +{{- with .Values.annotations }} + annotations: +{{ toYaml . | indent 4 }} +{{- end }} +{{- if or .Values.rbac.pspEnabled (and .Values.rbac.namespaced (or .Values.sidecar.dashboards.enabled (or .Values.sidecar.datasources.enabled (or .Values.sidecar.plugins.enabled .Values.rbac.extraRoleRules)))) }} +rules: +{{- if .Values.rbac.pspEnabled }} +- apiGroups: ['extensions'] + resources: ['podsecuritypolicies'] + verbs: ['use'] + resourceNames: [{{ template "grafana.fullname" . }}] +{{- end }} +{{- if and .Values.rbac.namespaced (or .Values.sidecar.dashboards.enabled (or .Values.sidecar.datasources.enabled .Values.sidecar.plugins.enabled)) }} +- apiGroups: [""] # "" indicates the core API group + resources: ["configmaps", "secrets"] + verbs: ["get", "watch", "list"] +{{- end }} +{{- with .Values.rbac.extraRoleRules }} +{{ toYaml . | indent 0 }} +{{- end}} +{{- else }} +rules: [] +{{- end }} +{{- end }} diff --git a/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/rolebinding.yaml b/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/rolebinding.yaml new file mode 100644 index 00000000..e0107255 --- /dev/null +++ b/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/rolebinding.yaml @@ -0,0 +1,25 @@ +{{- if .Values.rbac.create -}} +apiVersion: {{ template "grafana.rbac.apiVersion" . }} +kind: RoleBinding +metadata: + name: {{ template "grafana.fullname" . }} + namespace: {{ template "grafana.namespace" . }} + labels: + {{- include "grafana.labels" . | nindent 4 }} +{{- with .Values.annotations }} + annotations: +{{ toYaml . | indent 4 }} +{{- end }} +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role +{{- if (not .Values.rbac.useExistingRole) }} + name: {{ template "grafana.fullname" . }} +{{- else }} + name: {{ .Values.rbac.useExistingRole }} +{{- end }} +subjects: +- kind: ServiceAccount + name: {{ template "grafana.serviceAccountName" . }} + namespace: {{ template "grafana.namespace" . }} +{{- end -}} diff --git a/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/secret-env.yaml b/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/secret-env.yaml new file mode 100644 index 00000000..5c09313e --- /dev/null +++ b/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/secret-env.yaml @@ -0,0 +1,14 @@ +{{- if .Values.envRenderSecret }} +apiVersion: v1 +kind: Secret +metadata: + name: {{ template "grafana.fullname" . }}-env + namespace: {{ template "grafana.namespace" . }} + labels: + {{- include "grafana.labels" . | nindent 4 }} +type: Opaque +data: +{{- range $key, $val := .Values.envRenderSecret }} + {{ $key }}: {{ $val | b64enc | quote }} +{{- end -}} +{{- end }} diff --git a/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/secret.yaml b/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/secret.yaml new file mode 100644 index 00000000..c8aa750a --- /dev/null +++ b/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/secret.yaml @@ -0,0 +1,26 @@ +{{- if or (and (not .Values.admin.existingSecret) (not .Values.env.GF_SECURITY_ADMIN_PASSWORD__FILE) (not .Values.env.GF_SECURITY_ADMIN_PASSWORD) (not .Values.env.GF_SECURITY_DISABLE_INITIAL_ADMIN_CREATION)) (and .Values.ldap.enabled (not .Values.ldap.existingSecret)) }} +apiVersion: v1 +kind: Secret +metadata: + name: {{ template "grafana.fullname" . }} + namespace: {{ template "grafana.namespace" . }} + labels: + {{- include "grafana.labels" . | nindent 4 }} +{{- with .Values.annotations }} + annotations: +{{ toYaml . | indent 4 }} +{{- end }} +type: Opaque +data: + {{- if and (not .Values.env.GF_SECURITY_DISABLE_INITIAL_ADMIN_CREATION) (not .Values.admin.existingSecret) (not .Values.env.GF_SECURITY_ADMIN_PASSWORD__FILE) (not .Values.env.GF_SECURITY_ADMIN_PASSWORD) }} + admin-user: {{ .Values.adminUser | b64enc | quote }} + {{- if .Values.adminPassword }} + admin-password: {{ .Values.adminPassword | b64enc | quote }} + {{- else }} + admin-password: {{ template "grafana.password" . }} + {{- end }} + {{- end }} + {{- if not .Values.ldap.existingSecret }} + ldap-toml: {{ tpl .Values.ldap.config $ | b64enc | quote }} + {{- end }} +{{- end }} diff --git a/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/service.yaml b/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/service.yaml new file mode 100644 index 00000000..d0a1756c --- /dev/null +++ b/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/service.yaml @@ -0,0 +1,55 @@ +{{ if .Values.service.enabled }} +apiVersion: v1 +kind: Service +metadata: + name: {{ template "grafana.fullname" . }} + namespace: {{ template "grafana.namespace" . }} + labels: + {{- include "grafana.labels" . | nindent 4 }} +{{- if .Values.service.labels }} +{{ toYaml .Values.service.labels | indent 4 }} +{{- end }} +{{- $root := . }} +{{- with .Values.service.annotations }} + annotations: +{{ tpl (toYaml . | indent 4) $root }} +{{- end }} +spec: +{{- if (or (eq .Values.service.type "ClusterIP") (empty .Values.service.type)) }} + type: ClusterIP + {{- if .Values.service.clusterIP }} + clusterIP: {{ .Values.service.clusterIP }} + {{end}} +{{- else if eq .Values.service.type "LoadBalancer" }} + type: {{ .Values.service.type }} + {{- if .Values.service.loadBalancerIP }} + loadBalancerIP: {{ .Values.service.loadBalancerIP }} + {{- end }} + {{- if .Values.service.loadBalancerSourceRanges }} + loadBalancerSourceRanges: +{{ toYaml .Values.service.loadBalancerSourceRanges | indent 4 }} + {{- end -}} +{{- else }} + type: {{ .Values.service.type }} +{{- end }} +{{- if .Values.service.externalIPs }} + externalIPs: +{{ toYaml .Values.service.externalIPs | indent 4 }} +{{- end }} + ports: + - name: {{ .Values.service.portName }} + port: {{ .Values.service.port }} + protocol: TCP + targetPort: {{ .Values.service.targetPort }} + {{- if .Values.service.appProtocol }} + appProtocol: {{ .Values.service.appProtocol }} + {{- end }} + {{- if (and (eq .Values.service.type "NodePort") (not (empty .Values.service.nodePort))) }} + nodePort: {{.Values.service.nodePort}} + {{ end }} + {{- if .Values.extraExposePorts }} + {{- tpl (toYaml .Values.extraExposePorts) . | nindent 4 }} + {{- end }} + selector: + {{- include "grafana.selectorLabels" . | nindent 4 }} +{{ end }} diff --git a/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/serviceaccount.yaml b/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/serviceaccount.yaml new file mode 100644 index 00000000..4ccee15e --- /dev/null +++ b/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/serviceaccount.yaml @@ -0,0 +1,14 @@ +{{- if .Values.serviceAccount.create }} +apiVersion: v1 +kind: ServiceAccount +metadata: + labels: + {{- include "grafana.labels" . | nindent 4 }} +{{- $root := . }} +{{- with .Values.serviceAccount.annotations }} + annotations: +{{ tpl (toYaml . | indent 4) $root }} +{{- end }} + name: {{ template "grafana.serviceAccountName" . }} + namespace: {{ template "grafana.namespace" . }} +{{- end }} diff --git a/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/servicemonitor.yaml b/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/servicemonitor.yaml new file mode 100644 index 00000000..0876a637 --- /dev/null +++ b/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/servicemonitor.yaml @@ -0,0 +1,44 @@ +{{- if .Values.serviceMonitor.enabled }} +--- +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + name: {{ template "grafana.fullname" . }} + {{- if .Values.serviceMonitor.namespace }} + namespace: {{ tpl .Values.serviceMonitor.namespace . }} + {{- else }} + namespace: {{ template "grafana.namespace" . }} + {{- end }} + labels: + {{- include "grafana.labels" . | nindent 4 }} + {{- if .Values.serviceMonitor.labels }} + {{- toYaml .Values.serviceMonitor.labels | nindent 4 }} + {{- end }} +spec: + endpoints: + - port: {{ .Values.service.portName }} + {{- with .Values.serviceMonitor.interval }} + interval: {{ . }} + {{- end }} + {{- with .Values.serviceMonitor.scrapeTimeout }} + scrapeTimeout: {{ . }} + {{- end }} + honorLabels: true + path: {{ .Values.serviceMonitor.path }} + scheme: {{ .Values.serviceMonitor.scheme }} + {{- if .Values.serviceMonitor.tlsConfig }} + tlsConfig: + {{- toYaml .Values.serviceMonitor.tlsConfig | nindent 6 }} + {{- end }} + {{- if .Values.serviceMonitor.relabelings }} + relabelings: + {{- toYaml .Values.serviceMonitor.relabelings | nindent 4 }} + {{- end }} + jobLabel: "{{ .Release.Name }}" + selector: + matchLabels: + {{- include "grafana.selectorLabels" . | nindent 8 }} + namespaceSelector: + matchNames: + - {{ template "grafana.namespace" . }} +{{- end }} diff --git a/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/statefulset.yaml b/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/statefulset.yaml new file mode 100644 index 00000000..aa6f305e --- /dev/null +++ b/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/statefulset.yaml @@ -0,0 +1,56 @@ +{{- if (or (.Values.useStatefulSet) (and .Values.persistence.enabled (not .Values.persistence.existingClaim) (eq .Values.persistence.type "statefulset")))}} +apiVersion: apps/v1 +kind: StatefulSet +metadata: + name: {{ template "grafana.fullname" . }} + namespace: {{ template "grafana.namespace" . }} + labels: + {{- include "grafana.labels" . | nindent 4 }} +{{- with .Values.annotations }} + annotations: +{{ toYaml . | indent 4 }} +{{- end }} +spec: + replicas: {{ .Values.replicas }} + selector: + matchLabels: + {{- include "grafana.selectorLabels" . | nindent 6 }} + serviceName: {{ template "grafana.fullname" . }}-headless + template: + metadata: + labels: + {{- include "grafana.selectorLabels" . | nindent 8 }} +{{- with .Values.podLabels }} +{{ toYaml . | indent 8 }} +{{- end }} + annotations: + checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} + checksum/dashboards-json-config: {{ include (print $.Template.BasePath "/dashboards-json-configmap.yaml") . | sha256sum }} + checksum/sc-dashboard-provider-config: {{ include (print $.Template.BasePath "/configmap-dashboard-provider.yaml") . | sha256sum }} + {{- if and (or (and (not .Values.admin.existingSecret) (not .Values.env.GF_SECURITY_ADMIN_PASSWORD__FILE) (not .Values.env.GF_SECURITY_ADMIN_PASSWORD)) (and .Values.ldap.enabled (not .Values.ldap.existingSecret))) (not .Values.env.GF_SECURITY_DISABLE_INITIAL_ADMIN_CREATION) }} + checksum/secret: {{ include (print $.Template.BasePath "/secret.yaml") . | sha256sum }} +{{- end }} +{{- with .Values.podAnnotations }} +{{ toYaml . | indent 8 }} +{{- end }} + spec: + {{- include "grafana.pod" . | nindent 6 }} + {{- if .Values.persistence.enabled}} + volumeClaimTemplates: + - metadata: + name: storage + spec: +{{- $_ := required "Must provide at least one access mode for persistent volumes used by Grafana" .Values.persistence.accessModes }} +{{- $_ := required "Must provide at least one access mode for persistent volumes used by Grafana" (first .Values.persistence.accessModes) }} + accessModes: {{ .Values.persistence.accessModes }} + storageClassName: {{ .Values.persistence.storageClassName }} + resources: + requests: + storage: {{ required "Must provide size for persistent volumes used by Grafana" .Values.persistence.size }} + {{- with .Values.persistence.selectorLabels }} + selector: + matchLabels: +{{ toYaml . | indent 10 }} + {{- end }} + {{- end }} +{{- end }} diff --git a/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/tests/test-configmap.yaml b/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/tests/test-configmap.yaml new file mode 100644 index 00000000..ff53aaf1 --- /dev/null +++ b/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/tests/test-configmap.yaml @@ -0,0 +1,17 @@ +{{- if .Values.testFramework.enabled }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ template "grafana.fullname" . }}-test + namespace: {{ template "grafana.namespace" . }} + labels: + {{- include "grafana.labels" . | nindent 4 }} +data: + run.sh: |- + @test "Test Health" { + url="http://{{ template "grafana.fullname" . }}/api/health" + + code=$(wget --server-response --spider --timeout 10 --tries 1 ${url} 2>&1 | awk '/^ HTTP/{print $2}') + [ "$code" == "200" ] + } +{{- end }} diff --git a/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/tests/test-podsecuritypolicy.yaml b/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/tests/test-podsecuritypolicy.yaml new file mode 100644 index 00000000..58b46498 --- /dev/null +++ b/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/tests/test-podsecuritypolicy.yaml @@ -0,0 +1,29 @@ +{{- if and .Values.testFramework.enabled .Values.rbac.pspEnabled }} +apiVersion: policy/v1beta1 +kind: PodSecurityPolicy +metadata: + name: {{ template "grafana.fullname" . }}-test + labels: + {{- include "grafana.labels" . | nindent 4 }} +spec: + allowPrivilegeEscalation: true + privileged: false + hostNetwork: false + hostIPC: false + hostPID: false + fsGroup: + rule: RunAsAny + seLinux: + rule: RunAsAny + supplementalGroups: + rule: RunAsAny + runAsUser: + rule: RunAsAny + volumes: + - configMap + - downwardAPI + - emptyDir + - projected + - csi + - secret +{{- end }} diff --git a/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/tests/test-role.yaml b/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/tests/test-role.yaml new file mode 100644 index 00000000..6b10677a --- /dev/null +++ b/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/tests/test-role.yaml @@ -0,0 +1,14 @@ +{{- if and .Values.testFramework.enabled .Values.rbac.pspEnabled -}} +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: {{ template "grafana.fullname" . }}-test + namespace: {{ template "grafana.namespace" . }} + labels: + {{- include "grafana.labels" . | nindent 4 }} +rules: +- apiGroups: ['policy'] + resources: ['podsecuritypolicies'] + verbs: ['use'] + resourceNames: [{{ template "grafana.fullname" . }}-test] +{{- end }} diff --git a/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/tests/test-rolebinding.yaml b/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/tests/test-rolebinding.yaml new file mode 100644 index 00000000..58fa5e78 --- /dev/null +++ b/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/tests/test-rolebinding.yaml @@ -0,0 +1,17 @@ +{{- if and .Values.testFramework.enabled .Values.rbac.pspEnabled -}} +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: {{ template "grafana.fullname" . }}-test + namespace: {{ template "grafana.namespace" . }} + labels: + {{- include "grafana.labels" . | nindent 4 }} +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: {{ template "grafana.fullname" . }}-test +subjects: +- kind: ServiceAccount + name: {{ template "grafana.serviceAccountNameTest" . }} + namespace: {{ template "grafana.namespace" . }} +{{- end }} diff --git a/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/tests/test-serviceaccount.yaml b/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/tests/test-serviceaccount.yaml new file mode 100644 index 00000000..5c335073 --- /dev/null +++ b/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/tests/test-serviceaccount.yaml @@ -0,0 +1,9 @@ +{{- if and .Values.testFramework.enabled .Values.serviceAccount.create }} +apiVersion: v1 +kind: ServiceAccount +metadata: + labels: + {{- include "grafana.labels" . | nindent 4 }} + name: {{ template "grafana.serviceAccountNameTest" . }} + namespace: {{ template "grafana.namespace" . }} +{{- end }} diff --git a/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/tests/test.yaml b/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/tests/test.yaml new file mode 100644 index 00000000..3a84fbe0 --- /dev/null +++ b/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/templates/tests/test.yaml @@ -0,0 +1,51 @@ +{{- if .Values.testFramework.enabled }} +apiVersion: v1 +kind: Pod +metadata: + name: {{ template "grafana.fullname" . }}-test + labels: + {{- include "grafana.labels" . | nindent 4 }} + annotations: + "helm.sh/hook": test-success + "helm.sh/hook-delete-policy": "before-hook-creation,hook-succeeded" + namespace: {{ template "grafana.namespace" . }} +spec: + serviceAccountName: {{ template "grafana.serviceAccountNameTest" . }} + {{- if .Values.testFramework.securityContext }} + securityContext: {{ toYaml .Values.testFramework.securityContext | nindent 4 }} + {{- end }} + {{- $root := . }} + {{- if .Values.image.pullSecrets }} + imagePullSecrets: + {{- range .Values.image.pullSecrets }} + - name: {{ tpl . $root }} + {{- end}} + {{- end }} + nodeSelector: {{ include "linux-node-selector" . | nindent 4 }} + {{- if .Values.nodeSelector }} +{{ toYaml .Values.nodeSelector | indent 4 }} + {{- end }} + {{- $root := . }} + {{- with .Values.affinity }} + affinity: +{{ tpl (toYaml .) $root | indent 4 }} + {{- end }} + tolerations: {{ include "linux-node-tolerations" . | nindent 4 }} +{{- if .Values.tolerations }} +{{ toYaml .Values.tolerations | indent 4 }} +{{- end }} + containers: + - name: {{ .Release.Name }}-test + image: "{{ template "system_default_registry" . }}{{ .Values.testFramework.image}}:{{ .Values.testFramework.tag }}" + imagePullPolicy: "{{ .Values.testFramework.imagePullPolicy}}" + command: ["/opt/bats/bin/bats", "-t", "/tests/run.sh"] + volumeMounts: + - mountPath: /tests + name: tests + readOnly: true + volumes: + - name: tests + configMap: + name: {{ template "grafana.fullname" . }}-test + restartPolicy: Never +{{- end }} diff --git a/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/values.yaml b/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/values.yaml new file mode 100644 index 00000000..800270cf --- /dev/null +++ b/charts/rancher-project-monitoring/0.2.0-rc1/charts/grafana/values.yaml @@ -0,0 +1,1061 @@ +global: + cattle: + systemDefaultRegistry: "" + projectNamespaces: [] + +rbac: + create: true + ## Use an existing ClusterRole/Role (depending on rbac.namespaced false/true) + # useExistingRole: name-of-some-(cluster)role + pspEnabled: true + pspAnnotations: {} + ## Specify pod annotations + ## Ref: https://kubernetes.io/docs/concepts/policy/pod-security-policy/#apparmor + ## Ref: https://kubernetes.io/docs/concepts/policy/pod-security-policy/#seccomp + ## Ref: https://kubernetes.io/docs/concepts/policy/pod-security-policy/#sysctl + ## + # seccomp.security.alpha.kubernetes.io/allowedProfileNames: 'docker/default,runtime/default' + # seccomp.security.alpha.kubernetes.io/defaultProfileName: 'docker/default' + # apparmor.security.beta.kubernetes.io/allowedProfileNames: 'runtime/default' + # apparmor.security.beta.kubernetes.io/defaultProfileName: 'runtime/default' + + namespaced: false + extraRoleRules: [] + # - apiGroups: [] + # resources: [] + # verbs: [] + extraClusterRoleRules: [] + # - apiGroups: [] + # resources: [] + # verbs: [] +serviceAccount: + create: true + name: + nameTest: +## Service account annotations. Can be templated. +# annotations: +# eks.amazonaws.com/role-arn: arn:aws:iam::123456789000:role/iam-role-name-here + autoMount: true + +replicas: 1 + +## Create a headless service for the deployment +headlessService: false + +## Create HorizontalPodAutoscaler object for deployment type +# +autoscaling: + enabled: false +# minReplicas: 1 +# maxReplicas: 10 +# metrics: +# - type: Resource +# resource: +# name: cpu +# targetAverageUtilization: 60 +# - type: Resource +# resource: +# name: memory +# targetAverageUtilization: 60 + +## See `kubectl explain poddisruptionbudget.spec` for more +## ref: https://kubernetes.io/docs/tasks/run-application/configure-pdb/ +podDisruptionBudget: {} +# minAvailable: 1 +# maxUnavailable: 1 + +## See `kubectl explain deployment.spec.strategy` for more +## ref: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#strategy +deploymentStrategy: + type: RollingUpdate + +readinessProbe: + httpGet: + path: /api/health + port: 3000 + +livenessProbe: + httpGet: + path: /api/health + port: 3000 + initialDelaySeconds: 60 + timeoutSeconds: 30 + failureThreshold: 10 + +## Use an alternate scheduler, e.g. "stork". +## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/ +## +# schedulerName: "default-scheduler" + +image: + repository: rancher/mirrored-grafana-grafana + # Overrides the Grafana image tag whose default is the chart appVersion + tag: 9.1.5 + sha: "" + pullPolicy: IfNotPresent + + ## Optionally specify an array of imagePullSecrets. + ## Secrets must be manually created in the namespace. + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ + ## Can be templated. + ## + # pullSecrets: + # - myRegistrKeySecretName + +testFramework: + enabled: false + image: "rancher/mirrored-bats-bats" + tag: "v1.4.1" + imagePullPolicy: IfNotPresent + securityContext: + runAsNonRoot: true + runAsUser: 1000 + +securityContext: + runAsNonRoot: true + runAsUser: 472 + runAsGroup: 472 + fsGroup: 472 + +containerSecurityContext: + {} + +# Enable creating the grafana configmap +createConfigmap: true + +# Extra configmaps to mount in grafana pods +# Values are templated. +extraConfigmapMounts: [] + # - name: certs-configmap + # mountPath: /etc/grafana/ssl/ + # subPath: certificates.crt # (optional) + # configMap: certs-configmap + # readOnly: true + + +extraEmptyDirMounts: [] + # - name: provisioning-notifiers + # mountPath: /etc/grafana/provisioning/notifiers + + +# Apply extra labels to common labels. +extraLabels: {} + +## Assign a PriorityClassName to pods if set +# priorityClassName: + +downloadDashboardsImage: + repository: rancher/mirrored-curlimages-curl + tag: 7.85.0 + sha: "" + pullPolicy: IfNotPresent + +downloadDashboards: + env: {} + envFromSecret: "" + resources: {} + securityContext: {} + +## Pod Annotations +# podAnnotations: {} + +## Pod Labels +# podLabels: {} + +podPortName: grafana + +## Deployment annotations +# annotations: {} + +## Expose the grafana service to be accessed from outside the cluster (LoadBalancer service). +## or access it from within the cluster (ClusterIP service). Set the service type and the port to serve it. +## ref: http://kubernetes.io/docs/user-guide/services/ +## +service: + enabled: true + type: ClusterIP + port: 80 + targetPort: 3000 + # targetPort: 4181 To be used with a proxy extraContainer + ## Service annotations. Can be templated. + annotations: {} + labels: {} + portName: service + # Adds the appProtocol field to the service. This allows to work with istio protocol selection. Ex: "http" or "tcp" + appProtocol: "" + +serviceMonitor: + ## If true, a ServiceMonitor CRD is created for a prometheus operator + ## https://github.com/coreos/prometheus-operator + ## + enabled: false + path: /metrics + # namespace: monitoring (defaults to use the namespace this chart is deployed to) + labels: {} + interval: 1m + scheme: http + tlsConfig: {} + scrapeTimeout: 30s + relabelings: [] + +extraExposePorts: [] + # - name: keycloak + # port: 8080 + # targetPort: 8080 + # type: ClusterIP + +# overrides pod.spec.hostAliases in the grafana deployment's pods +hostAliases: [] + # - ip: "1.2.3.4" + # hostnames: + # - "my.host.com" + +ingress: + enabled: false + # For Kubernetes >= 1.18 you should specify the ingress-controller via the field ingressClassName + # See https://kubernetes.io/blog/2020/04/02/improvements-to-the-ingress-api-in-kubernetes-1.18/#specifying-the-class-of-an-ingress + # ingressClassName: nginx + # Values can be templated + annotations: {} + # kubernetes.io/ingress.class: nginx + # kubernetes.io/tls-acme: "true" + labels: {} + path: / + + # pathType is only for k8s >= 1.18 + pathType: Prefix + + hosts: + - chart-example.local + ## Extra paths to prepend to every host configuration. This is useful when working with annotation based services. + extraPaths: [] + # - path: /* + # backend: + # serviceName: ssl-redirect + # servicePort: use-annotation + ## Or for k8s > 1.19 + # - path: /* + # pathType: Prefix + # backend: + # service: + # name: ssl-redirect + # port: + # name: use-annotation + + + tls: [] + # - secretName: chart-example-tls + # hosts: + # - chart-example.local + +resources: {} +# limits: +# cpu: 100m +# memory: 128Mi +# requests: +# cpu: 100m +# memory: 128Mi + +## Node labels for pod assignment +## ref: https://kubernetes.io/docs/user-guide/node-selection/ +# +nodeSelector: {} + +## Tolerations for pod assignment +## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ +## +tolerations: [] + +## Affinity for pod assignment (evaluated as template) +## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity +## +affinity: {} + +## Topology Spread Constraints +## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/ +## +topologySpreadConstraints: [] + +## Additional init containers (evaluated as template) +## ref: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ +## +extraInitContainers: [] + +## Enable an Specify container in extraContainers. This is meant to allow adding an authentication proxy to a grafana pod +extraContainers: "" +# extraContainers: | +# - name: proxy +# image: quay.io/gambol99/keycloak-proxy:latest +# args: +# - -provider=github +# - -client-id= +# - -client-secret= +# - -github-org= +# - -email-domain=* +# - -cookie-secret= +# - -http-address=http://0.0.0.0:4181 +# - -upstream-url=http://127.0.0.1:3000 +# ports: +# - name: proxy-web +# containerPort: 4181 + +## Volumes that can be used in init containers that will not be mounted to deployment pods +extraContainerVolumes: [] +# - name: volume-from-secret +# secret: +# secretName: secret-to-mount +# - name: empty-dir-volume +# emptyDir: {} + +## Enable persistence using Persistent Volume Claims +## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/ +## +persistence: + type: pvc + enabled: false + # storageClassName: default + accessModes: + - ReadWriteOnce + size: 10Gi + # annotations: {} + finalizers: + - kubernetes.io/pvc-protection + # selectorLabels: {} + ## Sub-directory of the PV to mount. Can be templated. + # subPath: "" + ## Name of an existing PVC. Can be templated. + # existingClaim: + + ## If persistence is not enabled, this allows to mount the + ## local storage in-memory to improve performance + ## + inMemory: + enabled: false + ## The maximum usage on memory medium EmptyDir would be + ## the minimum value between the SizeLimit specified + ## here and the sum of memory limits of all containers in a pod + ## + # sizeLimit: 300Mi + +initChownData: + ## If false, data ownership will not be reset at startup + ## This allows the prometheus-server to be run with an arbitrary user + ## + enabled: true + + ## initChownData container image + ## + image: + repository: rancher/mirrored-library-busybox + tag: "1.31.1" + sha: "" + pullPolicy: IfNotPresent + + ## initChownData resource requests and limits + ## Ref: http://kubernetes.io/docs/user-guide/compute-resources/ + ## + resources: {} + # limits: + # cpu: 100m + # memory: 128Mi + # requests: + # cpu: 100m + # memory: 128Mi + + +# Administrator credentials when not using an existing secret (see below) +adminUser: admin +# adminPassword: strongpassword + +# Use an existing secret for the admin user. +admin: + ## Name of the secret. Can be templated. + existingSecret: "" + userKey: admin-user + passwordKey: admin-password + +## Define command to be executed at startup by grafana container +## Needed if using `vault-env` to manage secrets (ref: https://banzaicloud.com/blog/inject-secrets-into-pods-vault/) +## Default is "run.sh" as defined in grafana's Dockerfile +# command: +# - "sh" +# - "/run.sh" + +## Use an alternate scheduler, e.g. "stork". +## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/ +## +# schedulerName: + +## Extra environment variables that will be pass onto deployment pods +## +## to provide grafana with access to CloudWatch on AWS EKS: +## 1. create an iam role of type "Web identity" with provider oidc.eks.* (note the provider for later) +## 2. edit the "Trust relationships" of the role, add a line inside the StringEquals clause using the +## same oidc eks provider as noted before (same as the existing line) +## also, replace NAMESPACE and prometheus-operator-grafana with the service account namespace and name +## +## "oidc.eks.us-east-1.amazonaws.com/id/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:sub": "system:serviceaccount:NAMESPACE:prometheus-operator-grafana", +## +## 3. attach a policy to the role, you can use a built in policy called CloudWatchReadOnlyAccess +## 4. use the following env: (replace 123456789000 and iam-role-name-here with your aws account number and role name) +## +## env: +## AWS_ROLE_ARN: arn:aws:iam::123456789000:role/iam-role-name-here +## AWS_WEB_IDENTITY_TOKEN_FILE: /var/run/secrets/eks.amazonaws.com/serviceaccount/token +## AWS_REGION: us-east-1 +## +## 5. uncomment the EKS section in extraSecretMounts: below +## 6. uncomment the annotation section in the serviceAccount: above +## make sure to replace arn:aws:iam::123456789000:role/iam-role-name-here with your role arn + +env: {} + +## "valueFrom" environment variable references that will be added to deployment pods. Name is templated. +## ref: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.19/#envvarsource-v1-core +## Renders in container spec as: +## env: +## ... +## - name: +## valueFrom: +## +envValueFrom: {} + # ENV_NAME: + # configMapKeyRef: + # name: configmap-name + # key: value_key + +## The name of a secret in the same kubernetes namespace which contain values to be added to the environment +## This can be useful for auth tokens, etc. Value is templated. +envFromSecret: "" + +## Sensible environment variables that will be rendered as new secret object +## This can be useful for auth tokens, etc +envRenderSecret: {} + +## The names of secrets in the same kubernetes namespace which contain values to be added to the environment +## Each entry should contain a name key, and can optionally specify whether the secret must be defined with an optional key. +## Name is templated. +envFromSecrets: [] +## - name: secret-name +## optional: true + +## The names of conifgmaps in the same kubernetes namespace which contain values to be added to the environment +## Each entry should contain a name key, and can optionally specify whether the configmap must be defined with an optional key. +## Name is templated. +## ref: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#configmapenvsource-v1-core +envFromConfigMaps: [] +## - name: configmap-name +## optional: true + +# Inject Kubernetes services as environment variables. +# See https://kubernetes.io/docs/concepts/services-networking/connect-applications-service/#environment-variables +enableServiceLinks: true + +## Additional grafana server secret mounts +# Defines additional mounts with secrets. Secrets must be manually created in the namespace. +extraSecretMounts: [] + # - name: secret-files + # mountPath: /etc/secrets + # secretName: grafana-secret-files + # readOnly: true + # subPath: "" + # + # for AWS EKS (cloudwatch) use the following (see also instruction in env: above) + # - name: aws-iam-token + # mountPath: /var/run/secrets/eks.amazonaws.com/serviceaccount + # readOnly: true + # projected: + # defaultMode: 420 + # sources: + # - serviceAccountToken: + # audience: sts.amazonaws.com + # expirationSeconds: 86400 + # path: token + # + # for CSI e.g. Azure Key Vault use the following + # - name: secrets-store-inline + # mountPath: /run/secrets + # readOnly: true + # csi: + # driver: secrets-store.csi.k8s.io + # readOnly: true + # volumeAttributes: + # secretProviderClass: "akv-grafana-spc" + # nodePublishSecretRef: # Only required when using service principal mode + # name: grafana-akv-creds # Only required when using service principal mode + +## Additional grafana server volume mounts +# Defines additional volume mounts. +extraVolumeMounts: [] + # - name: extra-volume-0 + # mountPath: /mnt/volume0 + # readOnly: true + # existingClaim: volume-claim + # - name: extra-volume-1 + # mountPath: /mnt/volume1 + # readOnly: true + # hostPath: /usr/shared/ + # - name: grafana-secrets + # csi: true + # data: + # driver: secrets-store.csi.k8s.io + # readOnly: true + # volumeAttributes: + # secretProviderClass: "grafana-env-spc" + +## Container Lifecycle Hooks. Execute a specific bash command or make an HTTP request +lifecycleHooks: {} + # postStart: + # exec: + # command: [] + +## Pass the plugins you want installed as a list. +## +plugins: [] + # - digrich-bubblechart-panel + # - grafana-clock-panel + +## Configure grafana datasources +## ref: http://docs.grafana.org/administration/provisioning/#datasources +## +datasources: {} +# datasources.yaml: +# apiVersion: 1 +# datasources: +# - name: Prometheus +# type: prometheus +# url: http://prometheus-prometheus-server +# access: proxy +# isDefault: true +# - name: CloudWatch +# type: cloudwatch +# access: proxy +# uid: cloudwatch +# editable: false +# jsonData: +# authType: default +# defaultRegion: us-east-1 + +## Configure grafana alerting (can be templated) +## ref: http://docs.grafana.org/administration/provisioning/#alerting +## +alerting: {} + # rules.yaml: + # apiVersion: 1 + # groups: + # - orgId: 1 + # name: '{{ .Chart.Name }}_my_rule_group' + # folder: my_first_folder + # interval: 60s + # rules: + # - uid: my_id_1 + # title: my_first_rule + # condition: A + # data: + # - refId: A + # datasourceUid: '-100' + # model: + # conditions: + # - evaluator: + # params: + # - 3 + # type: gt + # operator: + # type: and + # query: + # params: + # - A + # reducer: + # type: last + # type: query + # datasource: + # type: __expr__ + # uid: '-100' + # expression: 1==0 + # intervalMs: 1000 + # maxDataPoints: 43200 + # refId: A + # type: math + # dashboardUid: my_dashboard + # panelId: 123 + # noDataState: Alerting + # for: 60s + # annotations: + # some_key: some_value + # labels: + # team: sre_team_1 + # contactpoints.yaml: + # apiVersion: 1 + # contactPoints: + # - orgId: 1 + # name: cp_1 + # receivers: + # - uid: first_uid + # type: pagerduty + # settings: + # integrationKey: XXX + # severity: critical + # class: ping failure + # component: Grafana + # group: app-stack + # summary: | + # {{ `{{ template "default.message" . }}` }} + +## Configure notifiers +## ref: http://docs.grafana.org/administration/provisioning/#alert-notification-channels +## +notifiers: {} +# notifiers.yaml: +# notifiers: +# - name: email-notifier +# type: email +# uid: email1 +# # either: +# org_id: 1 +# # or +# org_name: Main Org. +# is_default: true +# settings: +# addresses: an_email_address@example.com +# delete_notifiers: + +## Configure grafana dashboard providers +## ref: http://docs.grafana.org/administration/provisioning/#dashboards +## +## `path` must be /var/lib/grafana/dashboards/ +## +dashboardProviders: {} +# dashboardproviders.yaml: +# apiVersion: 1 +# providers: +# - name: 'default' +# orgId: 1 +# folder: '' +# type: file +# disableDeletion: false +# editable: true +# options: +# path: /var/lib/grafana/dashboards/default + +## Configure grafana dashboard to import +## NOTE: To use dashboards you must also enable/configure dashboardProviders +## ref: https://grafana.com/dashboards +## +## dashboards per provider, use provider name as key. +## +dashboards: {} + # default: + # some-dashboard: + # json: | + # $RAW_JSON + # custom-dashboard: + # file: dashboards/custom-dashboard.json + # prometheus-stats: + # gnetId: 2 + # revision: 2 + # datasource: Prometheus + # local-dashboard: + # url: https://example.com/repository/test.json + # token: '' + # local-dashboard-base64: + # url: https://example.com/repository/test-b64.json + # token: '' + # b64content: true + # local-dashboard-gitlab: + # url: https://example.com/repository/test-gitlab.json + # gitlabToken: '' + # local-dashboard-bitbucket: + # url: https://example.com/repository/test-bitbucket.json + # bearerToken: '' + +## Reference to external ConfigMap per provider. Use provider name as key and ConfigMap name as value. +## A provider dashboards must be defined either by external ConfigMaps or in values.yaml, not in both. +## ConfigMap data example: +## +## data: +## example-dashboard.json: | +## RAW_JSON +## +dashboardsConfigMaps: {} +# default: "" + +## Grafana's primary configuration +## NOTE: values in map will be converted to ini format +## ref: http://docs.grafana.org/installation/configuration/ +## +grafana.ini: + paths: + data: /var/lib/grafana/ + logs: /var/log/grafana + plugins: /var/lib/grafana/plugins + provisioning: /etc/grafana/provisioning + analytics: + check_for_updates: true + log: + mode: console + grafana_net: + url: https://grafana.net + server: + domain: "{{ if (and .Values.ingress.enabled .Values.ingress.hosts) }}{{ .Values.ingress.hosts | first }}{{ end }}" +## grafana Authentication can be enabled with the following values on grafana.ini + # server: + # The full public facing url you use in browser, used for redirects and emails + # root_url: + # https://grafana.com/docs/grafana/latest/auth/github/#enable-github-in-grafana + # auth.github: + # enabled: false + # allow_sign_up: false + # scopes: user:email,read:org + # auth_url: https://github.com/login/oauth/authorize + # token_url: https://github.com/login/oauth/access_token + # api_url: https://api.github.com/user + # team_ids: + # allowed_organizations: + # client_id: + # client_secret: +## LDAP Authentication can be enabled with the following values on grafana.ini +## NOTE: Grafana will fail to start if the value for ldap.toml is invalid + # auth.ldap: + # enabled: true + # allow_sign_up: true + # config_file: /etc/grafana/ldap.toml + +## Grafana's LDAP configuration +## Templated by the template in _helpers.tpl +## NOTE: To enable the grafana.ini must be configured with auth.ldap.enabled +## ref: http://docs.grafana.org/installation/configuration/#auth-ldap +## ref: http://docs.grafana.org/installation/ldap/#configuration +ldap: + enabled: false + # `existingSecret` is a reference to an existing secret containing the ldap configuration + # for Grafana in a key `ldap-toml`. + existingSecret: "" + # `config` is the content of `ldap.toml` that will be stored in the created secret + config: "" + # config: |- + # verbose_logging = true + + # [[servers]] + # host = "my-ldap-server" + # port = 636 + # use_ssl = true + # start_tls = false + # ssl_skip_verify = false + # bind_dn = "uid=%s,ou=users,dc=myorg,dc=com" + +## Grafana's SMTP configuration +## NOTE: To enable, grafana.ini must be configured with smtp.enabled +## ref: http://docs.grafana.org/installation/configuration/#smtp +smtp: + # `existingSecret` is a reference to an existing secret containing the smtp configuration + # for Grafana. + existingSecret: "" + userKey: "user" + passwordKey: "password" + +## Sidecars that collect the configmaps with specified label and stores the included files them into the respective folders +## Requires at least Grafana 5 to work and can't be used together with parameters dashboardProviders, datasources and dashboards +sidecar: + image: + repository: rancher/mirrored-kiwigrid-k8s-sidecar + tag: 1.19.2 + sha: "" + imagePullPolicy: IfNotPresent + resources: {} +# limits: +# cpu: 100m +# memory: 100Mi +# requests: +# cpu: 50m +# memory: 50Mi + securityContext: {} + # skipTlsVerify Set to true to skip tls verification for kube api calls + # skipTlsVerify: true + enableUniqueFilenames: false + readinessProbe: {} + livenessProbe: {} + # Log level default for all sidecars. Can be one of: DEBUG, INFO, WARN, ERROR, CRITICAL. Defaults to INFO + # logLevel: INFO + dashboards: + enabled: false + # Additional environment variables for the dashboards sidecar + env: {} + # Do not reprocess already processed unchanged resources on k8s API reconnect. + # ignoreAlreadyProcessed: true + SCProvider: true + # label that the configmaps with dashboards are marked with + label: grafana_dashboard + # value of label that the configmaps with dashboards are set to + labelValue: "" + # Log level. Can be one of: DEBUG, INFO, WARN, ERROR, CRITICAL. + # logLevel: INFO + # folder in the pod that should hold the collected dashboards (unless `defaultFolderName` is set) + folder: /tmp/dashboards + # The default folder name, it will create a subfolder under the `folder` and put dashboards in there instead + defaultFolderName: null + # Method to use to detect ConfigMap changes. With WATCH the sidecar will do a WATCH requests, with SLEEP it will list all ConfigMaps, then sleep for 60 seconds. + watchMethod: WATCH + # search in configmap, secret or both + resource: both + # If specified, the sidecar will look for annotation with this name to create folder and put graph here. + # You can use this parameter together with `provider.foldersFromFilesStructure`to annotate configmaps and create folder structure. + folderAnnotation: null + # Absolute path to shell script to execute after a configmap got reloaded + script: null + # watchServerTimeout: request to the server, asking it to cleanly close the connection after that. + # defaults to 60sec; much higher values like 3600 seconds (1h) are feasible for non-Azure K8S + # watchServerTimeout: 3600 + # + # watchClientTimeout: is a client-side timeout, configuring your local socket. + # If you have a network outage dropping all packets with no RST/FIN, + # this is how long your client waits before realizing & dropping the connection. + # defaults to 66sec (sic!) + # watchClientTimeout: 60 + # + # provider configuration that lets grafana manage the dashboards + provider: + # name of the provider, should be unique + name: sidecarProvider + # orgid as configured in grafana + orgid: 1 + # folder in which the dashboards should be imported in grafana + folder: '' + # type of the provider + type: file + # disableDelete to activate a import-only behaviour + disableDelete: false + # allow updating provisioned dashboards from the UI + allowUiUpdates: false + # allow Grafana to replicate dashboard structure from filesystem + foldersFromFilesStructure: false + # Additional dashboard sidecar volume mounts + extraMounts: [] + # Sets the size limit of the dashboard sidecar emptyDir volume + sizeLimit: {} + datasources: + enabled: false + # Additional environment variables for the datasourcessidecar + env: {} + # Do not reprocess already processed unchanged resources on k8s API reconnect. + # ignoreAlreadyProcessed: true + # label that the configmaps with datasources are marked with + label: grafana_datasource + # value of label that the configmaps with datasources are set to + labelValue: "" + # Log level. Can be one of: DEBUG, INFO, WARN, ERROR, CRITICAL. + # logLevel: INFO + # Method to use to detect ConfigMap changes. With WATCH the sidecar will do a WATCH requests, with SLEEP it will list all ConfigMaps, then sleep for 60 seconds. + watchMethod: WATCH + # search in configmap, secret or both + resource: both + # watchServerTimeout: request to the server, asking it to cleanly close the connection after that. + # defaults to 60sec; much higher values like 3600 seconds (1h) are feasible for non-Azure K8S + # watchServerTimeout: 3600 + # + # watchClientTimeout: is a client-side timeout, configuring your local socket. + # If you have a network outage dropping all packets with no RST/FIN, + # this is how long your client waits before realizing & dropping the connection. + # defaults to 66sec (sic!) + # watchClientTimeout: 60 + # + # Endpoint to send request to reload datasources + reloadURL: "http://localhost:3000/api/admin/provisioning/datasources/reload" + # Absolute path to shell script to execute after a datasource got reloaded + script: null + skipReload: true + # Deploy the datasource sidecar as an initContainer in addition to a container. + # This is needed if skipReload is true, to load any datasources defined at startup time. + initDatasources: true + # Sets the size limit of the datasource sidecar emptyDir volume + sizeLimit: {} + plugins: + enabled: false + # Additional environment variables for the plugins sidecar + env: {} + # Do not reprocess already processed unchanged resources on k8s API reconnect. + # ignoreAlreadyProcessed: true + # label that the configmaps with plugins are marked with + label: grafana_plugin + # value of label that the configmaps with plugins are set to + labelValue: "" + # Log level. Can be one of: DEBUG, INFO, WARN, ERROR, CRITICAL. + # logLevel: INFO + # Method to use to detect ConfigMap changes. With WATCH the sidecar will do a WATCH requests, with SLEEP it will list all ConfigMaps, then sleep for 60 seconds. + watchMethod: WATCH + # search in configmap, secret or both + resource: both + # watchServerTimeout: request to the server, asking it to cleanly close the connection after that. + # defaults to 60sec; much higher values like 3600 seconds (1h) are feasible for non-Azure K8S + # watchServerTimeout: 3600 + # + # watchClientTimeout: is a client-side timeout, configuring your local socket. + # If you have a network outage dropping all packets with no RST/FIN, + # this is how long your client waits before realizing & dropping the connection. + # defaults to 66sec (sic!) + # watchClientTimeout: 60 + # + # Endpoint to send request to reload plugins + reloadURL: "http://localhost:3000/api/admin/provisioning/plugins/reload" + # Absolute path to shell script to execute after a plugin got reloaded + script: null + skipReload: false + # Deploy the datasource sidecar as an initContainer in addition to a container. + # This is needed if skipReload is true, to load any plugins defined at startup time. + initPlugins: false + # Sets the size limit of the plugin sidecar emptyDir volume + sizeLimit: {} + notifiers: + enabled: false + # Additional environment variables for the notifierssidecar + env: {} + # Do not reprocess already processed unchanged resources on k8s API reconnect. + # ignoreAlreadyProcessed: true + # label that the configmaps with notifiers are marked with + label: grafana_notifier + # value of label that the configmaps with notifiers are set to + labelValue: "" + # Log level. Can be one of: DEBUG, INFO, WARN, ERROR, CRITICAL. + # logLevel: INFO + # search in configmap, secret or both + resource: both + # Sets the size limit of the notifier sidecar emptyDir volume + sizeLimit: {} + +## Override the deployment namespace +## +namespaceOverride: "" + +## Number of old ReplicaSets to retain +## +revisionHistoryLimit: 10 + +## Add a seperate remote image renderer deployment/service +imageRenderer: + # Enable the image-renderer deployment & service + enabled: false + replicas: 1 + image: + # image-renderer Image repository + repository: rancher/mirrored-grafana-grafana-image-renderer + # image-renderer Image tag + tag: 3.0.1 + # image-renderer Image sha (optional) + sha: "" + # image-renderer ImagePullPolicy + pullPolicy: Always + # extra environment variables + env: + HTTP_HOST: "0.0.0.0" + # RENDERING_ARGS: --no-sandbox,--disable-gpu,--window-size=1280x758 + # RENDERING_MODE: clustered + # IGNORE_HTTPS_ERRORS: true + # image-renderer deployment serviceAccount + serviceAccountName: "" + # image-renderer deployment securityContext + securityContext: {} + # image-renderer deployment Host Aliases + hostAliases: [] + # image-renderer deployment priority class + priorityClassName: '' + service: + # Enable the image-renderer service + enabled: true + # image-renderer service port name + portName: 'http' + # image-renderer service port used by both service and deployment + port: 8081 + targetPort: 8081 + # Adds the appProtocol field to the image-renderer service. This allows to work with istio protocol selection. Ex: "http" or "tcp" + appProtocol: "" + # If https is enabled in Grafana, this needs to be set as 'https' to correctly configure the callback used in Grafana + grafanaProtocol: http + # In case a sub_path is used this needs to be added to the image renderer callback + grafanaSubPath: "" + # name of the image-renderer port on the pod + podPortName: http + # number of image-renderer replica sets to keep + revisionHistoryLimit: 10 + networkPolicy: + # Enable a NetworkPolicy to limit inbound traffic to only the created grafana pods + limitIngress: true + # Enable a NetworkPolicy to limit outbound traffic to only the created grafana pods + limitEgress: false + resources: {} +# limits: +# cpu: 100m +# memory: 100Mi +# requests: +# cpu: 50m +# memory: 50Mi + ## Node labels for pod assignment + ## ref: https://kubernetes.io/docs/user-guide/node-selection/ + # + nodeSelector: {} + + ## Tolerations for pod assignment + ## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ + ## + tolerations: [] + + ## Affinity for pod assignment (evaluated as template) + ## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity + ## + affinity: {} + +networkPolicy: + ## @param networkPolicy.enabled Enable creation of NetworkPolicy resources. Only Ingress traffic is filtered for now. + ## + enabled: false + ## @param networkPolicy.allowExternal Don't require client label for connections + ## The Policy model to apply. When set to false, only pods with the correct + ## client label will have network access to grafana port defined. + ## When true, grafana will accept connections from any source + ## (with the correct destination port). + ## + ingress: true + ## @param networkPolicy.ingress When true enables the creation + ## an ingress network policy + ## + allowExternal: true + ## @param networkPolicy.explicitNamespacesSelector A Kubernetes LabelSelector to explicitly select namespaces from which traffic could be allowed + ## If explicitNamespacesSelector is missing or set to {}, only client Pods that are in the networkPolicy's namespace + ## and that match other criteria, the ones that have the good label, can reach the grafana. + ## But sometimes, we want the grafana to be accessible to clients from other namespaces, in this case, we can use this + ## LabelSelector to select these namespaces, note that the networkPolicy's namespace should also be explicitly added. + ## + ## Example: + ## explicitNamespacesSelector: + ## matchLabels: + ## role: frontend + ## matchExpressions: + ## - {key: role, operator: In, values: [frontend]} + ## + explicitNamespacesSelector: {} + ## + ## + ## + ## + ## + ## + egress: + ## @param networkPolicy.egress.enabled When enabled, an egress network policy will be + ## created allowing grafana to connect to external data sources from kubernetes cluster. + enabled: false + ## + ## @param networkPolicy.egress.ports Add individual ports to be allowed by the egress + ports: [] + ## Add ports to the egress by specifying - port: + ## E.X. + ## ports: + ## - port: 80 + ## - port: 443 + ## + ## + ## + ## + ## + ## + +# Enable backward compatibility of kubernetes where version below 1.13 doesn't have the enableServiceLinks option +enableKubeBackwardCompatibility: false +useStatefulSet: false diff --git a/charts/rancher-project-monitoring/0.2.0-rc1/files/federate/federate-scrape-config.yaml b/charts/rancher-project-monitoring/0.2.0-rc1/files/federate/federate-scrape-config.yaml new file mode 100644 index 00000000..b5ceb698 --- /dev/null +++ b/charts/rancher-project-monitoring/0.2.0-rc1/files/federate/federate-scrape-config.yaml @@ -0,0 +1,13 @@ +- job_name: 'federate' + scrape_interval: {{ .Values.federate.interval }} + honor_labels: true + metrics_path: '/federate' + + params: + 'match[]': + - '{namespace=~"{{ include "project-prometheus-stack.projectNamespaceList" . | replace "," "|" }}", job=~"kube-state-metrics|kubelet|k3s-server"}' + - '{namespace=~"{{ include "project-prometheus-stack.projectNamespaceList" . | replace "," "|" }}", job=""}' + + static_configs: + - targets: {{ .Values.federate.targets | toYaml | nindent 6 }} + diff --git a/charts/rancher-project-monitoring/0.2.0-rc1/files/rancher/pods/rancher-pod-containers.json b/charts/rancher-project-monitoring/0.2.0-rc1/files/rancher/pods/rancher-pod-containers.json new file mode 100644 index 00000000..36e724f1 --- /dev/null +++ b/charts/rancher-project-monitoring/0.2.0-rc1/files/rancher/pods/rancher-pod-containers.json @@ -0,0 +1,636 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": "-- Grafana --", + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "gnetId": null, + "graphTooltip": 0, + "id": 28, + "iteration": 1618265214337, + "links": [], + "panels": [ + { + "aliasColors": { + "{{container}}": "#3797d5" + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "fill": 0, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 8, + "x": 0, + "y": 0 + }, + "hiddenSeries": false, + "id": 2, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": false, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pluginVersion": "7.1.5", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sum(rate(container_cpu_cfs_throttled_seconds_total{container!=\"POD\",namespace=~\"$namespace\",pod=~\"$pod\", container!=\"\"}[$__rate_interval])) by (container)", + "interval": "", + "legendFormat": "CFS throttled ({{container}})", + "refId": "A" + }, + { + "expr": "sum(rate(container_cpu_system_seconds_total{container!=\"POD\",namespace=~\"$namespace\",pod=~\"$pod\",container!=\"\"}[$__rate_interval])) by (container) OR sum(rate(windows_container_cpu_usage_seconds_kernelmode{container!=\"POD\",namespace=~\"$namespace\",pod=~\"$pod\",container!=\"\"}[$__rate_interval])) by (container)", + "interval": "", + "legendFormat": "System ({{container}})", + "refId": "B" + }, + { + "expr": "sum(rate(container_cpu_usage_seconds_total{container!=\"POD\",namespace=~\"$namespace\",pod=~\"$pod\",container!=\"\"}[$__rate_interval])) by (container) OR sum(rate(windows_container_cpu_usage_seconds_total{container!=\"POD\",namespace=~\"$namespace\",pod=~\"$pod\",container!=\"\"}[$__rate_interval])) by (container)", + "interval": "", + "legendFormat": "Total ({{container}})", + "refId": "C" + }, + { + "expr": "sum(rate(container_cpu_user_seconds_total{container!=\"POD\",namespace=~\"$namespace\",pod=~\"$pod\",container!=\"\"}[$__rate_interval])) by (container) OR sum(rate(windows_container_cpu_usage_seconds_usermode{container!=\"POD\",namespace=~\"$namespace\",pod=~\"$pod\",container!=\"\"}[$__rate_interval])) by (container)", + "interval": "", + "legendFormat": "User ({{container}})", + "refId": "D" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "CPU Utilization", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "decimals": null, + "format": "cpu", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": { + "{{container}}": "#3797d5" + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "fill": 0, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 8, + "x": 8, + "y": 0 + }, + "hiddenSeries": false, + "id": 4, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": false, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pluginVersion": "7.1.5", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sum(container_memory_working_set_bytes{container!=\"POD\",namespace=~\"$namespace\",pod=~\"$pod\", container!=\"\"} OR windows_container_memory_usage_commit_bytes{container!=\"POD\",namespace=~\"$namespace\",pod=~\"$pod\", container!=\"\"}) by (container)", + "interval": "", + "legendFormat": "({{container}})", + "refId": "A" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Memory Utilization", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "decimals": 1, + "format": "bytes", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": { + "{{container}}": "#3797d5" + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "fill": 0, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 8, + "x": 16, + "y": 0 + }, + "hiddenSeries": false, + "id": 7, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": false, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pluginVersion": "7.1.5", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sum(irate(container_network_receive_packets_total{namespace=~\"$namespace\",pod=~\"$pod\"}[$__rate_interval])) by (container) OR sum(irate(windows_container_network_receive_packets_total{namespace=~\"$namespace\",pod=~\"$pod\"}[$__rate_interval])) by (container)", + "interval": "", + "legendFormat": "Receive Total ({{container}})", + "refId": "A" + }, + { + "expr": "sum(irate(container_network_transmit_packets_total{namespace=~\"$namespace\",pod=~\"$pod\"}[$__rate_interval])) by (container) OR sum(irate(windows_container_network_transmit_packets_total{namespace=~\"$namespace\",pod=~\"$pod\"}[$__rate_interval])) by (container)", + "interval": "", + "legendFormat": "Transmit Total ({{container}})", + "refId": "B" + }, + { + "expr": "sum(irate(container_network_receive_packets_dropped_total{namespace=~\"$namespace\",pod=~\"$pod\"}[$__rate_interval])) by (container) OR sum(irate(windows_container_network_receive_packets_dropped_total{namespace=~\"$namespace\",pod=~\"$pod\"}[$__rate_interval])) by (container)", + "interval": "", + "legendFormat": "Receive Dropped ({{container}})", + "refId": "C" + }, + { + "expr": "sum(irate(container_network_receive_errors_total{namespace=~\"$namespace\",pod=~\"$pod\"}[$__rate_interval])) by (container)", + "interval": "", + "legendFormat": "Receive Errors ({{container}})", + "refId": "D" + }, + { + "expr": "sum(irate(container_network_transmit_errors_total{namespace=~\"$namespace\",pod=~\"$pod\"}[$__rate_interval])) by (container)", + "interval": "", + "legendFormat": "Transmit Errors ({{container}})", + "refId": "E" + }, + { + "expr": "sum(irate(container_network_transmit_packets_dropped_total{namespace=~\"$namespace\",pod=~\"$pod\"}[$__rate_interval])) by (container) OR sum(irate(windows_container_network_transmit_packets_dropped_total{namespace=~\"$namespace\",pod=~\"$pod\"}[$__rate_interval])) by (container)", + "interval": "", + "legendFormat": "Transmit Dropped ({{container}})", + "refId": "F" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Network Traffic", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "decimals": 1, + "format": "pps", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": { + "{{container}}": "#3797d5" + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "fill": 0, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 8, + "x": 0, + "y": 7 + }, + "hiddenSeries": false, + "id": 8, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": false, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pluginVersion": "7.1.5", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sum(irate(container_network_receive_bytes_total{namespace=~\"$namespace\",pod=~\"$pod\"}[$__rate_interval])) by (container) OR sum(irate(windows_container_network_receive_bytes_total{namespace=~\"$namespace\",pod=~\"$pod\"}[$__rate_interval])) by (container)", + "interval": "", + "legendFormat": "Receive Total ({{container}})", + "refId": "A" + }, + { + "expr": "sum(irate(container_network_transmit_bytes_total{namespace=~\"$namespace\",pod=~\"$pod\"}[$__rate_interval])) by (container) OR sum(irate(windows_container_network_transmit_bytes_total{namespace=~\"$namespace\",pod=~\"$pod\"}[$__rate_interval])) by (container)", + "interval": "", + "legendFormat": "Transmit Total ({{container}})", + "refId": "B" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Network I/O", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "decimals": 1, + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": { + "{{container}}": "#3797d5" + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "fill": 0, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 8, + "x": 8, + "y": 7 + }, + "hiddenSeries": false, + "id": 6, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": false, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pluginVersion": "7.1.5", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sum(rate(container_fs_writes_bytes_total{namespace=~\"$namespace\",pod=~\"$pod\",container!=\"\"}[$__rate_interval])) by (container)", + "interval": "", + "legendFormat": "Write ({{container}})", + "refId": "A" + }, + { + "expr": "sum(rate(container_fs_reads_bytes_total{namespace=~\"$namespace\",pod=~\"$pod\",container!=\"\"}[$__rate_interval])) by (container)", + "interval": "", + "legendFormat": "Read ({{container}})", + "refId": "B" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Disk I/O", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "decimals": 1, + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + } + ], + "refresh": false, + "schemaVersion": 26, + "style": "dark", + "tags": [], + "templating": { + "list": [ + { + "current": { + "text": "Prometheus", + "value": "Prometheus" + }, + "hide": 0, + "label": "Data Source", + "name": "datasource", + "options": [ + + ], + "query": "prometheus", + "refresh": 1, + "regex": "", + "type": "datasource" + }, + { + "allValue": null, + "hide": 0, + "includeAll": false, + "label": null, + "multi": false, + "name": "namespace", + "query": "label_values({__name__=~\"container_.*|windows_container_.*\", namespace!=\"\"}, namespace)", + "refresh": 2, + "regex": "", + "sort": 0, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "hide": 0, + "includeAll": false, + "label": null, + "multi": false, + "name": "pod", + "query": "label_values({__name__=~\"container_.*|windows_container_.*\", namespace=\"$namespace\", pod!=\"\"}, pod)", + "refresh": 2, + "regex": "", + "sort": 0, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ] + }, + "timezone": "", + "title": "Rancher / Pod (Containers)", + "uid": "rancher-pod-containers-1", + "version": 8 +} diff --git a/charts/rancher-project-monitoring/0.2.0-rc1/files/rancher/pods/rancher-pod.json b/charts/rancher-project-monitoring/0.2.0-rc1/files/rancher/pods/rancher-pod.json new file mode 100644 index 00000000..65c6bf18 --- /dev/null +++ b/charts/rancher-project-monitoring/0.2.0-rc1/files/rancher/pods/rancher-pod.json @@ -0,0 +1,636 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": "-- Grafana --", + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "gnetId": null, + "graphTooltip": 0, + "id": 28, + "iteration": 1618265214337, + "links": [], + "panels": [ + { + "aliasColors": { + "": "#3797d5" + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "fill": 0, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 8, + "x": 0, + "y": 0 + }, + "hiddenSeries": false, + "id": 2, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": false, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pluginVersion": "7.1.5", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sum(rate(container_cpu_cfs_throttled_seconds_total{container!=\"POD\",namespace=~\"$namespace\",pod=~\"$pod\", container!=\"\"}[$__rate_interval]))", + "interval": "", + "legendFormat": "CFS throttled", + "refId": "A" + }, + { + "expr": "sum(rate(container_cpu_system_seconds_total{container!=\"POD\",namespace=~\"$namespace\",pod=~\"$pod\",container!=\"\"}[$__rate_interval])) OR sum(rate(windows_container_cpu_usage_seconds_kernelmode{container!=\"POD\",namespace=~\"$namespace\",pod=~\"$pod\",container!=\"\"}[$__rate_interval]))", + "interval": "", + "legendFormat": "System", + "refId": "B" + }, + { + "expr": "sum(rate(container_cpu_usage_seconds_total{container!=\"POD\",namespace=~\"$namespace\",pod=~\"$pod\",container!=\"\"}[$__rate_interval])) OR sum(rate(windows_container_cpu_usage_seconds_total{container!=\"POD\",namespace=~\"$namespace\",pod=~\"$pod\",container!=\"\"}[$__rate_interval]))", + "interval": "", + "legendFormat": "Total", + "refId": "C" + }, + { + "expr": "sum(rate(container_cpu_user_seconds_total{container!=\"POD\",namespace=~\"$namespace\",pod=~\"$pod\",container!=\"\"}[$__rate_interval])) OR sum(rate(windows_container_cpu_usage_seconds_usermode{container!=\"POD\",namespace=~\"$namespace\",pod=~\"$pod\",container!=\"\"}[$__rate_interval]))", + "interval": "", + "legendFormat": "User", + "refId": "D" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "CPU Utilization", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "decimals": null, + "format": "cpu", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": { + "": "#3797d5" + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "fill": 0, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 8, + "x": 8, + "y": 0 + }, + "hiddenSeries": false, + "id": 4, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": false, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pluginVersion": "7.1.5", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sum(container_memory_working_set_bytes{container!=\"POD\",namespace=~\"$namespace\",pod=~\"$pod\", container!=\"\"} OR windows_container_memory_usage_commit_bytes{container!=\"POD\",namespace=~\"$namespace\",pod=~\"$pod\", container!=\"\"})", + "interval": "", + "legendFormat": "Total", + "refId": "A" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Memory Utilization", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "decimals": 1, + "format": "bytes", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": { + "": "#3797d5" + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "fill": 0, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 8, + "x": 16, + "y": 0 + }, + "hiddenSeries": false, + "id": 7, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": false, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pluginVersion": "7.1.5", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sum(irate(container_network_receive_packets_total{namespace=~\"$namespace\",pod=~\"$pod\"}[$__rate_interval])) OR sum(irate(windows_container_network_receive_packets_total{namespace=~\"$namespace\",pod=~\"$pod\"}[$__rate_interval]))", + "interval": "", + "legendFormat": "Receive Total", + "refId": "A" + }, + { + "expr": "sum(irate(container_network_transmit_packets_total{namespace=~\"$namespace\",pod=~\"$pod\"}[$__rate_interval])) OR sum(irate(windows_container_network_transmit_packets_total{namespace=~\"$namespace\",pod=~\"$pod\"}[$__rate_interval]))", + "interval": "", + "legendFormat": "Transmit Total", + "refId": "B" + }, + { + "expr": "sum(irate(container_network_receive_packets_dropped_total{namespace=~\"$namespace\",pod=~\"$pod\"}[$__rate_interval])) OR sum(irate(windows_container_network_receive_packets_dropped_total{namespace=~\"$namespace\",pod=~\"$pod\"}[$__rate_interval]))", + "interval": "", + "legendFormat": "Receive Dropped", + "refId": "C" + }, + { + "expr": "sum(irate(container_network_receive_errors_total{namespace=~\"$namespace\",pod=~\"$pod\"}[$__rate_interval]))", + "interval": "", + "legendFormat": "Receive Errors", + "refId": "D" + }, + { + "expr": "sum(irate(container_network_transmit_errors_total{namespace=~\"$namespace\",pod=~\"$pod\"}[$__rate_interval]))", + "interval": "", + "legendFormat": "Transmit Errors", + "refId": "E" + }, + { + "expr": "sum(irate(container_network_transmit_packets_dropped_total{namespace=~\"$namespace\",pod=~\"$pod\"}[$__rate_interval])) OR sum(irate(windows_container_network_transmit_packets_dropped_total{namespace=~\"$namespace\",pod=~\"$pod\"}[$__rate_interval]))", + "interval": "", + "legendFormat": "Transmit Dropped", + "refId": "F" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Network Traffic", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "decimals": 1, + "format": "pps", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": { + "": "#3797d5" + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "fill": 0, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 8, + "x": 0, + "y": 7 + }, + "hiddenSeries": false, + "id": 8, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": false, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pluginVersion": "7.1.5", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sum(irate(container_network_receive_bytes_total{namespace=~\"$namespace\",pod=~\"$pod\"}[$__rate_interval])) OR sum(irate(windows_container_network_receive_bytes_total{namespace=~\"$namespace\",pod=~\"$pod\"}[$__rate_interval]))", + "interval": "", + "legendFormat": "Receive Total", + "refId": "A" + }, + { + "expr": "sum(irate(container_network_transmit_bytes_total{namespace=~\"$namespace\",pod=~\"$pod\"}[$__rate_interval])) OR sum(irate(windows_container_network_transmit_bytes_total{namespace=~\"$namespace\",pod=~\"$pod\"}[$__rate_interval]))", + "interval": "", + "legendFormat": "Transmit Total", + "refId": "B" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Network I/O", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "decimals": 1, + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": { + "": "#3797d5" + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "fill": 0, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 8, + "x": 8, + "y": 7 + }, + "hiddenSeries": false, + "id": 6, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": false, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pluginVersion": "7.1.5", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sum(rate(container_fs_writes_bytes_total{namespace=~\"$namespace\",pod=~\"$pod\",container!=\"\"}[$__rate_interval]))", + "interval": "", + "legendFormat": "Write", + "refId": "A" + }, + { + "expr": "sum(rate(container_fs_reads_bytes_total{namespace=~\"$namespace\",pod=~\"$pod\",container!=\"\"}[$__rate_interval]))", + "interval": "", + "legendFormat": "Read", + "refId": "B" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Disk I/O", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "decimals": 1, + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + } + ], + "refresh": false, + "schemaVersion": 26, + "style": "dark", + "tags": [], + "templating": { + "list": [ + { + "current": { + "text": "Prometheus", + "value": "Prometheus" + }, + "hide": 0, + "label": "Data Source", + "name": "datasource", + "options": [ + + ], + "query": "prometheus", + "refresh": 1, + "regex": "", + "type": "datasource" + }, + { + "allValue": null, + "hide": 0, + "includeAll": false, + "label": null, + "multi": false, + "name": "namespace", + "query": "label_values({__name__=~\"container_.*|windows_container_.*\", namespace!=\"\"}, namespace)", + "refresh": 2, + "regex": "", + "sort": 0, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "hide": 0, + "includeAll": false, + "label": null, + "multi": false, + "name": "pod", + "query": "label_values({__name__=~\"container_.*|windows_container_.*\", namespace=\"$namespace\", pod!=\"\"}, pod)", + "refresh": 2, + "regex": "", + "sort": 0, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ] + }, + "timezone": "", + "title": "Rancher / Pod", + "uid": "rancher-pod-1", + "version": 8 +} diff --git a/charts/rancher-project-monitoring/0.2.0-rc1/files/rancher/workloads/rancher-workload-pods.json b/charts/rancher-project-monitoring/0.2.0-rc1/files/rancher/workloads/rancher-workload-pods.json new file mode 100644 index 00000000..f6b5078a --- /dev/null +++ b/charts/rancher-project-monitoring/0.2.0-rc1/files/rancher/workloads/rancher-workload-pods.json @@ -0,0 +1,652 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": "-- Grafana --", + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "gnetId": null, + "graphTooltip": 0, + "id": 28, + "iteration": 1618265214337, + "links": [], + "panels": [ + { + "aliasColors": { + "{{pod}}": "#3797d5" + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "fill": 0, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 8, + "x": 0, + "y": 0 + }, + "hiddenSeries": false, + "id": 2, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": false, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pluginVersion": "7.1.5", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "(sum(rate(container_cpu_cfs_throttled_seconds_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)) * on(pod) kube_pod_info{namespace=~\"$namespace\", created_by_kind=\"$kind\", created_by_name=\"$workload\"}", + "interval": "", + "legendFormat": "CFS throttled ({{pod}})", + "refId": "A" + }, + { + "expr": "(sum(rate(container_cpu_system_seconds_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod) OR sum(rate(windows_container_cpu_usage_seconds_kernelmode{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)) * on(pod) kube_pod_info{namespace=~\"$namespace\", created_by_kind=\"$kind\", created_by_name=\"$workload\"}", + "interval": "", + "legendFormat": "System ({{pod}})", + "refId": "B" + }, + { + "expr": "(sum(rate(container_cpu_usage_seconds_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod) OR sum(rate(windows_container_cpu_usage_seconds_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)) * on(pod) kube_pod_info{namespace=~\"$namespace\", created_by_kind=\"$kind\", created_by_name=\"$workload\"}", + "interval": "", + "legendFormat": "Total ({{pod}})", + "refId": "C" + }, + { + "expr": "(sum(rate(container_cpu_user_seconds_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod) OR sum(rate(windows_container_cpu_usage_seconds_usermode{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)) * on(pod) kube_pod_info{namespace=~\"$namespace\", created_by_kind=\"$kind\", created_by_name=\"$workload\"}", + "interval": "", + "legendFormat": "User ({{pod}})", + "refId": "D" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "CPU Utilization", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "decimals": null, + "format": "cpu", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": { + "{{pod}}": "#3797d5" + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "fill": 0, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 8, + "x": 8, + "y": 0 + }, + "hiddenSeries": false, + "id": 4, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": false, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pluginVersion": "7.1.5", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "(sum(container_memory_working_set_bytes{namespace=~\"$namespace\"} OR windows_container_memory_usage_commit_bytes{namespace=~\"$namespace\"}) by (pod)) * on(pod) kube_pod_info{namespace=~\"$namespace\", created_by_kind=\"$kind\", created_by_name=\"$workload\"}", + "interval": "", + "legendFormat": "({{pod}})", + "refId": "A" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Memory Utilization", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "decimals": 1, + "format": "bytes", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": { + "{{pod}}": "#3797d5" + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "fill": 0, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 8, + "x": 16, + "y": 0 + }, + "hiddenSeries": false, + "id": 7, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": false, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pluginVersion": "7.1.5", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "(sum(irate(container_network_receive_packets_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod) OR sum(irate(windows_container_network_receive_packets_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)) * on(pod) kube_pod_info{namespace=~\"$namespace\", created_by_kind=\"$kind\", created_by_name=\"$workload\"}", + "interval": "", + "legendFormat": "Receive Total ({{pod}})", + "refId": "A" + }, + { + "expr": "(sum(irate(container_network_transmit_packets_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod) OR sum(irate(windows_container_network_transmit_packets_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)) * on(pod) kube_pod_info{namespace=~\"$namespace\", created_by_kind=\"$kind\", created_by_name=\"$workload\"}", + "interval": "", + "legendFormat": "Transmit Total ({{pod}})", + "refId": "B" + }, + { + "expr": "(sum(irate(container_network_receive_packets_dropped_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod) OR sum(irate(windows_container_network_receive_packets_dropped_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)) * on(pod) kube_pod_info{namespace=~\"$namespace\", created_by_kind=\"$kind\", created_by_name=\"$workload\"}", + "interval": "", + "legendFormat": "Receive Dropped ({{pod}})", + "refId": "C" + }, + { + "expr": "(sum(irate(container_network_receive_errors_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)) * on(pod) kube_pod_info{namespace=~\"$namespace\", created_by_kind=\"$kind\", created_by_name=\"$workload\"}", + "interval": "", + "legendFormat": "Receive Errors ({{pod}})", + "refId": "D" + }, + { + "expr": "(sum(irate(container_network_transmit_errors_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)) * on(pod) kube_pod_info{namespace=~\"$namespace\", created_by_kind=\"$kind\", created_by_name=\"$workload\"}", + "interval": "", + "legendFormat": "Transmit Errors ({{pod}})", + "refId": "E" + }, + { + "expr": "(sum(irate(container_network_transmit_packets_dropped_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod) OR sum(irate(windows_container_network_transmit_packets_dropped_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)) * on(pod) kube_pod_info{namespace=~\"$namespace\", created_by_kind=\"$kind\", created_by_name=\"$workload\"}", + "interval": "", + "legendFormat": "Transmit Dropped ({{pod}})", + "refId": "F" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Network Traffic", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "decimals": 1, + "format": "pps", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": { + "{{pod}}": "#3797d5" + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "fill": 0, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 8, + "x": 0, + "y": 7 + }, + "hiddenSeries": false, + "id": 8, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": false, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pluginVersion": "7.1.5", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "(sum(irate(container_network_receive_bytes_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod) OR sum(irate(windows_container_network_receive_bytes_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)) * on(pod) kube_pod_info{namespace=~\"$namespace\", created_by_kind=\"$kind\", created_by_name=\"$workload\"}", + "interval": "", + "legendFormat": "Receive Total ({{pod}})", + "refId": "A" + }, + { + "expr": "(sum(irate(container_network_transmit_bytes_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod) OR sum(irate(windows_container_network_transmit_bytes_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)) * on(pod) kube_pod_info{namespace=~\"$namespace\", created_by_kind=\"$kind\", created_by_name=\"$workload\"}", + "interval": "", + "legendFormat": "Transmit Total ({{pod}})", + "refId": "B" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Network I/O", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "decimals": 1, + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": { + "{{pod}}": "#3797d5" + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "fill": 0, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 8, + "x": 8, + "y": 7 + }, + "hiddenSeries": false, + "id": 6, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": false, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pluginVersion": "7.1.5", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "(sum(rate(container_fs_writes_bytes_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)) * on(pod) kube_pod_info{namespace=~\"$namespace\", created_by_kind=\"$kind\", created_by_name=\"$workload\"}", + "interval": "", + "legendFormat": "Write ({{pod}})", + "refId": "A" + }, + { + "expr": "(sum(rate(container_fs_reads_bytes_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)) * on(pod) kube_pod_info{namespace=~\"$namespace\", created_by_kind=\"$kind\", created_by_name=\"$workload\"}", + "interval": "", + "legendFormat": "Read ({{pod}})", + "refId": "B" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Disk I/O", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "decimals": 1, + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + } + ], + "refresh": false, + "schemaVersion": 26, + "style": "dark", + "tags": [], + "templating": { + "list": [ + { + "current": { + "text": "Prometheus", + "value": "Prometheus" + }, + "hide": 0, + "label": "Data Source", + "name": "datasource", + "options": [ + + ], + "query": "prometheus", + "refresh": 1, + "regex": "", + "type": "datasource" + }, + { + "allValue": null, + "hide": 0, + "includeAll": false, + "label": null, + "multi": false, + "name": "namespace", + "query": "query_result(kube_pod_info{namespace!=\"\"} * on(pod) group_right(namespace, created_by_kind, created_by_name) count({__name__=~\"container_.*|windows_container_.*\", pod!=\"\"}) by (pod))", + "refresh": 2, + "regex": "/.*namespace=\"([^\"]*)\"/", + "sort": 0, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "hide": 0, + "includeAll": false, + "label": null, + "multi": false, + "name": "kind", + "query": "query_result(kube_pod_info{namespace=\"$namespace\", created_by_kind!=\"\"} * on(pod) group_right(namespace, created_by_kind, created_by_name) count({__name__=~\"container_.*|windows_container_.*\", pod!=\"\"}) by (pod))", + "refresh": 2, + "regex": "/.*created_by_kind=\"([^\"]*)\"/", + "sort": 0, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "hide": 0, + "includeAll": false, + "label": null, + "multi": false, + "name": "workload", + "query": "query_result(kube_pod_info{namespace=\"$namespace\", created_by_kind=\"$kind\", created_by_name!=\"\"} * on(pod) group_right(namespace, created_by_kind, created_by_name) count({__name__=~\"container_.*|windows_container_.*\", pod!=\"\"}) by (pod))", + "refresh": 2, + "regex": "/.*created_by_name=\"([^\"]*)\"/", + "sort": 0, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ] + }, + "timezone": "", + "title": "Rancher / Workload (Pods)", + "uid": "rancher-workload-pods-1", + "version": 8 +} diff --git a/charts/rancher-project-monitoring/0.2.0-rc1/files/rancher/workloads/rancher-workload.json b/charts/rancher-project-monitoring/0.2.0-rc1/files/rancher/workloads/rancher-workload.json new file mode 100644 index 00000000..9f5317c2 --- /dev/null +++ b/charts/rancher-project-monitoring/0.2.0-rc1/files/rancher/workloads/rancher-workload.json @@ -0,0 +1,652 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": "-- Grafana --", + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "gnetId": null, + "graphTooltip": 0, + "id": 28, + "iteration": 1618265214337, + "links": [], + "panels": [ + { + "aliasColors": { + "{{pod}}": "#3797d5" + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "fill": 0, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 8, + "x": 0, + "y": 0 + }, + "hiddenSeries": false, + "id": 2, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": false, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pluginVersion": "7.1.5", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sum((sum(rate(container_cpu_cfs_throttled_seconds_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)) * on(pod) kube_pod_info{namespace=~\"$namespace\", created_by_kind=\"$kind\", created_by_name=\"$workload\"})", + "interval": "", + "legendFormat": "CFS throttled", + "refId": "A" + }, + { + "expr": "sum((sum(rate(container_cpu_system_seconds_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod) OR sum(rate(windows_container_cpu_usage_seconds_kernelmode{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)) * on(pod) kube_pod_info{namespace=~\"$namespace\", created_by_kind=\"$kind\", created_by_name=\"$workload\"})", + "interval": "", + "legendFormat": "System", + "refId": "B" + }, + { + "expr": "sum((sum(rate(container_cpu_usage_seconds_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod) OR sum(rate(windows_container_cpu_usage_seconds_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)) * on(pod) kube_pod_info{namespace=~\"$namespace\", created_by_kind=\"$kind\", created_by_name=\"$workload\"})", + "interval": "", + "legendFormat": "Total", + "refId": "C" + }, + { + "expr": "sum((sum(rate(container_cpu_user_seconds_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod) OR sum(rate(windows_container_cpu_usage_seconds_usermode{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)) * on(pod) kube_pod_info{namespace=~\"$namespace\", created_by_kind=\"$kind\", created_by_name=\"$workload\"})", + "interval": "", + "legendFormat": "User", + "refId": "D" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "CPU Utilization", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "decimals": null, + "format": "cpu", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": { + "{{pod}}": "#3797d5" + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "fill": 0, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 8, + "x": 8, + "y": 0 + }, + "hiddenSeries": false, + "id": 4, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": false, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pluginVersion": "7.1.5", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sum((sum(container_memory_working_set_bytes{namespace=~\"$namespace\"} OR windows_container_memory_usage_commit_bytes{namespace=~\"$namespace\"}) by (pod)) * on(pod) kube_pod_info{namespace=~\"$namespace\", created_by_kind=\"$kind\", created_by_name=\"$workload\"})", + "interval": "", + "legendFormat": "Total", + "refId": "A" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Memory Utilization", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "decimals": 1, + "format": "bytes", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": { + "{{pod}}": "#3797d5" + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "fill": 0, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 8, + "x": 16, + "y": 0 + }, + "hiddenSeries": false, + "id": 7, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": false, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pluginVersion": "7.1.5", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sum((sum(irate(container_network_receive_packets_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod) OR sum(irate(windows_container_network_receive_packets_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)) * on(pod) kube_pod_info{namespace=~\"$namespace\", created_by_kind=\"$kind\", created_by_name=\"$workload\"})", + "interval": "", + "legendFormat": "Receive Total", + "refId": "A" + }, + { + "expr": "sum((sum(irate(container_network_transmit_packets_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod) OR sum(irate(windows_container_network_transmit_packets_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)) * on(pod) kube_pod_info{namespace=~\"$namespace\", created_by_kind=\"$kind\", created_by_name=\"$workload\"})", + "interval": "", + "legendFormat": "Transmit Total", + "refId": "B" + }, + { + "expr": "sum((sum(irate(container_network_receive_packets_dropped_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod) OR sum(irate(windows_container_network_receive_packets_dropped_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)) * on(pod) kube_pod_info{namespace=~\"$namespace\", created_by_kind=\"$kind\", created_by_name=\"$workload\"})", + "interval": "", + "legendFormat": "Receive Dropped", + "refId": "C" + }, + { + "expr": "sum((sum(irate(container_network_receive_errors_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)) * on(pod) kube_pod_info{namespace=~\"$namespace\", created_by_kind=\"$kind\", created_by_name=\"$workload\"})", + "interval": "", + "legendFormat": "Receive Errors", + "refId": "D" + }, + { + "expr": "sum((sum(irate(container_network_transmit_errors_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)) * on(pod) kube_pod_info{namespace=~\"$namespace\", created_by_kind=\"$kind\", created_by_name=\"$workload\"})", + "interval": "", + "legendFormat": "Transmit Errors", + "refId": "E" + }, + { + "expr": "sum((sum(irate(container_network_transmit_packets_dropped_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod) OR sum(irate(windows_container_network_transmit_packets_dropped_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)) * on(pod) kube_pod_info{namespace=~\"$namespace\", created_by_kind=\"$kind\", created_by_name=\"$workload\"})", + "interval": "", + "legendFormat": "Transmit Dropped", + "refId": "F" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Network Traffic", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "decimals": 1, + "format": "pps", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": { + "{{pod}}": "#3797d5" + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "fill": 0, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 8, + "x": 0, + "y": 7 + }, + "hiddenSeries": false, + "id": 8, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": false, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pluginVersion": "7.1.5", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sum((sum(irate(container_network_receive_bytes_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod) OR sum(irate(windows_container_network_receive_bytes_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)) * on(pod) kube_pod_info{namespace=~\"$namespace\", created_by_kind=\"$kind\", created_by_name=\"$workload\"})", + "interval": "", + "legendFormat": "Receive Total", + "refId": "A" + }, + { + "expr": "sum((sum(irate(container_network_transmit_bytes_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod) OR sum(irate(windows_container_network_transmit_bytes_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)) * on(pod) kube_pod_info{namespace=~\"$namespace\", created_by_kind=\"$kind\", created_by_name=\"$workload\"})", + "interval": "", + "legendFormat": "Transmit Total", + "refId": "B" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Network I/O", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "decimals": 1, + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": { + "{{pod}}": "#3797d5" + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "fill": 0, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 8, + "x": 8, + "y": 7 + }, + "hiddenSeries": false, + "id": 6, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": false, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pluginVersion": "7.1.5", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sum((sum(rate(container_fs_writes_bytes_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)) * on(pod) kube_pod_info{namespace=~\"$namespace\", created_by_kind=\"$kind\", created_by_name=\"$workload\"})", + "interval": "", + "legendFormat": "Write", + "refId": "A" + }, + { + "expr": "sum((sum(rate(container_fs_reads_bytes_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)) * on(pod) kube_pod_info{namespace=~\"$namespace\", created_by_kind=\"$kind\", created_by_name=\"$workload\"})", + "interval": "", + "legendFormat": "Read", + "refId": "B" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Disk I/O", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "decimals": 1, + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + } + ], + "refresh": false, + "schemaVersion": 26, + "style": "dark", + "tags": [], + "templating": { + "list": [ + { + "current": { + "text": "Prometheus", + "value": "Prometheus" + }, + "hide": 0, + "label": "Data Source", + "name": "datasource", + "options": [ + + ], + "query": "prometheus", + "refresh": 1, + "regex": "", + "type": "datasource" + }, + { + "allValue": null, + "hide": 0, + "includeAll": false, + "label": null, + "multi": false, + "name": "namespace", + "query": "query_result(kube_pod_info{namespace!=\"\"} * on(pod) group_right(namespace, created_by_kind, created_by_name) count({__name__=~\"container_.*|windows_container_.*\", pod!=\"\"}) by (pod))", + "refresh": 2, + "regex": "/.*namespace=\"([^\"]*)\"/", + "sort": 0, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "hide": 0, + "includeAll": false, + "label": null, + "multi": false, + "name": "kind", + "query": "query_result(kube_pod_info{namespace=\"$namespace\", created_by_kind!=\"\"} * on(pod) group_right(namespace, created_by_kind, created_by_name) count({__name__=~\"container_.*|windows_container_.*\", pod!=\"\"}) by (pod))", + "refresh": 2, + "regex": "/.*created_by_kind=\"([^\"]*)\"/", + "sort": 0, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "hide": 0, + "includeAll": false, + "label": null, + "multi": false, + "name": "workload", + "query": "query_result(kube_pod_info{namespace=\"$namespace\", created_by_kind=\"$kind\", created_by_name!=\"\"} * on(pod) group_right(namespace, created_by_kind, created_by_name) count({__name__=~\"container_.*|windows_container_.*\", pod!=\"\"}) by (pod))", + "refresh": 2, + "regex": "/.*created_by_name=\"([^\"]*)\"/", + "sort": 0, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ] + }, + "timezone": "", + "title": "Rancher / Workload", + "uid": "rancher-workload-1", + "version": 8 +} diff --git a/charts/rancher-project-monitoring/0.2.0-rc1/questions.yaml b/charts/rancher-project-monitoring/0.2.0-rc1/questions.yaml new file mode 100644 index 00000000..13035490 --- /dev/null +++ b/charts/rancher-project-monitoring/0.2.0-rc1/questions.yaml @@ -0,0 +1,34 @@ +questions: +- variable: alertmanager.enabled + label: Enable Alertmanager + default: true + type: boolean + group: Alertmanager +- variable: grafana.enabled + label: Enable Grafana + default: true + type: boolean + group: Grafana + show_subquestion_if: true + subquestions: + - variable: grafana.admin.adminUser + label: Grafana Admin User + type: string + default: admin + group: Grafana + - variable: grafana.admin.adminPassword + label: Grafana Admin Password + type: string + default: prom-operator + group: Grafana + - variable: grafana.sidecar.dashboards.label + label: Default Grafana Dashboard Label + default: grafana_dashboard + description: All ConfigMaps with this label are parsed as Grafana Dashboards + type: string + group: Grafana +- variable: federate.enabled + label: Enable Federated Metrics From Cluster Prometheus + default: true + type: boolean + group: Federation diff --git a/charts/rancher-project-monitoring/0.2.0-rc1/templates/NOTES.txt b/charts/rancher-project-monitoring/0.2.0-rc1/templates/NOTES.txt new file mode 100644 index 00000000..9e4d6d87 --- /dev/null +++ b/charts/rancher-project-monitoring/0.2.0-rc1/templates/NOTES.txt @@ -0,0 +1,4 @@ +{{ $.Chart.Name }} has been installed. Check its status by running: + kubectl --namespace {{ template "project-prometheus-stack.namespace" . }} get pods -l "release={{ $.Release.Name }}" + +Visit https://github.com/prometheus-operator/kube-prometheus for instructions on how to create & configure Alertmanager and Prometheus instances using the Operator. diff --git a/charts/rancher-project-monitoring/0.2.0-rc1/templates/_helpers.tpl b/charts/rancher-project-monitoring/0.2.0-rc1/templates/_helpers.tpl new file mode 100644 index 00000000..59f8e6c6 --- /dev/null +++ b/charts/rancher-project-monitoring/0.2.0-rc1/templates/_helpers.tpl @@ -0,0 +1,233 @@ +# Rancher +{{- define "system_default_registry" -}} +{{- if .Values.global.cattle.systemDefaultRegistry -}} +{{- printf "%s/" .Values.global.cattle.systemDefaultRegistry -}} +{{- end -}} +{{- end -}} + +{{/* +https://github.com/helm/helm/issues/4535#issuecomment-477778391 +Usage: {{ include "call-nested" (list . "SUBCHART_NAME" "TEMPLATE") }} +e.g. {{ include "call-nested" (list . "grafana" "grafana.fullname") }} +*/}} +{{- define "call-nested" }} +{{- $dot := index . 0 }} +{{- $subchart := index . 1 | splitList "." }} +{{- $template := index . 2 }} +{{- $values := $dot.Values }} +{{- range $subchart }} +{{- $values = index $values . }} +{{- end }} +{{- include $template (dict "Chart" (dict "Name" (last $subchart)) "Values" $values "Release" $dot.Release "Capabilities" $dot.Capabilities) }} +{{- end }} + +# Windows Support + +{{/* +Windows cluster will add default taint for linux nodes, +add below linux tolerations to workloads could be scheduled to those linux nodes +*/}} + +{{- define "linux-node-tolerations" -}} +- key: "cattle.io/os" + value: "linux" + effect: "NoSchedule" + operator: "Equal" +{{- end -}} + +{{- define "linux-node-selector" -}} +{{- if semverCompare "<1.14-0" .Capabilities.KubeVersion.GitVersion -}} +beta.kubernetes.io/os: linux +{{- else -}} +kubernetes.io/os: linux +{{- end -}} +{{- end -}} + +# Prometheus Operator + +{{/* Comma-delimited list of namespaces that need to be watched to configure Project Prometheus Stack components */}} +{{- define "project-prometheus-stack.projectNamespaceList" -}} +{{ append .Values.global.cattle.projectNamespaces .Release.Namespace | uniq | join "," }} +{{- end }} + +{{/* vim: set filetype=mustache: */}} +{{/* Expand the name of the chart. This is suffixed with -alertmanager, which means subtract 13 from longest 63 available */}} +{{- define "project-prometheus-stack.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 50 | trimSuffix "-" -}} +{{- end }} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +The components in this chart create additional resources that expand the longest created name strings. +The longest name that gets created adds and extra 37 characters, so truncation should be 63-35=26. +*/}} +{{- define "project-prometheus-stack.fullname" -}} +{{- if .Values.fullnameOverride -}} +{{- .Values.fullnameOverride | trunc 26 | trimSuffix "-" -}} +{{- else -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- .Release.Name | trunc 26 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s" .Release.Name $name | trunc 26 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} +{{- end -}} + +{{/* Prometheus custom resource instance name */}} +{{- define "project-prometheus-stack.prometheus.crname" -}} +{{- if .Values.cleanPrometheusOperatorObjectNames }} +{{- include "project-prometheus-stack.fullname" . }} +{{- else }} +{{- print (include "project-prometheus-stack.fullname" .) "-prometheus" }} +{{- end }} +{{- end }} + +{{/* Alertmanager custom resource instance name */}} +{{- define "project-prometheus-stack.alertmanager.crname" -}} +{{- if .Values.cleanPrometheusOperatorObjectNames }} +{{- include "project-prometheus-stack.fullname" . }} +{{- else }} +{{- print (include "project-prometheus-stack.fullname" .) "-alertmanager" -}} +{{- end }} +{{- end }} + +{{/* Create chart name and version as used by the chart label. */}} +{{- define "project-prometheus-stack.chartref" -}} +{{- replace "+" "_" .Chart.Version | printf "%s-%s" .Chart.Name -}} +{{- end }} + +{{/* Generate basic labels */}} +{{- define "project-prometheus-stack.labels" }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +app.kubernetes.io/instance: {{ .Release.Name }} +app.kubernetes.io/version: "{{ replace "+" "_" .Chart.Version }}" +app.kubernetes.io/part-of: {{ template "project-prometheus-stack.name" . }} +chart: {{ template "project-prometheus-stack.chartref" . }} +release: {{ $.Release.Name | quote }} +heritage: {{ $.Release.Service | quote }} +{{- if .Values.commonLabels}} +{{ toYaml .Values.commonLabels }} +{{- end }} +{{- end }} + +{{/* Create the name of prometheus service account to use */}} +{{- define "project-prometheus-stack.prometheus.serviceAccountName" -}} +{{- if .Values.prometheus.serviceAccount.create -}} + {{ default (print (include "project-prometheus-stack.fullname" .) "-prometheus") .Values.prometheus.serviceAccount.name }} +{{- else -}} + {{ default "default" .Values.prometheus.serviceAccount.name }} +{{- end -}} +{{- end -}} + +{{/* Create the name of alertmanager service account to use */}} +{{- define "project-prometheus-stack.alertmanager.serviceAccountName" -}} +{{- if .Values.alertmanager.serviceAccount.create -}} + {{ default (print (include "project-prometheus-stack.fullname" .) "-alertmanager") .Values.alertmanager.serviceAccount.name }} +{{- else -}} + {{ default "default" .Values.alertmanager.serviceAccount.name }} +{{- end -}} +{{- end -}} + +{{/* +Allow the release namespace to be overridden for multi-namespace deployments in combined charts +*/}} +{{- define "project-prometheus-stack.namespace" -}} + {{- if .Values.namespaceOverride -}} + {{- .Values.namespaceOverride -}} + {{- else -}} + {{- .Release.Namespace -}} + {{- end -}} +{{- end -}} + +{{/* +Use the grafana namespace override for multi-namespace deployments in combined charts +*/}} +{{- define "project-prometheus-stack-grafana.namespace" -}} + {{- if .Values.grafana.namespaceOverride -}} + {{- .Values.grafana.namespaceOverride -}} + {{- else -}} + {{- .Release.Namespace -}} + {{- end -}} +{{- end -}} + +{{/* Allow KubeVersion to be overridden. */}} +{{- define "project-prometheus-stack.kubeVersion" -}} + {{- default .Capabilities.KubeVersion.Version .Values.kubeVersionOverride -}} +{{- end -}} + +{{/* Get Ingress API Version */}} +{{- define "project-prometheus-stack.ingress.apiVersion" -}} + {{- if and (.Capabilities.APIVersions.Has "networking.k8s.io/v1") (semverCompare ">= 1.19-0" (include "project-prometheus-stack.kubeVersion" .)) -}} + {{- print "networking.k8s.io/v1" -}} + {{- else if .Capabilities.APIVersions.Has "networking.k8s.io/v1beta1" -}} + {{- print "networking.k8s.io/v1beta1" -}} + {{- else -}} + {{- print "extensions/v1beta1" -}} + {{- end -}} +{{- end -}} + +{{/* Check Ingress stability */}} +{{- define "project-prometheus-stack.ingress.isStable" -}} + {{- eq (include "project-prometheus-stack.ingress.apiVersion" .) "networking.k8s.io/v1" -}} +{{- end -}} + +{{/* Check Ingress supports pathType */}} +{{/* pathType was added to networking.k8s.io/v1beta1 in Kubernetes 1.18 */}} +{{- define "project-prometheus-stack.ingress.supportsPathType" -}} + {{- or (eq (include "project-prometheus-stack.ingress.isStable" .) "true") (and (eq (include "project-prometheus-stack.ingress.apiVersion" .) "networking.k8s.io/v1beta1") (semverCompare ">= 1.18-0" (include "project-prometheus-stack.kubeVersion" .))) -}} +{{- end -}} + +{{/* Get Policy API Version */}} +{{- define "project-prometheus-stack.pdb.apiVersion" -}} + {{- if and (.Capabilities.APIVersions.Has "policy/v1") (semverCompare ">= 1.21-0" (include "project-prometheus-stack.kubeVersion" .)) -}} + {{- print "policy/v1" -}} + {{- else -}} + {{- print "policy/v1beta1" -}} + {{- end -}} + {{- end -}} + +{{/* Get value based on current Kubernetes version */}} +{{- define "project-prometheus-stack.kubeVersionDefaultValue" -}} + {{- $values := index . 0 }} + {{- $kubeVersion := index . 1 }} + {{- $old := index . 2 }} + {{- $new := index . 3 }} + {{- $default := index . 4 }} + {{- if kindIs "invalid" $default -}} + {{- if semverCompare $kubeVersion (include "project-prometheus-stack.kubeVersion" $values) -}} + {{- print $new -}} + {{- else -}} + {{- print $old -}} + {{- end -}} + {{- else -}} + {{- print $default }} + {{- end -}} +{{- end -}} + +{{/* +To help compatibility with other charts which use global.imagePullSecrets. +Allow either an array of {name: pullSecret} maps (k8s-style), or an array of strings (more common helm-style). +global: + imagePullSecrets: + - name: pullSecret1 + - name: pullSecret2 + +or + +global: + imagePullSecrets: + - pullSecret1 + - pullSecret2 +*/}} +{{- define "project-prometheus-stack.imagePullSecrets" -}} +{{- range .Values.global.imagePullSecrets }} + {{- if eq (typeOf .) "map[string]interface {}" }} +- {{ toYaml . | trim }} + {{- else }} +- name: {{ . }} + {{- end }} +{{- end }} +{{- end -}} diff --git a/charts/rancher-project-monitoring/0.2.0-rc1/templates/alertmanager/alertmanager.yaml b/charts/rancher-project-monitoring/0.2.0-rc1/templates/alertmanager/alertmanager.yaml new file mode 100644 index 00000000..460d4a7c --- /dev/null +++ b/charts/rancher-project-monitoring/0.2.0-rc1/templates/alertmanager/alertmanager.yaml @@ -0,0 +1,165 @@ +{{- if .Values.alertmanager.enabled }} +apiVersion: monitoring.coreos.com/v1 +kind: Alertmanager +metadata: + name: {{ template "project-prometheus-stack.alertmanager.crname" . }} + namespace: {{ template "project-prometheus-stack.namespace" . }} + labels: + app: {{ template "project-prometheus-stack.name" . }}-alertmanager +{{ include "project-prometheus-stack.labels" . | indent 4 }} +{{- if .Values.alertmanager.annotations }} + annotations: +{{ toYaml .Values.alertmanager.annotations | indent 4 }} +{{- end }} +spec: +{{- if .Values.alertmanager.alertmanagerSpec.image }} + {{- if and .Values.alertmanager.alertmanagerSpec.image.tag .Values.alertmanager.alertmanagerSpec.image.sha }} + image: "{{ template "system_default_registry" . }}{{ .Values.alertmanager.alertmanagerSpec.image.repository }}:{{ .Values.alertmanager.alertmanagerSpec.image.tag }}@sha256:{{ .Values.alertmanager.alertmanagerSpec.image.sha }}" + {{- else if .Values.alertmanager.alertmanagerSpec.image.sha }} + image: "{{ template "system_default_registry" . }}{{ .Values.alertmanager.alertmanagerSpec.image.repository }}@sha256:{{ .Values.alertmanager.alertmanagerSpec.image.sha }}" + {{- else if .Values.alertmanager.alertmanagerSpec.image.tag }} + image: "{{ template "system_default_registry" . }}{{ .Values.alertmanager.alertmanagerSpec.image.repository }}:{{ .Values.alertmanager.alertmanagerSpec.image.tag }}" + {{- else }} + image: "{{ template "system_default_registry" . }}{{ .Values.alertmanager.alertmanagerSpec.image.repository }}" + {{- end }} + version: {{ .Values.alertmanager.alertmanagerSpec.image.tag }} + {{- if .Values.alertmanager.alertmanagerSpec.image.sha }} + sha: {{ .Values.alertmanager.alertmanagerSpec.image.sha }} + {{- end }} +{{- end }} + replicas: {{ .Values.alertmanager.alertmanagerSpec.replicas }} + listenLocal: {{ .Values.alertmanager.alertmanagerSpec.listenLocal }} + serviceAccountName: {{ template "project-prometheus-stack.alertmanager.serviceAccountName" . }} +{{- if .Values.alertmanager.alertmanagerSpec.externalUrl }} + externalUrl: "{{ tpl .Values.alertmanager.alertmanagerSpec.externalUrl . }}" +{{- else if and .Values.alertmanager.ingress.enabled .Values.alertmanager.ingress.hosts }} + externalUrl: "http://{{ tpl (index .Values.alertmanager.ingress.hosts 0) . }}{{ .Values.alertmanager.alertmanagerSpec.routePrefix }}" +{{- else if not (or (empty .Values.global.cattle.url) (empty .Values.global.cattle.clusterId)) }} + externalUrl: "{{ .Values.global.cattle.url }}/k8s/clusters/{{ .Values.global.cattle.clusterId }}/api/v1/namespaces/{{ template "project-prometheus-stack.namespace" . }}/services/http:{{ template "project-prometheus-stack.fullname" . }}-alertmanager:{{ .Values.alertmanager.service.port }}/proxy" +{{- else }} + externalUrl: http://{{ template "project-prometheus-stack.fullname" . }}-alertmanager.{{ template "project-prometheus-stack.namespace" . }}:{{ .Values.alertmanager.service.port }} +{{- end }} + nodeSelector: {{ include "linux-node-selector" . | nindent 4 }} +{{- if .Values.alertmanager.alertmanagerSpec.nodeSelector }} +{{ toYaml .Values.alertmanager.alertmanagerSpec.nodeSelector | indent 4 }} +{{- end }} + paused: {{ .Values.alertmanager.alertmanagerSpec.paused }} + logFormat: {{ .Values.alertmanager.alertmanagerSpec.logFormat | quote }} + logLevel: {{ .Values.alertmanager.alertmanagerSpec.logLevel | quote }} + retention: {{ .Values.alertmanager.alertmanagerSpec.retention | quote }} +{{- if .Values.alertmanager.alertmanagerSpec.secrets }} + secrets: +{{ toYaml .Values.alertmanager.alertmanagerSpec.secrets | indent 4 }} +{{- end }} +{{- if .Values.alertmanager.alertmanagerSpec.configSecret }} + configSecret: {{ .Values.alertmanager.alertmanagerSpec.configSecret }} +{{- end }} +{{- if .Values.alertmanager.alertmanagerSpec.configMaps }} + configMaps: +{{ toYaml .Values.alertmanager.alertmanagerSpec.configMaps | indent 4 }} +{{- end }} +{{- if .Values.alertmanager.alertmanagerSpec.alertmanagerConfigSelector }} + alertmanagerConfigSelector: +{{ toYaml .Values.alertmanager.alertmanagerSpec.alertmanagerConfigSelector | indent 4}} +{{ else }} + alertmanagerConfigSelector: {} +{{- end }} + alertmanagerConfigNamespaceSelector: {{ .Values.global.cattle.projectNamespaceSelector | toYaml | nindent 4 }} +{{- if .Values.alertmanager.alertmanagerSpec.web }} + web: +{{ toYaml .Values.alertmanager.alertmanagerSpec.web | indent 4 }} +{{- end }} +{{- if .Values.alertmanager.alertmanagerSpec.alertmanagerConfiguration }} + alertmanagerConfiguration: +{{ toYaml .Values.alertmanager.alertmanagerSpec.alertmanagerConfiguration | indent 4 }} +{{- end }} +{{- if .Values.alertmanager.alertmanagerSpec.resources }} + resources: +{{ toYaml .Values.alertmanager.alertmanagerSpec.resources | indent 4 }} +{{- end }} +{{- if .Values.alertmanager.alertmanagerSpec.routePrefix }} + routePrefix: "{{ .Values.alertmanager.alertmanagerSpec.routePrefix }}" +{{- end }} +{{- if .Values.alertmanager.alertmanagerSpec.securityContext }} + securityContext: +{{ toYaml .Values.alertmanager.alertmanagerSpec.securityContext | indent 4 }} +{{- end }} +{{- if .Values.alertmanager.alertmanagerSpec.storage }} + storage: +{{ tpl (toYaml .Values.alertmanager.alertmanagerSpec.storage | indent 4) . }} +{{- end }} +{{- if .Values.alertmanager.alertmanagerSpec.podMetadata }} + podMetadata: +{{ toYaml .Values.alertmanager.alertmanagerSpec.podMetadata | indent 4 }} +{{- end }} +{{- if or .Values.alertmanager.alertmanagerSpec.podAntiAffinity .Values.alertmanager.alertmanagerSpec.affinity }} + affinity: +{{- end }} +{{- if .Values.alertmanager.alertmanagerSpec.affinity }} +{{ toYaml .Values.alertmanager.alertmanagerSpec.affinity | indent 4 }} +{{- end }} +{{- if eq .Values.alertmanager.alertmanagerSpec.podAntiAffinity "hard" }} + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - topologyKey: {{ .Values.alertmanager.alertmanagerSpec.podAntiAffinityTopologyKey }} + labelSelector: + matchExpressions: + - {key: app.kubernetes.io/name, operator: In, values: [alertmanager]} + - {key: alertmanager, operator: In, values: [{{ template "project-prometheus-stack.alertmanager.crname" . }}]} +{{- else if eq .Values.alertmanager.alertmanagerSpec.podAntiAffinity "soft" }} + podAntiAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - weight: 100 + podAffinityTerm: + topologyKey: {{ .Values.alertmanager.alertmanagerSpec.podAntiAffinityTopologyKey }} + labelSelector: + matchExpressions: + - {key: app.kubernetes.io/name, operator: In, values: [alertmanager]} + - {key: alertmanager, operator: In, values: [{{ template "project-prometheus-stack.alertmanager.crname" . }}]} +{{- end }} +{{- end }} + tolerations: {{ include "linux-node-tolerations" . | nindent 4 }} +{{- if .Values.alertmanager.alertmanagerSpec.tolerations }} +{{ toYaml .Values.alertmanager.alertmanagerSpec.tolerations | indent 4 }} +{{- end }} +{{- if .Values.alertmanager.alertmanagerSpec.topologySpreadConstraints }} + topologySpreadConstraints: +{{ toYaml .Values.alertmanager.alertmanagerSpec.topologySpreadConstraints | indent 4 }} +{{- end }} +{{- if .Values.global.imagePullSecrets }} + imagePullSecrets: +{{ include "project-prometheus-stack.imagePullSecrets" . | trim | indent 4 }} +{{- end }} +{{- if .Values.alertmanager.alertmanagerSpec.containers }} + containers: +{{ toYaml .Values.alertmanager.alertmanagerSpec.containers | indent 4 }} +{{- end }} +{{- if .Values.alertmanager.alertmanagerSpec.initContainers }} + initContainers: +{{ toYaml .Values.alertmanager.alertmanagerSpec.initContainers | indent 4 }} +{{- end }} +{{- if .Values.alertmanager.alertmanagerSpec.priorityClassName }} + priorityClassName: {{.Values.alertmanager.alertmanagerSpec.priorityClassName }} +{{- end }} +{{- if .Values.alertmanager.alertmanagerSpec.additionalPeers }} + additionalPeers: +{{ toYaml .Values.alertmanager.alertmanagerSpec.additionalPeers | indent 4 }} +{{- end }} +{{- if .Values.alertmanager.alertmanagerSpec.volumes }} + volumes: +{{ toYaml .Values.alertmanager.alertmanagerSpec.volumes | indent 4 }} +{{- end }} +{{- if .Values.alertmanager.alertmanagerSpec.volumeMounts }} + volumeMounts: +{{ toYaml .Values.alertmanager.alertmanagerSpec.volumeMounts | indent 4 }} +{{- end }} + portName: {{ .Values.alertmanager.alertmanagerSpec.portName }} +{{- if .Values.alertmanager.alertmanagerSpec.clusterAdvertiseAddress }} + clusterAdvertiseAddress: {{ .Values.alertmanager.alertmanagerSpec.clusterAdvertiseAddress }} +{{- end }} +{{- if .Values.alertmanager.alertmanagerSpec.forceEnableClusterMode }} + forceEnableClusterMode: {{ .Values.alertmanager.alertmanagerSpec.forceEnableClusterMode }} +{{- end }} +{{- if .Values.alertmanager.alertmanagerSpec.minReadySeconds }} + minReadySeconds: {{ .Values.alertmanager.alertmanagerSpec.minReadySeconds }} +{{- end }} diff --git a/charts/rancher-project-monitoring/0.2.0-rc1/templates/alertmanager/extrasecret.yaml b/charts/rancher-project-monitoring/0.2.0-rc1/templates/alertmanager/extrasecret.yaml new file mode 100644 index 00000000..af469be7 --- /dev/null +++ b/charts/rancher-project-monitoring/0.2.0-rc1/templates/alertmanager/extrasecret.yaml @@ -0,0 +1,20 @@ +{{- if .Values.alertmanager.extraSecret.data -}} +{{- $secretName := printf "alertmanager-%s-extra" (include "project-prometheus-stack.fullname" . ) -}} +apiVersion: v1 +kind: Secret +metadata: + name: {{ default $secretName .Values.alertmanager.extraSecret.name }} + namespace: {{ template "project-prometheus-stack.namespace" . }} +{{- if .Values.alertmanager.extraSecret.annotations }} + annotations: +{{ toYaml .Values.alertmanager.extraSecret.annotations | indent 4 }} +{{- end }} + labels: + app: {{ template "project-prometheus-stack.name" . }}-alertmanager + app.kubernetes.io/component: alertmanager +{{ include "project-prometheus-stack.labels" . | indent 4 }} +data: +{{- range $key, $val := .Values.alertmanager.extraSecret.data }} + {{ $key }}: {{ $val | b64enc | quote }} +{{- end }} +{{- end }} diff --git a/charts/rancher-project-monitoring/0.2.0-rc1/templates/alertmanager/ingress.yaml b/charts/rancher-project-monitoring/0.2.0-rc1/templates/alertmanager/ingress.yaml new file mode 100644 index 00000000..022922b0 --- /dev/null +++ b/charts/rancher-project-monitoring/0.2.0-rc1/templates/alertmanager/ingress.yaml @@ -0,0 +1,77 @@ +{{- if and .Values.alertmanager.enabled .Values.alertmanager.ingress.enabled }} +{{- $pathType := .Values.alertmanager.ingress.pathType | default "ImplementationSpecific" }} +{{- $serviceName := printf "%s-%s" (include "project-prometheus-stack.fullname" .) "alertmanager" }} +{{- $servicePort := .Values.alertmanager.ingress.servicePort | default .Values.alertmanager.service.port -}} +{{- $routePrefix := list .Values.alertmanager.alertmanagerSpec.routePrefix }} +{{- $paths := .Values.alertmanager.ingress.paths | default $routePrefix -}} +{{- $apiIsStable := eq (include "project-prometheus-stack.ingress.isStable" .) "true" -}} +{{- $ingressSupportsPathType := eq (include "project-prometheus-stack.ingress.supportsPathType" .) "true" -}} +apiVersion: {{ include "project-prometheus-stack.ingress.apiVersion" . }} +kind: Ingress +metadata: + name: {{ $serviceName }} + namespace: {{ template "project-prometheus-stack.namespace" . }} +{{- if .Values.alertmanager.ingress.annotations }} + annotations: +{{ toYaml .Values.alertmanager.ingress.annotations | indent 4 }} +{{- end }} + labels: + app: {{ template "project-prometheus-stack.name" . }}-alertmanager +{{- if .Values.alertmanager.ingress.labels }} +{{ toYaml .Values.alertmanager.ingress.labels | indent 4 }} +{{- end }} +{{ include "project-prometheus-stack.labels" . | indent 4 }} +spec: + {{- if $apiIsStable }} + {{- if .Values.alertmanager.ingress.ingressClassName }} + ingressClassName: {{ .Values.alertmanager.ingress.ingressClassName }} + {{- end }} + {{- end }} + rules: + {{- if .Values.alertmanager.ingress.hosts }} + {{- range $host := .Values.alertmanager.ingress.hosts }} + - host: {{ tpl $host $ }} + http: + paths: + {{- range $p := $paths }} + - path: {{ tpl $p $ }} + {{- if and $pathType $ingressSupportsPathType }} + pathType: {{ $pathType }} + {{- end }} + backend: + {{- if $apiIsStable }} + service: + name: {{ $serviceName }} + port: + number: {{ $servicePort }} + {{- else }} + serviceName: {{ $serviceName }} + servicePort: {{ $servicePort }} + {{- end }} + {{- end -}} + {{- end -}} + {{- else }} + - http: + paths: + {{- range $p := $paths }} + - path: {{ tpl $p $ }} + {{- if and $pathType $ingressSupportsPathType }} + pathType: {{ $pathType }} + {{- end }} + backend: + {{- if $apiIsStable }} + service: + name: {{ $serviceName }} + port: + number: {{ $servicePort }} + {{- else }} + serviceName: {{ $serviceName }} + servicePort: {{ $servicePort }} + {{- end }} + {{- end -}} + {{- end -}} + {{- if .Values.alertmanager.ingress.tls }} + tls: +{{ tpl (toYaml .Values.alertmanager.ingress.tls | indent 4) . }} + {{- end -}} +{{- end -}} diff --git a/charts/rancher-project-monitoring/0.2.0-rc1/templates/alertmanager/podDisruptionBudget.yaml b/charts/rancher-project-monitoring/0.2.0-rc1/templates/alertmanager/podDisruptionBudget.yaml new file mode 100644 index 00000000..a8d7feaf --- /dev/null +++ b/charts/rancher-project-monitoring/0.2.0-rc1/templates/alertmanager/podDisruptionBudget.yaml @@ -0,0 +1,21 @@ +{{- if and .Values.alertmanager.enabled .Values.alertmanager.podDisruptionBudget.enabled }} +apiVersion: {{ include "project-prometheus-stack.pdb.apiVersion" . }} +kind: PodDisruptionBudget +metadata: + name: {{ template "project-prometheus-stack.fullname" . }}-alertmanager + namespace: {{ template "project-prometheus-stack.namespace" . }} + labels: + app: {{ template "project-prometheus-stack.name" . }}-alertmanager +{{ include "project-prometheus-stack.labels" . | indent 4 }} +spec: + {{- if .Values.alertmanager.podDisruptionBudget.minAvailable }} + minAvailable: {{ .Values.alertmanager.podDisruptionBudget.minAvailable }} + {{- end }} + {{- if .Values.alertmanager.podDisruptionBudget.maxUnavailable }} + maxUnavailable: {{ .Values.alertmanager.podDisruptionBudget.maxUnavailable }} + {{- end }} + selector: + matchLabels: + app.kubernetes.io/name: alertmanager + alertmanager: {{ template "project-prometheus-stack.alertmanager.crname" . }} +{{- end }} diff --git a/charts/rancher-project-monitoring/0.2.0-rc1/templates/alertmanager/psp-role.yaml b/charts/rancher-project-monitoring/0.2.0-rc1/templates/alertmanager/psp-role.yaml new file mode 100644 index 00000000..6449888f --- /dev/null +++ b/charts/rancher-project-monitoring/0.2.0-rc1/templates/alertmanager/psp-role.yaml @@ -0,0 +1,21 @@ +{{- if and .Values.alertmanager.enabled .Values.global.rbac.create .Values.global.rbac.pspEnabled }} +kind: Role +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: {{ template "project-prometheus-stack.fullname" . }}-alertmanager + namespace: {{ template "project-prometheus-stack.namespace" . }} + labels: + app: {{ template "project-prometheus-stack.name" . }}-alertmanager +{{ include "project-prometheus-stack.labels" . | indent 4 }} +rules: +{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} +{{- if semverCompare "> 1.15.0-0" $kubeTargetVersion }} +- apiGroups: ['policy'] +{{- else }} +- apiGroups: ['extensions'] +{{- end }} + resources: ['podsecuritypolicies'] + verbs: ['use'] + resourceNames: + - {{ template "project-prometheus-stack.fullname" . }}-alertmanager +{{- end }} diff --git a/charts/rancher-project-monitoring/0.2.0-rc1/templates/alertmanager/psp-rolebinding.yaml b/charts/rancher-project-monitoring/0.2.0-rc1/templates/alertmanager/psp-rolebinding.yaml new file mode 100644 index 00000000..9a282952 --- /dev/null +++ b/charts/rancher-project-monitoring/0.2.0-rc1/templates/alertmanager/psp-rolebinding.yaml @@ -0,0 +1,18 @@ +{{- if and .Values.alertmanager.enabled .Values.global.rbac.create .Values.global.rbac.pspEnabled }} +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: {{ template "project-prometheus-stack.fullname" . }}-alertmanager + namespace: {{ template "project-prometheus-stack.namespace" . }} + labels: + app: {{ template "project-prometheus-stack.name" . }}-alertmanager +{{ include "project-prometheus-stack.labels" . | indent 4 }} +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: {{ template "project-prometheus-stack.fullname" . }}-alertmanager +subjects: + - kind: ServiceAccount + name: {{ template "project-prometheus-stack.alertmanager.serviceAccountName" . }} + namespace: {{ template "project-prometheus-stack.namespace" . }} +{{- end }} diff --git a/charts/rancher-project-monitoring/0.2.0-rc1/templates/alertmanager/psp.yaml b/charts/rancher-project-monitoring/0.2.0-rc1/templates/alertmanager/psp.yaml new file mode 100644 index 00000000..2440462a --- /dev/null +++ b/charts/rancher-project-monitoring/0.2.0-rc1/templates/alertmanager/psp.yaml @@ -0,0 +1,46 @@ +{{- if and .Values.alertmanager.enabled .Values.global.rbac.create .Values.global.rbac.pspEnabled }} +apiVersion: policy/v1beta1 +kind: PodSecurityPolicy +metadata: + name: {{ template "project-prometheus-stack.fullname" . }}-alertmanager + labels: + app: {{ template "project-prometheus-stack.name" . }}-alertmanager +{{- if .Values.global.rbac.pspAnnotations }} + annotations: +{{ toYaml .Values.global.rbac.pspAnnotations | indent 4 }} +{{- end }} +{{ include "project-prometheus-stack.labels" . | indent 4 }} +spec: + privileged: false + # Allow core volume types. + volumes: + - 'configMap' + - 'emptyDir' + - 'projected' + - 'secret' + - 'downwardAPI' + - 'persistentVolumeClaim' + hostNetwork: false + hostIPC: false + hostPID: false + runAsUser: + # Permits the container to run with root privileges as well. + rule: 'RunAsAny' + seLinux: + # This policy assumes the nodes are using AppArmor rather than SELinux. + rule: 'RunAsAny' + supplementalGroups: + rule: 'MustRunAs' + ranges: + # Allow adding the root group. + - min: 0 + max: 65535 + fsGroup: + rule: 'MustRunAs' + ranges: + # Allow adding the root group. + - min: 0 + max: 65535 + readOnlyRootFilesystem: false +{{- end }} + diff --git a/charts/rancher-project-monitoring/0.2.0-rc1/templates/alertmanager/secret.yaml b/charts/rancher-project-monitoring/0.2.0-rc1/templates/alertmanager/secret.yaml new file mode 100644 index 00000000..848d085f --- /dev/null +++ b/charts/rancher-project-monitoring/0.2.0-rc1/templates/alertmanager/secret.yaml @@ -0,0 +1,33 @@ +{{- if .Values.alertmanager.enabled }} +{{/* This file is applied when the operation is helm install and the target secret does not exist. */}} +{{- $secretName := (printf "%s-alertmanager-secret" (include "project-prometheus-stack.fullname" .)) }} +{{- if (not (lookup "v1" "Secret" (include "project-prometheus-stack.namespace" .) $secretName)) }} +apiVersion: v1 +kind: Secret +metadata: + name: {{ $secretName }} + namespace: {{ template "project-prometheus-stack.namespace" . }} + annotations: + "helm.sh/hook": pre-install, pre-upgrade + "helm.sh/hook-weight": "3" + "helm.sh/resource-policy": keep +{{- if .Values.alertmanager.secret.annotations }} +{{ toYaml .Values.alertmanager.secret.annotations | indent 4 }} +{{- end }} + labels: + app: {{ template "project-prometheus-stack.name" . }}-alertmanager +{{ include "project-prometheus-stack.labels" . | indent 4 }} +data: +{{- if .Values.alertmanager.tplConfig }} +{{- if eq (typeOf .Values.alertmanager.config) "string" }} + alertmanager.yaml: {{ tpl (.Values.alertmanager.config) . | b64enc | quote }} +{{- else }} + alertmanager.yaml: {{ tpl (toYaml .Values.alertmanager.config) . | b64enc | quote }} +{{- end }} +{{- else }} + alertmanager.yaml: {{ toYaml .Values.alertmanager.config | b64enc | quote }} +{{- end}} +{{- range $key, $val := .Values.alertmanager.templateFiles }} + {{ $key }}: {{ $val | b64enc | quote }} +{{- end }} +{{- end }}{{- end }} diff --git a/charts/rancher-project-monitoring/0.2.0-rc1/templates/alertmanager/service.yaml b/charts/rancher-project-monitoring/0.2.0-rc1/templates/alertmanager/service.yaml new file mode 100644 index 00000000..3fb5cb3c --- /dev/null +++ b/charts/rancher-project-monitoring/0.2.0-rc1/templates/alertmanager/service.yaml @@ -0,0 +1,53 @@ +{{- if .Values.alertmanager.enabled }} +apiVersion: v1 +kind: Service +metadata: + name: {{ template "project-prometheus-stack.fullname" . }}-alertmanager + namespace: {{ template "project-prometheus-stack.namespace" . }} + labels: + app: {{ template "project-prometheus-stack.name" . }}-alertmanager + self-monitor: {{ .Values.alertmanager.serviceMonitor.selfMonitor | quote }} +{{ include "project-prometheus-stack.labels" . | indent 4 }} +{{- if .Values.alertmanager.service.labels }} +{{ toYaml .Values.alertmanager.service.labels | indent 4 }} +{{- end }} +{{- if .Values.alertmanager.service.annotations }} + annotations: +{{ toYaml .Values.alertmanager.service.annotations | indent 4 }} +{{- end }} +spec: +{{- if .Values.alertmanager.service.clusterIP }} + clusterIP: {{ .Values.alertmanager.service.clusterIP }} +{{- end }} +{{- if .Values.alertmanager.service.externalIPs }} + externalIPs: +{{ toYaml .Values.alertmanager.service.externalIPs | indent 4 }} +{{- end }} +{{- if .Values.alertmanager.service.loadBalancerIP }} + loadBalancerIP: {{ .Values.alertmanager.service.loadBalancerIP }} +{{- end }} +{{- if .Values.alertmanager.service.loadBalancerSourceRanges }} + loadBalancerSourceRanges: + {{- range $cidr := .Values.alertmanager.service.loadBalancerSourceRanges }} + - {{ $cidr }} + {{- end }} +{{- end }} +{{- if ne .Values.alertmanager.service.type "ClusterIP" }} + externalTrafficPolicy: {{ .Values.alertmanager.service.externalTrafficPolicy }} +{{- end }} + ports: + - name: {{ .Values.alertmanager.alertmanagerSpec.portName }} + {{- if eq .Values.alertmanager.service.type "NodePort" }} + nodePort: {{ .Values.alertmanager.service.nodePort }} + {{- end }} + port: {{ .Values.alertmanager.service.port }} + targetPort: {{ .Values.alertmanager.service.targetPort }} + protocol: TCP +{{- if .Values.alertmanager.service.additionalPorts }} +{{ toYaml .Values.alertmanager.service.additionalPorts | indent 2 }} +{{- end }} + selector: + app.kubernetes.io/name: alertmanager + alertmanager: {{ template "project-prometheus-stack.alertmanager.crname" . }} + type: "{{ .Values.alertmanager.service.type }}" +{{- end }} diff --git a/charts/rancher-project-monitoring/0.2.0-rc1/templates/alertmanager/serviceaccount.yaml b/charts/rancher-project-monitoring/0.2.0-rc1/templates/alertmanager/serviceaccount.yaml new file mode 100644 index 00000000..00b4b177 --- /dev/null +++ b/charts/rancher-project-monitoring/0.2.0-rc1/templates/alertmanager/serviceaccount.yaml @@ -0,0 +1,20 @@ +{{- if and .Values.alertmanager.enabled .Values.alertmanager.serviceAccount.create }} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ template "project-prometheus-stack.alertmanager.serviceAccountName" . }} + namespace: {{ template "project-prometheus-stack.namespace" . }} + labels: + app: {{ template "project-prometheus-stack.name" . }}-alertmanager + app.kubernetes.io/name: {{ template "project-prometheus-stack.name" . }}-alertmanager + app.kubernetes.io/component: alertmanager +{{ include "project-prometheus-stack.labels" . | indent 4 }} +{{- if .Values.alertmanager.serviceAccount.annotations }} + annotations: +{{ toYaml .Values.alertmanager.serviceAccount.annotations | indent 4 }} +{{- end }} +{{- if .Values.global.imagePullSecrets }} +imagePullSecrets: +{{ include "project-prometheus-stack.imagePullSecrets" . | trim | indent 2}} +{{- end }} +{{- end }} diff --git a/charts/rancher-project-monitoring/0.2.0-rc1/templates/alertmanager/servicemonitor.yaml b/charts/rancher-project-monitoring/0.2.0-rc1/templates/alertmanager/servicemonitor.yaml new file mode 100644 index 00000000..a51914cd --- /dev/null +++ b/charts/rancher-project-monitoring/0.2.0-rc1/templates/alertmanager/servicemonitor.yaml @@ -0,0 +1,45 @@ +{{- if and .Values.alertmanager.enabled .Values.alertmanager.serviceMonitor.selfMonitor }} +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + name: {{ template "project-prometheus-stack.fullname" . }}-alertmanager + namespace: {{ template "project-prometheus-stack.namespace" . }} + labels: + app: {{ template "project-prometheus-stack.name" . }}-alertmanager +{{ include "project-prometheus-stack.labels" . | indent 4 }} +spec: + selector: + matchLabels: + app: {{ template "project-prometheus-stack.name" . }}-alertmanager + release: {{ $.Release.Name | quote }} + self-monitor: "true" + namespaceSelector: + matchNames: + - {{ printf "%s" (include "project-prometheus-stack.namespace" .) | quote }} + endpoints: + - port: {{ .Values.alertmanager.alertmanagerSpec.portName }} + {{- if .Values.alertmanager.serviceMonitor.interval }} + interval: {{ .Values.alertmanager.serviceMonitor.interval }} + {{- end }} + {{- if .Values.alertmanager.serviceMonitor.proxyUrl }} + proxyUrl: {{ .Values.alertmanager.serviceMonitor.proxyUrl}} + {{- end }} + {{- if .Values.alertmanager.serviceMonitor.scheme }} + scheme: {{ .Values.alertmanager.serviceMonitor.scheme }} + {{- end }} + {{- if .Values.alertmanager.serviceMonitor.bearerTokenFile }} + bearerTokenFile: {{ .Values.alertmanager.serviceMonitor.bearerTokenFile }} + {{- end }} + {{- if .Values.alertmanager.serviceMonitor.tlsConfig }} + tlsConfig: {{ toYaml .Values.alertmanager.serviceMonitor.tlsConfig | nindent 6 }} + {{- end }} + path: "{{ trimSuffix "/" .Values.alertmanager.alertmanagerSpec.routePrefix }}/metrics" +{{- if .Values.alertmanager.serviceMonitor.metricRelabelings }} + metricRelabelings: +{{ tpl (toYaml .Values.alertmanager.serviceMonitor.metricRelabelings | indent 6) . }} +{{- end }} +{{- if .Values.alertmanager.serviceMonitor.relabelings }} + relabelings: +{{ toYaml .Values.alertmanager.serviceMonitor.relabelings | indent 6 }} +{{- end }} +{{- end }} diff --git a/charts/rancher-project-monitoring/0.2.0-rc1/templates/dashboard-roles.yaml b/charts/rancher-project-monitoring/0.2.0-rc1/templates/dashboard-roles.yaml new file mode 100644 index 00000000..65019ea1 --- /dev/null +++ b/charts/rancher-project-monitoring/0.2.0-rc1/templates/dashboard-roles.yaml @@ -0,0 +1,141 @@ +{{- if and .Values.global.rbac.create .Values.global.rbac.userRoles.create }} +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: {{ template "project-prometheus-stack.fullname" . }}-admin + namespace: {{ template "project-prometheus-stack.namespace" . }} + labels: {{ include "project-prometheus-stack.labels" . | nindent 4 }} + helm.cattle.io/project-helm-chart-role: {{ .Release.Name }} + {{- if .Values.global.rbac.userRoles.aggregateToDefaultRoles }} + helm.cattle.io/project-helm-chart-role-aggregate-from: admin + {{- end }} +rules: +- apiGroups: + - "" + resources: + - services/proxy + resourceNames: + - "http:{{ template "project-prometheus-stack.fullname" . }}-prometheus:{{ .Values.prometheus.service.port }}" + - "https:{{ template "project-prometheus-stack.fullname" . }}-prometheus:{{ .Values.prometheus.service.port }}" + - "http:{{ template "project-prometheus-stack.fullname" . }}-alertmanager:{{ .Values.alertmanager.service.port }}" + - "https:{{ template "project-prometheus-stack.fullname" . }}-alertmanager:{{ .Values.alertmanager.service.port }}" + - "http:{{ include "call-nested" (list . "grafana" "grafana.fullname") }}:{{ .Values.grafana.service.port }}" + - "https:{{ include "call-nested" (list . "grafana" "grafana.fullname") }}:{{ .Values.grafana.service.port }}" + verbs: + - 'get' +- apiGroups: + - "" + resources: + - endpoints + resourceNames: + - {{ template "project-prometheus-stack.fullname" . }}-prometheus + - {{ template "project-prometheus-stack.fullname" . }}-alertmanager + - {{ include "call-nested" (list . "grafana" "grafana.fullname") }} + verbs: + - list +- apiGroups: + - "" + resources: + - "secrets" + resourceNames: + - {{ printf "%s-alertmanager-secret" (include "project-prometheus-stack.fullname" .) }} + verbs: + - get + - list + - watch + - update + - patch + - delete +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: {{ template "project-prometheus-stack.fullname" . }}-edit + namespace: {{ template "project-prometheus-stack.namespace" . }} + labels: {{ include "project-prometheus-stack.labels" . | nindent 4 }} + helm.cattle.io/project-helm-chart-role: {{ .Release.Name }} + {{- if .Values.global.rbac.userRoles.aggregateToDefaultRoles }} + helm.cattle.io/project-helm-chart-role-aggregate-from: edit + {{- end }} +rules: +- apiGroups: + - "" + resources: + - services/proxy + resourceNames: + - "http:{{ template "project-prometheus-stack.fullname" . }}-prometheus:{{ .Values.prometheus.service.port }}" + - "https:{{ template "project-prometheus-stack.fullname" . }}-prometheus:{{ .Values.prometheus.service.port }}" + - "http:{{ template "project-prometheus-stack.fullname" . }}-alertmanager:{{ .Values.alertmanager.service.port }}" + - "https:{{ template "project-prometheus-stack.fullname" . }}-alertmanager:{{ .Values.alertmanager.service.port }}" + - "http:{{ include "call-nested" (list . "grafana" "grafana.fullname") }}:{{ .Values.grafana.service.port }}" + - "https:{{ include "call-nested" (list . "grafana" "grafana.fullname") }}:{{ .Values.grafana.service.port }}" + verbs: + - 'get' +- apiGroups: + - "" + resources: + - endpoints + resourceNames: + - {{ template "project-prometheus-stack.fullname" . }}-prometheus + - {{ template "project-prometheus-stack.fullname" . }}-alertmanager + - {{ include "call-nested" (list . "grafana" "grafana.fullname") }} + verbs: + - list +- apiGroups: + - "" + resources: + - "secrets" + resourceNames: + - {{ printf "%s-alertmanager-secret" (include "project-prometheus-stack.fullname" .) }} + verbs: + - get + - list + - watch + - update + - patch +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: {{ template "project-prometheus-stack.fullname" . }}-view + namespace: {{ template "project-prometheus-stack.namespace" . }} + labels: {{ include "project-prometheus-stack.labels" . | nindent 4 }} + helm.cattle.io/project-helm-chart-role: {{ .Release.Name }} + {{- if .Values.global.rbac.userRoles.aggregateToDefaultRoles }} + helm.cattle.io/project-helm-chart-role-aggregate-from: view + {{- end }} +rules: +- apiGroups: + - "" + resources: + - services/proxy + resourceNames: + - "http:{{ template "project-prometheus-stack.fullname" . }}-prometheus:{{ .Values.prometheus.service.port }}" + - "https:{{ template "project-prometheus-stack.fullname" . }}-prometheus:{{ .Values.prometheus.service.port }}" + - "http:{{ template "project-prometheus-stack.fullname" . }}-alertmanager:{{ .Values.alertmanager.service.port }}" + - "https:{{ template "project-prometheus-stack.fullname" . }}-alertmanager:{{ .Values.alertmanager.service.port }}" + - "http:{{ include "call-nested" (list . "grafana" "grafana.fullname") }}:{{ .Values.grafana.service.port }}" + - "https:{{ include "call-nested" (list . "grafana" "grafana.fullname") }}:{{ .Values.grafana.service.port }}" + verbs: + - 'get' +- apiGroups: + - "" + resources: + - endpoints + resourceNames: + - {{ template "project-prometheus-stack.fullname" . }}-prometheus + - {{ template "project-prometheus-stack.fullname" . }}-alertmanager + - {{ include "call-nested" (list . "grafana" "grafana.fullname") }} + verbs: + - list +- apiGroups: + - "" + resources: + - "secrets" + resourceNames: + - {{ printf "%s-alertmanager-secret" (include "project-prometheus-stack.fullname" .) }} + verbs: + - get + - list + - watch +{{- end }} diff --git a/charts/rancher-project-monitoring/0.2.0-rc1/templates/dashboard-values-configmap.yaml b/charts/rancher-project-monitoring/0.2.0-rc1/templates/dashboard-values-configmap.yaml new file mode 100644 index 00000000..16acc46d --- /dev/null +++ b/charts/rancher-project-monitoring/0.2.0-rc1/templates/dashboard-values-configmap.yaml @@ -0,0 +1,57 @@ +{{- $rancherDashboards := dict }} +{{- range $glob := tuple "files/rancher/workloads/*" "files/rancher/pods/*" -}} +{{- range $dashboard, $_ := ($.Files.Glob $glob) }} +{{- $dashboardMap := ($.Files.Get $dashboard | fromJson) }} +{{- $_ := set $rancherDashboards (get $dashboardMap "uid") (get $dashboardMap "title") -}} +{{- end }} +{{- end }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ template "project-prometheus-stack.fullname" . }}-dashboard-values + namespace: {{ template "project-prometheus-stack.namespace" . }} + labels: {{ include "project-prometheus-stack.labels" . | nindent 4 }} + helm.cattle.io/dashboard-values-configmap: {{ .Release.Name }} +data: + values.json: |- + { +{{- if not .Values.prometheus.enabled }} + "prometheusURL": "", +{{- else if .Values.prometheus.prometheusSpec.externalUrl }} + "prometheusURL": "{{ tpl .Values.prometheus.prometheusSpec.externalUrl . }}", +{{- else if and .Values.prometheus.ingress.enabled .Values.prometheus.ingress.hosts }} + "prometheusURL": "http://{{ tpl (index .Values.prometheus.ingress.hosts 0) . }}{{ .Values.prometheus.prometheusSpec.routePrefix }}", +{{- else if not (or (empty .Values.global.cattle.url) (empty .Values.global.cattle.clusterId)) }} + "prometheusURL": "{{ .Values.global.cattle.url }}/k8s/clusters/{{ .Values.global.cattle.clusterId }}/api/v1/namespaces/{{ template "project-prometheus-stack.namespace" . }}/services/http:{{ template "project-prometheus-stack.fullname" . }}-prometheus:{{ .Values.prometheus.service.port }}/proxy", +{{- else }} + "prometheusURL": "http://{{ template "project-prometheus-stack.fullname" . }}-prometheus.{{ template "project-prometheus-stack.namespace" . }}:{{ .Values.prometheus.service.port }}", +{{- end }} + +{{- if not .Values.grafana.enabled }} + "grafanaURL": "", +{{- else if and .Values.grafana.ingress.enabled .Values.grafana.ingress.hosts }} + "grafanaURL": "http://{{ tpl (index .Values.grafana.ingress.hosts 0) . }}{{ .Values.grafana.grafanaSpec.ingress.path }}", +{{- else if not (or (empty .Values.global.cattle.url) (empty .Values.global.cattle.clusterId)) }} + "grafanaURL": "{{ .Values.global.cattle.url }}/k8s/clusters/{{ .Values.global.cattle.clusterId }}/api/v1/namespaces/{{ template "project-prometheus-stack.namespace" . }}/services/http:{{ include "call-nested" (list . "grafana" "grafana.fullname") }}:{{ .Values.grafana.service.port }}/proxy", +{{- else }} + "grafanaURL": "http://{{ include "call-nested" (list . "grafana" "grafana.fullname") }}.{{ template "project-prometheus-stack.namespace" . }}:{{ .Values.grafana.service.port }}", +{{- end }} + +{{- if not .Values.alertmanager.enabled }} + "alertmanagerURL": "", +{{- else if .Values.alertmanager.alertmanagerSpec.externalUrl }} + "alertmanagerURL": "{{ tpl .Values.alertmanager.alertmanagerSpec.externalUrl . }}", +{{- else if and .Values.alertmanager.ingress.enabled .Values.alertmanager.ingress.hosts }} + "alertmanagerURL": "http://{{ tpl (index .Values.alertmanager.ingress.hosts 0) . }}{{ .Values.alertmanager.alertmanagerSpec.routePrefix }}", +{{- else if not (or (empty .Values.global.cattle.url) (empty .Values.global.cattle.clusterId)) }} + "alertmanagerURL": "{{ .Values.global.cattle.url }}/k8s/clusters/{{ .Values.global.cattle.clusterId }}/api/v1/namespaces/{{ template "project-prometheus-stack.namespace" . }}/services/http:{{ template "project-prometheus-stack.fullname" . }}-alertmanager:{{ .Values.alertmanager.service.port }}/proxy", +{{- else }} + "alertmanagerURL": "http://{{ template "project-prometheus-stack.fullname" . }}-alertmanager.{{ template "project-prometheus-stack.namespace" . }}:{{ .Values.alertmanager.service.port }}", +{{- end }} + +{{- if and .Values.grafana.enabled .Values.grafana.defaultDashboardsEnabled }} + "rancherDashboards": {{- $rancherDashboards | toPrettyJson | nindent 8 }} +{{- else }} + "rancherDashboards": [] +{{- end }} + } \ No newline at end of file diff --git a/charts/rancher-project-monitoring/0.2.0-rc1/templates/dashboards/rancher/pods-dashboards.yaml b/charts/rancher-project-monitoring/0.2.0-rc1/templates/dashboards/rancher/pods-dashboards.yaml new file mode 100644 index 00000000..6214dc5c --- /dev/null +++ b/charts/rancher-project-monitoring/0.2.0-rc1/templates/dashboards/rancher/pods-dashboards.yaml @@ -0,0 +1,17 @@ +{{- if and .Values.grafana.enabled .Values.grafana.defaultDashboardsEnabled }} +apiVersion: v1 +kind: ConfigMap +metadata: + namespace: {{ template "project-prometheus-stack.namespace" . }} + name: rancher-default-dashboards-pods + annotations: +{{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} + labels: + {{- if $.Values.grafana.sidecar.dashboards.label }} + {{ $.Values.grafana.sidecar.dashboards.label }}: {{ ternary $.Values.grafana.sidecar.dashboards.labelValue "1" (not (empty $.Values.grafana.sidecar.dashboards.labelValue)) | quote }} + {{- end }} + app: {{ template "project-prometheus-stack.name" $ }}-grafana +{{ include "project-prometheus-stack.labels" $ | indent 4 }} +data: +{{ (.Files.Glob "files/rancher/pods/*").AsConfig | indent 2 }} +{{- end }} diff --git a/charts/rancher-project-monitoring/0.2.0-rc1/templates/dashboards/rancher/workload-dashboards.yaml b/charts/rancher-project-monitoring/0.2.0-rc1/templates/dashboards/rancher/workload-dashboards.yaml new file mode 100644 index 00000000..7934818f --- /dev/null +++ b/charts/rancher-project-monitoring/0.2.0-rc1/templates/dashboards/rancher/workload-dashboards.yaml @@ -0,0 +1,17 @@ +{{- if and .Values.grafana.enabled .Values.grafana.defaultDashboardsEnabled }} +apiVersion: v1 +kind: ConfigMap +metadata: + namespace: {{ template "project-prometheus-stack.namespace" . }} + name: rancher-default-dashboards-workloads + annotations: +{{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} + labels: + {{- if $.Values.grafana.sidecar.dashboards.label }} + {{ $.Values.grafana.sidecar.dashboards.label }}: {{ ternary $.Values.grafana.sidecar.dashboards.labelValue "1" (not (empty $.Values.grafana.sidecar.dashboards.labelValue)) | quote }} + {{- end }} + app: {{ template "project-prometheus-stack.name" $ }}-grafana +{{ include "project-prometheus-stack.labels" $ | indent 4 }} +data: +{{ (.Files.Glob "files/rancher/workloads/*").AsConfig | indent 2 }} +{{- end }} diff --git a/charts/rancher-project-monitoring/0.2.0-rc1/templates/grafana/configmap-dashboards.yaml b/charts/rancher-project-monitoring/0.2.0-rc1/templates/grafana/configmap-dashboards.yaml new file mode 100644 index 00000000..c2763573 --- /dev/null +++ b/charts/rancher-project-monitoring/0.2.0-rc1/templates/grafana/configmap-dashboards.yaml @@ -0,0 +1,24 @@ +{{- if or (and .Values.grafana.enabled .Values.grafana.defaultDashboardsEnabled) .Values.grafana.forceDeployDashboards }} +{{- $files := .Files.Glob "dashboards-1.14/*.json" }} +{{- if $files }} +apiVersion: v1 +kind: ConfigMapList +items: +{{- range $path, $fileContents := $files }} +{{- $dashboardName := regexReplaceAll "(^.*/)(.*)\\.json$" $path "${2}" }} +- apiVersion: v1 + kind: ConfigMap + metadata: + name: {{ printf "%s-%s" (include "project-prometheus-stack.fullname" $) $dashboardName | trunc 63 | trimSuffix "-" }} + namespace: {{ template "project-prometheus-stack.namespace" . }} + labels: + {{- if $.Values.grafana.sidecar.dashboards.label }} + {{ $.Values.grafana.sidecar.dashboards.label }}: {{ ternary $.Values.grafana.sidecar.dashboards.labelValue "1" (not (empty $.Values.grafana.sidecar.dashboards.labelValue)) | quote }} + {{- end }} + app: {{ template "project-prometheus-stack.name" $ }}-grafana +{{ include "project-prometheus-stack.labels" $ | indent 6 }} + data: + {{ $dashboardName }}.json: {{ $.Files.Get $path | toJson }} +{{- end }} +{{- end }} +{{- end }} diff --git a/charts/rancher-project-monitoring/0.2.0-rc1/templates/grafana/configmaps-datasources.yaml b/charts/rancher-project-monitoring/0.2.0-rc1/templates/grafana/configmaps-datasources.yaml new file mode 100644 index 00000000..7f2c5b55 --- /dev/null +++ b/charts/rancher-project-monitoring/0.2.0-rc1/templates/grafana/configmaps-datasources.yaml @@ -0,0 +1,46 @@ +{{- if or (and .Values.grafana.enabled .Values.grafana.sidecar.datasources.enabled) .Values.grafana.forceDeployDatasources }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ template "project-prometheus-stack.fullname" . }}-grafana-datasource + namespace: {{ include "project-prometheus-stack.namespace" . }} +{{- if .Values.grafana.sidecar.datasources.annotations }} + annotations: +{{ toYaml .Values.grafana.sidecar.datasources.annotations | indent 4 }} +{{- end }} + labels: + {{ $.Values.grafana.sidecar.datasources.label }}: "1" + app: {{ template "project-prometheus-stack.name" $ }}-grafana +{{ include "project-prometheus-stack.labels" $ | indent 4 }} +data: + datasource.yaml: |- + apiVersion: 1 +{{- if .Values.grafana.deleteDatasources }} + deleteDatasources: +{{ tpl (toYaml .Values.grafana.deleteDatasources | indent 6) . }} +{{- end }} + datasources: +{{- $scrapeInterval := .Values.grafana.sidecar.datasources.defaultDatasourceScrapeInterval | default .Values.prometheus.prometheusSpec.scrapeInterval | default "30s" }} +{{- if .Values.grafana.sidecar.datasources.defaultDatasourceEnabled }} + - name: Prometheus + type: prometheus + uid: {{ .Values.grafana.sidecar.datasources.uid }} + {{- if .Values.grafana.sidecar.datasources.url }} + url: {{ .Values.grafana.sidecar.datasources.url }} + {{- else }} + url: http://{{ template "project-prometheus-stack.fullname" . }}-prometheus.{{ template "project-prometheus-stack.namespace" . }}:{{ .Values.prometheus.service.port }}/{{ trimPrefix "/" .Values.prometheus.prometheusSpec.routePrefix }} + {{- end }} + access: proxy + isDefault: true + jsonData: + timeInterval: {{ $scrapeInterval }} +{{- if .Values.grafana.sidecar.datasources.exemplarTraceIdDestinations }} + exemplarTraceIdDestinations: + - datasourceUid: {{ .Values.grafana.sidecar.datasources.exemplarTraceIdDestinations.datasourceUid }} + name: {{ .Values.grafana.sidecar.datasources.exemplarTraceIdDestinations.traceIdLabelName }} +{{- end }} +{{- end }} +{{- if .Values.grafana.additionalDataSources }} +{{ tpl (toYaml .Values.grafana.additionalDataSources | indent 4) . }} +{{- end }} +{{- end }} diff --git a/charts/rancher-project-monitoring/0.2.0-rc1/templates/grafana/dashboards-1.14/alertmanager-overview.yaml b/charts/rancher-project-monitoring/0.2.0-rc1/templates/grafana/dashboards-1.14/alertmanager-overview.yaml new file mode 100644 index 00000000..8f8e6ffe --- /dev/null +++ b/charts/rancher-project-monitoring/0.2.0-rc1/templates/grafana/dashboards-1.14/alertmanager-overview.yaml @@ -0,0 +1,616 @@ +{{- /* +Generated from 'alertmanager-overview' from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/grafana-dashboardDefinitions.yaml +Do not change in-place! In order to change this file first read following link: +https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack +*/ -}} +{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} +{{- if and (or .Values.grafana.enabled .Values.grafana.forceDeployDashboards) (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.grafana.defaultDashboardsEnabled }} +{{- if and .Values.alertmanager.enabled .Values.alertmanager.serviceMonitor.selfMonitor }} +apiVersion: v1 +kind: ConfigMap +metadata: + namespace: {{ template "project-prometheus-stack.namespace" . }} + name: {{ printf "%s-%s" (include "project-prometheus-stack.fullname" $) "alertmanager-overview" | trunc 63 | trimSuffix "-" }} + annotations: +{{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} + labels: + {{- if $.Values.grafana.sidecar.dashboards.label }} + {{ $.Values.grafana.sidecar.dashboards.label }}: {{ ternary $.Values.grafana.sidecar.dashboards.labelValue "1" (not (empty $.Values.grafana.sidecar.dashboards.labelValue)) | quote }} + {{- end }} + app: {{ template "project-prometheus-stack.name" $ }}-grafana +{{ include "project-prometheus-stack.labels" $ | indent 4 }} +data: + alertmanager-overview.json: |- + { + "__inputs": [ + + ], + "__requires": [ + + ], + "annotations": { + "list": [ + + ] + }, + "editable": false, + "gnetId": null, + "graphTooltip": 1, + "hideControls": false, + "id": null, + "links": [ + + ], + "refresh": "30s", + "rows": [ + { + "collapse": false, + "collapsed": false, + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "description": "current set of alerts stored in the Alertmanager", + "fill": 1, + "fillGradient": 0, + "gridPos": { + + }, + "id": 2, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": false, + "show": false, + "sideWidth": null, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum(alertmanager_alerts{namespace=~\"$namespace\",service=~\"$service\"}) by (namespace,service,instance)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}instance{{`}}`}}", + "refId": "A" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Alerts", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "none", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "none", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "description": "rate of successful and invalid alerts received by the Alertmanager", + "fill": 1, + "fillGradient": 0, + "gridPos": { + + }, + "id": 3, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": false, + "show": false, + "sideWidth": null, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum(rate(alertmanager_alerts_received_total{namespace=~\"$namespace\",service=~\"$service\"}[$__rate_interval])) by (namespace,service,instance)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}instance{{`}}`}} Received", + "refId": "A" + }, + { + "expr": "sum(rate(alertmanager_alerts_invalid_total{namespace=~\"$namespace\",service=~\"$service\"}[$__rate_interval])) by (namespace,service,instance)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}instance{{`}}`}} Invalid", + "refId": "B" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Alerts receive rate", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "ops", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "ops", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Alerts", + "titleSize": "h6", + "type": "row" + }, + { + "collapse": false, + "collapsed": false, + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "description": "rate of successful and invalid notifications sent by the Alertmanager", + "fill": 1, + "fillGradient": 0, + "gridPos": { + + }, + "id": 4, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": false, + "show": false, + "sideWidth": null, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": "integration", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum(rate(alertmanager_notifications_total{namespace=~\"$namespace\",service=~\"$service\", integration=\"$integration\"}[$__rate_interval])) by (integration,namespace,service,instance)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}instance{{`}}`}} Total", + "refId": "A" + }, + { + "expr": "sum(rate(alertmanager_notifications_failed_total{namespace=~\"$namespace\",service=~\"$service\", integration=\"$integration\"}[$__rate_interval])) by (integration,namespace,service,instance)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}instance{{`}}`}} Failed", + "refId": "B" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "$integration: Notifications Send Rate", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "ops", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "ops", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "description": "latency of notifications sent by the Alertmanager", + "fill": 1, + "fillGradient": 0, + "gridPos": { + + }, + "id": 5, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": false, + "show": false, + "sideWidth": null, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": "integration", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "histogram_quantile(0.99,\n sum(rate(alertmanager_notification_latency_seconds_bucket{namespace=~\"$namespace\",service=~\"$service\", integration=\"$integration\"}[$__rate_interval])) by (le,namespace,service,instance)\n) \n", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}instance{{`}}`}} 99th Percentile", + "refId": "A" + }, + { + "expr": "histogram_quantile(0.50,\n sum(rate(alertmanager_notification_latency_seconds_bucket{namespace=~\"$namespace\",service=~\"$service\", integration=\"$integration\"}[$__rate_interval])) by (le,namespace,service,instance)\n) \n", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}instance{{`}}`}} Median", + "refId": "B" + }, + { + "expr": "sum(rate(alertmanager_notification_latency_seconds_sum{namespace=~\"$namespace\",service=~\"$service\", integration=\"$integration\"}[$__rate_interval])) by (namespace,service,instance)\n/\nsum(rate(alertmanager_notification_latency_seconds_count{namespace=~\"$namespace\",service=~\"$service\", integration=\"$integration\"}[$__rate_interval])) by (namespace,service,instance)\n", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}instance{{`}}`}} Average", + "refId": "C" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "$integration: Notification Duration", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "s", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "s", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Notifications", + "titleSize": "h6", + "type": "row" + } + ], + "schemaVersion": 14, + "style": "dark", + "tags": [ + "alertmanager-mixin" + ], + "templating": { + "list": [ + { + "current": { + "text": "Prometheus", + "value": "Prometheus" + }, + "hide": 0, + "label": "Data Source", + "name": "datasource", + "options": [ + + ], + "query": "prometheus", + "refresh": 1, + "regex": "", + "type": "datasource" + }, + { + "allValue": null, + "current": { + "text": "", + "value": "" + }, + "datasource": "$datasource", + "hide": 0, + "includeAll": false, + "label": "namespace", + "multi": false, + "name": "namespace", + "options": [ + + ], + "query": "label_values(alertmanager_alerts, namespace)", + "refresh": 2, + "regex": "", + "sort": 1, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "current": { + "text": "", + "value": "" + }, + "datasource": "$datasource", + "hide": 0, + "includeAll": false, + "label": "service", + "multi": false, + "name": "service", + "options": [ + + ], + "query": "label_values(alertmanager_alerts, service)", + "refresh": 2, + "regex": "", + "sort": 1, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "current": { + "text": "all", + "value": "$__all" + }, + "datasource": "$datasource", + "hide": 2, + "includeAll": true, + "label": null, + "multi": false, + "name": "integration", + "options": [ + + ], + "query": "label_values(alertmanager_notifications_total{integration=~\".*\"}, integration)", + "refresh": 2, + "regex": "", + "sort": 1, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "query", + "useTags": false + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + "timezone": "{{ .Values.grafana.defaultDashboardsTimezone }}", + "title": "Alertmanager / Overview", + "uid": "alertmanager-overview", + "version": 0 + } +{{- end }} +{{- end }} diff --git a/charts/rancher-project-monitoring/0.2.0-rc1/templates/grafana/dashboards-1.14/cluster-total.yaml b/charts/rancher-project-monitoring/0.2.0-rc1/templates/grafana/dashboards-1.14/cluster-total.yaml new file mode 100644 index 00000000..70764069 --- /dev/null +++ b/charts/rancher-project-monitoring/0.2.0-rc1/templates/grafana/dashboards-1.14/cluster-total.yaml @@ -0,0 +1,1646 @@ +{{- /* +Generated from 'cluster-total' from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/grafana-dashboardDefinitions.yaml +Do not change in-place! In order to change this file first read following link: +https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack +*/ -}} +{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} +{{- if and (or .Values.grafana.enabled .Values.grafana.forceDeployDashboards) (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.grafana.defaultDashboardsEnabled }} +apiVersion: v1 +kind: ConfigMap +metadata: + namespace: {{ template "project-prometheus-stack.namespace" . }} + name: {{ printf "%s-%s" (include "project-prometheus-stack.fullname" $) "cluster-total" | trunc 63 | trimSuffix "-" }} + annotations: +{{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} + labels: + {{- if $.Values.grafana.sidecar.dashboards.label }} + {{ $.Values.grafana.sidecar.dashboards.label }}: {{ ternary $.Values.grafana.sidecar.dashboards.labelValue "1" (not (empty $.Values.grafana.sidecar.dashboards.labelValue)) | quote }} + {{- end }} + app: {{ template "project-prometheus-stack.name" $ }}-grafana +{{ include "project-prometheus-stack.labels" $ | indent 4 }} +data: + cluster-total.json: |- + { + "__inputs": [ + + ], + "__requires": [ + + ], + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": "-- Grafana --", + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "gnetId": null, + "graphTooltip": 0, + "hideControls": false, + "id": null, + "links": [ + + ], + "panels": [ + { + "collapse": false, + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 2, + "panels": [ + + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Current Bandwidth", + "titleSize": "h6", + "type": "row" + }, + { + "aliasColors": { + + }, + "bars": true, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 12, + "x": 0, + "y": 1 + }, + "id": 3, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "hideEmpty": true, + "hideZero": true, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "sideWidth": null, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": false, + "linewidth": 1, + "links": [ + + ], + "minSpan": 24, + "nullPointMode": "null", + "paceLength": 10, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 24, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sort_desc(sum(irate(container_network_receive_bytes_total{namespace=~\".+\"}[$interval:$resolution])) by (namespace))", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{`{{`}}namespace{{`}}`}}", + "refId": "A", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Current Rate of Bytes Received", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "series", + "name": null, + "show": false, + "values": [ + "current" + ] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + }, + { + "aliasColors": { + + }, + "bars": true, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 12, + "x": 12, + "y": 1 + }, + "id": 4, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "hideEmpty": true, + "hideZero": true, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "sideWidth": null, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": false, + "linewidth": 1, + "links": [ + + ], + "minSpan": 24, + "nullPointMode": "null", + "paceLength": 10, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 24, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sort_desc(sum(irate(container_network_transmit_bytes_total{namespace=~\".+\"}[$interval:$resolution])) by (namespace))", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{`{{`}}namespace{{`}}`}}", + "refId": "A", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Current Rate of Bytes Transmitted", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "series", + "name": null, + "show": false, + "values": [ + "current" + ] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + }, + { + "columns": [ + { + "text": "Time", + "value": "Time" + }, + { + "text": "Value #A", + "value": "Value #A" + }, + { + "text": "Value #B", + "value": "Value #B" + }, + { + "text": "Value #C", + "value": "Value #C" + }, + { + "text": "Value #D", + "value": "Value #D" + }, + { + "text": "Value #E", + "value": "Value #E" + }, + { + "text": "Value #F", + "value": "Value #F" + }, + { + "text": "Value #G", + "value": "Value #G" + }, + { + "text": "Value #H", + "value": "Value #H" + }, + { + "text": "namespace", + "value": "namespace" + } + ], + "datasource": "$datasource", + "fill": 1, + "fontSize": "90%", + "gridPos": { + "h": 9, + "w": 24, + "x": 0, + "y": 10 + }, + "id": 5, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "minSpan": 24, + "nullPointMode": "null as zero", + "renderer": "flot", + "scroll": true, + "showHeader": true, + "sort": { + "col": 0, + "desc": false + }, + "spaceLength": 10, + "span": 24, + "styles": [ + { + "alias": "Time", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Time", + "thresholds": [ + + ], + "type": "hidden", + "unit": "short" + }, + { + "alias": "Current Bandwidth Received", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #A", + "thresholds": [ + + ], + "type": "number", + "unit": "Bps" + }, + { + "alias": "Current Bandwidth Transmitted", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #B", + "thresholds": [ + + ], + "type": "number", + "unit": "Bps" + }, + { + "alias": "Average Bandwidth Received", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #C", + "thresholds": [ + + ], + "type": "number", + "unit": "Bps" + }, + { + "alias": "Average Bandwidth Transmitted", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #D", + "thresholds": [ + + ], + "type": "number", + "unit": "Bps" + }, + { + "alias": "Rate of Received Packets", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #E", + "thresholds": [ + + ], + "type": "number", + "unit": "pps" + }, + { + "alias": "Rate of Transmitted Packets", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #F", + "thresholds": [ + + ], + "type": "number", + "unit": "pps" + }, + { + "alias": "Rate of Received Packets Dropped", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #G", + "thresholds": [ + + ], + "type": "number", + "unit": "pps" + }, + { + "alias": "Rate of Transmitted Packets Dropped", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #H", + "thresholds": [ + + ], + "type": "number", + "unit": "pps" + }, + { + "alias": "Namespace", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": true, + "linkTooltip": "Drill down", + "linkUrl": "d/8b7a8b326d7a6f1f04244066368c67af/kubernetes-networking-namespace-pods?orgId=1&refresh=30s&var-namespace=$__cell", + "pattern": "namespace", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + } + ], + "targets": [ + { + "expr": "sort_desc(sum(irate(container_network_receive_bytes_total{namespace=~\".+\"}[$interval:$resolution])) by (namespace))", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "A", + "step": 10 + }, + { + "expr": "sort_desc(sum(irate(container_network_transmit_bytes_total{namespace=~\".+\"}[$interval:$resolution])) by (namespace))", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "B", + "step": 10 + }, + { + "expr": "sort_desc(avg(irate(container_network_receive_bytes_total{namespace=~\".+\"}[$interval:$resolution])) by (namespace))", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "C", + "step": 10 + }, + { + "expr": "sort_desc(avg(irate(container_network_transmit_bytes_total{namespace=~\".+\"}[$interval:$resolution])) by (namespace))", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "D", + "step": 10 + }, + { + "expr": "sort_desc(sum(irate(container_network_receive_packets_total{namespace=~\".+\"}[$interval:$resolution])) by (namespace))", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "E", + "step": 10 + }, + { + "expr": "sort_desc(sum(irate(container_network_transmit_packets_total{namespace=~\".+\"}[$interval:$resolution])) by (namespace))", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "F", + "step": 10 + }, + { + "expr": "sort_desc(sum(irate(container_network_receive_packets_dropped_total{namespace=~\".+\"}[$interval:$resolution])) by (namespace))", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "G", + "step": 10 + }, + { + "expr": "sort_desc(sum(irate(container_network_transmit_packets_dropped_total{namespace=~\".+\"}[$interval:$resolution])) by (namespace))", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "H", + "step": 10 + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Current Status", + "type": "table" + }, + { + "collapse": true, + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 10 + }, + "id": 6, + "panels": [ + { + "aliasColors": { + + }, + "bars": true, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 12, + "x": 0, + "y": 11 + }, + "id": 7, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "hideEmpty": true, + "hideZero": true, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "sideWidth": null, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": false, + "linewidth": 1, + "links": [ + + ], + "minSpan": 24, + "nullPointMode": "null", + "paceLength": 10, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 24, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sort_desc(avg(irate(container_network_receive_bytes_total{namespace=~\".+\"}[$interval:$resolution])) by (namespace))", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{`{{`}}namespace{{`}}`}}", + "refId": "A", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Average Rate of Bytes Received", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "series", + "name": null, + "show": false, + "values": [ + "current" + ] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + }, + { + "aliasColors": { + + }, + "bars": true, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 12, + "x": 12, + "y": 11 + }, + "id": 8, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "hideEmpty": true, + "hideZero": true, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "sideWidth": null, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": false, + "linewidth": 1, + "links": [ + + ], + "minSpan": 24, + "nullPointMode": "null", + "paceLength": 10, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 24, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sort_desc(avg(irate(container_network_transmit_bytes_total{namespace=~\".+\"}[$interval:$resolution])) by (namespace))", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{`{{`}}namespace{{`}}`}}", + "refId": "A", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Average Rate of Bytes Transmitted", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "series", + "name": null, + "show": false, + "values": [ + "current" + ] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Average Bandwidth", + "titleSize": "h6", + "type": "row" + }, + { + "collapse": false, + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 11 + }, + "id": 9, + "panels": [ + + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Bandwidth History", + "titleSize": "h6", + "type": "row" + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 24, + "x": 0, + "y": 12 + }, + "id": 10, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "hideEmpty": true, + "hideZero": true, + "max": true, + "min": true, + "rightSide": true, + "show": true, + "sideWidth": null, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [ + + ], + "minSpan": 24, + "nullPointMode": "connected", + "paceLength": 10, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 24, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sort_desc(sum(irate(container_network_receive_bytes_total{namespace=~\".+\"}[$interval:$resolution])) by (namespace))", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{`{{`}}namespace{{`}}`}}", + "refId": "A", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Receive Bandwidth", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 24, + "x": 0, + "y": 21 + }, + "id": 11, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "hideEmpty": true, + "hideZero": true, + "max": true, + "min": true, + "rightSide": true, + "show": true, + "sideWidth": null, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [ + + ], + "minSpan": 24, + "nullPointMode": "connected", + "paceLength": 10, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 24, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sort_desc(sum(irate(container_network_transmit_bytes_total{namespace=~\".+\"}[$interval:$resolution])) by (namespace))", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{`{{`}}namespace{{`}}`}}", + "refId": "A", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Transmit Bandwidth", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + }, + { + "collapse": true, + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 30 + }, + "id": 12, + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 24, + "x": 0, + "y": 31 + }, + "id": 13, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "hideEmpty": true, + "hideZero": true, + "max": true, + "min": true, + "rightSide": true, + "show": true, + "sideWidth": null, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [ + + ], + "minSpan": 24, + "nullPointMode": "connected", + "paceLength": 10, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 24, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sort_desc(sum(irate(container_network_receive_packets_total{namespace=~\".+\"}[$interval:$resolution])) by (namespace))", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{`{{`}}namespace{{`}}`}}", + "refId": "A", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Rate of Received Packets", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "pps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "pps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 24, + "x": 0, + "y": 40 + }, + "id": 14, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "hideEmpty": true, + "hideZero": true, + "max": true, + "min": true, + "rightSide": true, + "show": true, + "sideWidth": null, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [ + + ], + "minSpan": 24, + "nullPointMode": "connected", + "paceLength": 10, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 24, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sort_desc(sum(irate(container_network_transmit_packets_total{namespace=~\".+\"}[$interval:$resolution])) by (namespace))", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{`{{`}}namespace{{`}}`}}", + "refId": "A", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Rate of Transmitted Packets", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "pps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "pps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Packets", + "titleSize": "h6", + "type": "row" + }, + { + "collapse": true, + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 31 + }, + "id": 15, + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 24, + "x": 0, + "y": 50 + }, + "id": 16, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "hideEmpty": true, + "hideZero": true, + "max": true, + "min": true, + "rightSide": true, + "show": true, + "sideWidth": null, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [ + + ], + "minSpan": 24, + "nullPointMode": "connected", + "paceLength": 10, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 24, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sort_desc(sum(irate(container_network_receive_packets_dropped_total{namespace=~\".+\"}[$interval:$resolution])) by (namespace))", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{`{{`}}namespace{{`}}`}}", + "refId": "A", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Rate of Received Packets Dropped", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "pps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "pps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 24, + "x": 0, + "y": 59 + }, + "id": 17, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "hideEmpty": true, + "hideZero": true, + "max": true, + "min": true, + "rightSide": true, + "show": true, + "sideWidth": null, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [ + + ], + "minSpan": 24, + "nullPointMode": "connected", + "paceLength": 10, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 24, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sort_desc(sum(irate(container_network_transmit_packets_dropped_total{namespace=~\".+\"}[$interval:$resolution])) by (namespace))", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{`{{`}}namespace{{`}}`}}", + "refId": "A", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Rate of Transmitted Packets Dropped", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "pps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "pps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Errors", + "titleSize": "h6", + "type": "row" + } + ], + "refresh": "10s", + "rows": [ + + ], + "schemaVersion": 18, + "style": "dark", + "tags": [ + "kubernetes-mixin" + ], + "templating": { + "list": [ + { + "allValue": null, + "auto": false, + "auto_count": 30, + "auto_min": "10s", + "current": { + "text": "5m", + "value": "5m" + }, + "datasource": "$datasource", + "hide": 0, + "includeAll": false, + "label": null, + "multi": false, + "name": "resolution", + "options": [ + { + "selected": false, + "text": "30s", + "value": "30s" + }, + { + "selected": true, + "text": "5m", + "value": "5m" + }, + { + "selected": false, + "text": "1h", + "value": "1h" + } + ], + "query": "30s,5m,1h", + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "interval", + "useTags": false + }, + { + "allValue": null, + "auto": false, + "auto_count": 30, + "auto_min": "10s", + "current": { + "text": "5m", + "value": "5m" + }, + "datasource": "$datasource", + "hide": 2, + "includeAll": false, + "label": null, + "multi": false, + "name": "interval", + "options": [ + { + "selected": true, + "text": "4h", + "value": "4h" + } + ], + "query": "4h", + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "interval", + "useTags": false + }, + { + "current": { + "text": "Prometheus", + "value": "Prometheus" + }, + "hide": 0, + "label": "Data Source", + "name": "datasource", + "options": [ + + ], + "query": "prometheus", + "refresh": 1, + "regex": "", + "type": "datasource" + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + "timezone": "{{ .Values.grafana.defaultDashboardsTimezone }}", + "title": "Kubernetes / Networking / Project", + "uid": "ff635a025bcfea7bc3dd4f508990a3e9", + "version": 0 + } +{{- end }} \ No newline at end of file diff --git a/charts/rancher-project-monitoring/0.2.0-rc1/templates/grafana/dashboards-1.14/grafana-overview.yaml b/charts/rancher-project-monitoring/0.2.0-rc1/templates/grafana/dashboards-1.14/grafana-overview.yaml new file mode 100644 index 00000000..ef663df7 --- /dev/null +++ b/charts/rancher-project-monitoring/0.2.0-rc1/templates/grafana/dashboards-1.14/grafana-overview.yaml @@ -0,0 +1,635 @@ +{{- /* +Generated from 'grafana-overview' from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/grafana-dashboardDefinitions.yaml +Do not change in-place! In order to change this file first read following link: +https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack +*/ -}} +{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} +{{- if and (or .Values.grafana.enabled .Values.grafana.forceDeployDashboards) (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.grafana.defaultDashboardsEnabled }} +apiVersion: v1 +kind: ConfigMap +metadata: + namespace: {{ template "project-prometheus-stack-grafana.namespace" . }} + name: {{ printf "%s-%s" (include "project-prometheus-stack.fullname" $) "grafana-overview" | trunc 63 | trimSuffix "-" }} + annotations: +{{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} + labels: + {{- if $.Values.grafana.sidecar.dashboards.label }} + {{ $.Values.grafana.sidecar.dashboards.label }}: {{ ternary $.Values.grafana.sidecar.dashboards.labelValue "1" (not (empty $.Values.grafana.sidecar.dashboards.labelValue)) | quote }} + {{- end }} + app: {{ template "project-prometheus-stack.name" $ }}-grafana +{{ include "project-prometheus-stack.labels" $ | indent 4 }} +data: + grafana-overview.json: |- + { + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": "-- Grafana --", + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "target": { + "limit": 100, + "matchAny": false, + "tags": [ + + ], + "type": "dashboard" + }, + "type": "dashboard" + } + ] + }, + "editable": true, + "gnetId": null, + "graphTooltip": 0, + "id": 3085, + "iteration": 1631554945276, + "links": [ + + ], + "panels": [ + { + "datasource": "$datasource", + "fieldConfig": { + "defaults": { + "mappings": [ + + ], + "noValue": "0", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + + ] + }, + "gridPos": { + "h": 5, + "w": 6, + "x": 0, + "y": 0 + }, + "id": 6, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "text": { + + }, + "textMode": "auto" + }, + "pluginVersion": "8.1.3", + "targets": [ + { + "expr": "grafana_alerting_result_total{job=~\"$job\", instance=~\"$instance\", state=\"alerting\"}", + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Firing Alerts", + "type": "stat" + }, + { + "datasource": "$datasource", + "fieldConfig": { + "defaults": { + "mappings": [ + + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + + ] + }, + "gridPos": { + "h": 5, + "w": 6, + "x": 6, + "y": 0 + }, + "id": 8, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "text": { + + }, + "textMode": "auto" + }, + "pluginVersion": "8.1.3", + "targets": [ + { + "expr": "sum(grafana_stat_totals_dashboard{job=~\"$job\", instance=~\"$instance\"})", + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Dashboards", + "type": "stat" + }, + { + "datasource": "$datasource", + "fieldConfig": { + "defaults": { + "custom": { + "align": null, + "displayMode": "auto" + }, + "mappings": [ + + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + + ] + }, + "gridPos": { + "h": 5, + "w": 12, + "x": 12, + "y": 0 + }, + "id": 10, + "options": { + "showHeader": true + }, + "pluginVersion": "8.1.3", + "targets": [ + { + "expr": "grafana_build_info{job=~\"$job\", instance=~\"$instance\"}", + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Build Info", + "transformations": [ + { + "id": "labelsToFields", + "options": { + + } + }, + { + "id": "organize", + "options": { + "excludeByName": { + "Time": true, + "Value": true, + "branch": true, + "container": true, + "goversion": true, + "namespace": true, + "pod": true, + "revision": true + }, + "indexByName": { + "Time": 7, + "Value": 11, + "branch": 4, + "container": 8, + "edition": 2, + "goversion": 6, + "instance": 1, + "job": 0, + "namespace": 9, + "pod": 10, + "revision": 5, + "version": 3 + }, + "renameByName": { + + } + } + } + ], + "type": "table" + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fieldConfig": { + "defaults": { + "links": [ + + ] + }, + "overrides": [ + + ] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 5 + }, + "hiddenSeries": false, + "id": 2, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.1.3", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum by (status_code) (irate(grafana_http_request_duration_seconds_count{job=~\"$job\", instance=~\"$instance\"}[1m])) ", + "interval": "", + "legendFormat": "{{`{{`}}status_code{{`}}`}}", + "refId": "A" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeRegions": [ + + ], + "timeShift": null, + "title": "RPS", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "$$hashKey": "object:157", + "format": "reqps", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "$$hashKey": "object:158", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fieldConfig": { + "defaults": { + "links": [ + + ] + }, + "overrides": [ + + ] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 5 + }, + "hiddenSeries": false, + "id": 4, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.1.3", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "exemplar": true, + "expr": "histogram_quantile(0.99, sum(irate(grafana_http_request_duration_seconds_bucket{instance=~\"$instance\", job=~\"$job\"}[$__rate_interval])) by (le)) * 1", + "interval": "", + "legendFormat": "99th Percentile", + "refId": "A" + }, + { + "exemplar": true, + "expr": "histogram_quantile(0.50, sum(irate(grafana_http_request_duration_seconds_bucket{instance=~\"$instance\", job=~\"$job\"}[$__rate_interval])) by (le)) * 1", + "interval": "", + "legendFormat": "50th Percentile", + "refId": "B" + }, + { + "exemplar": true, + "expr": "sum(irate(grafana_http_request_duration_seconds_sum{instance=~\"$instance\", job=~\"$job\"}[$__rate_interval])) * 1 / sum(irate(grafana_http_request_duration_seconds_count{instance=~\"$instance\", job=~\"$job\"}[$__rate_interval]))", + "interval": "", + "legendFormat": "Average", + "refId": "C" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeRegions": [ + + ], + "timeShift": null, + "title": "Request Latency", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "$$hashKey": "object:210", + "format": "ms", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "$$hashKey": "object:211", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + } + ], + "schemaVersion": 30, + "style": "dark", + "tags": [ + + ], + "templating": { + "list": [ + { + "current": { + "text": "Prometheus", + "value": "Prometheus" + }, + "description": null, + "error": null, + "hide": 0, + "includeAll": false, + "label": "Data Source", + "multi": false, + "name": "datasource", + "options": [ + + ], + "query": "prometheus", + "queryValue": "", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "type": "datasource" + }, + { + "allValue": ".*", + "current": { + "selected": false, + "text": [ + "default/grafana" + ], + "value": [ + "default/grafana" + ] + }, + "datasource": "$datasource", + "definition": "label_values(grafana_build_info, job)", + "description": null, + "error": null, + "hide": 0, + "includeAll": true, + "label": null, + "multi": true, + "name": "job", + "options": [ + + ], + "query": { + "query": "label_values(grafana_build_info, job)", + "refId": "Billing Admin-job-Variable-Query" + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": ".*", + "current": { + "selected": false, + "text": "All", + "value": "$__all" + }, + "datasource": "$datasource", + "definition": "label_values(grafana_build_info, instance)", + "description": null, + "error": null, + "hide": 0, + "includeAll": true, + "label": null, + "multi": true, + "name": "instance", + "options": [ + + ], + "query": { + "query": "label_values(grafana_build_info, instance)", + "refId": "Billing Admin-instance-Variable-Query" + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + } + ] + }, + "time": { + "from": "now-6h", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ] + }, + "timezone": "{{ .Values.grafana.defaultDashboardsTimezone }}", + "title": "Grafana Overview", + "uid": "6be0s85Mk", + "version": 2 + } +{{- end }} \ No newline at end of file diff --git a/charts/rancher-project-monitoring/0.2.0-rc1/templates/grafana/dashboards-1.14/k8s-resources-namespace.yaml b/charts/rancher-project-monitoring/0.2.0-rc1/templates/grafana/dashboards-1.14/k8s-resources-namespace.yaml new file mode 100644 index 00000000..c87b4188 --- /dev/null +++ b/charts/rancher-project-monitoring/0.2.0-rc1/templates/grafana/dashboards-1.14/k8s-resources-namespace.yaml @@ -0,0 +1,2770 @@ +{{- /* +Generated from 'k8s-resources-namespace' from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/grafana-dashboardDefinitions.yaml +Do not change in-place! In order to change this file first read following link: +https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack +*/ -}} +{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} +{{- if and (or .Values.grafana.enabled .Values.grafana.forceDeployDashboards) (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.grafana.defaultDashboardsEnabled }} +apiVersion: v1 +kind: ConfigMap +metadata: + namespace: {{ template "project-prometheus-stack.namespace" . }} + name: {{ printf "%s-%s" (include "project-prometheus-stack.fullname" $) "k8s-resources-namespace" | trunc 63 | trimSuffix "-" }} + annotations: +{{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} + labels: + {{- if $.Values.grafana.sidecar.dashboards.label }} + {{ $.Values.grafana.sidecar.dashboards.label }}: {{ ternary $.Values.grafana.sidecar.dashboards.labelValue "1" (not (empty $.Values.grafana.sidecar.dashboards.labelValue)) | quote }} + {{- end }} + app: {{ template "project-prometheus-stack.name" $ }}-grafana +{{ include "project-prometheus-stack.labels" $ | indent 4 }} +data: + k8s-resources-namespace.json: |- + { + "annotations": { + "list": [ + + ] + }, + "editable": true, + "gnetId": null, + "graphTooltip": 0, + "hideControls": false, + "links": [ + + ], + "refresh": "10s", + "rows": [ + { + "collapse": false, + "height": "100px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "format": "percentunit", + "id": 1, + "interval": "1m", + "legend": { + "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 3, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate{namespace=\"$namespace\"}) / sum(kube_pod_container_resource_requests{namespace=\"$namespace\", resource=\"cpu\"})", + "format": "time_series", + "instant": true, + "intervalFactor": 2, + "refId": "A" + } + ], + "thresholds": "70,80", + "timeFrom": null, + "timeShift": null, + "title": "CPU Utilisation (from requests)", + "tooltip": { + "shared": false, + "sort": 2, + "value_type": "individual" + }, + "type": "singlestat", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "format": "percentunit", + "id": 2, + "interval": "1m", + "legend": { + "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 3, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate{namespace=\"$namespace\"}) / sum(kube_pod_container_resource_limits{namespace=\"$namespace\", resource=\"cpu\"})", + "format": "time_series", + "instant": true, + "intervalFactor": 2, + "refId": "A" + } + ], + "thresholds": "70,80", + "timeFrom": null, + "timeShift": null, + "title": "CPU Utilisation (from limits)", + "tooltip": { + "shared": false, + "sort": 2, + "value_type": "individual" + }, + "type": "singlestat", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "format": "percentunit", + "id": 3, + "interval": "1m", + "legend": { + "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 3, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sum(container_memory_working_set_bytes{namespace=\"$namespace\",container!=\"\", image!=\"\"}) / sum(kube_pod_container_resource_requests{namespace=\"$namespace\", resource=\"memory\"})", + "format": "time_series", + "instant": true, + "intervalFactor": 2, + "refId": "A" + } + ], + "thresholds": "70,80", + "timeFrom": null, + "timeShift": null, + "title": "Memory Utilisation (from requests)", + "tooltip": { + "shared": false, + "sort": 2, + "value_type": "individual" + }, + "type": "singlestat", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "format": "percentunit", + "id": 4, + "interval": "1m", + "legend": { + "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 3, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sum(container_memory_working_set_bytes{namespace=\"$namespace\",container!=\"\", image!=\"\"}) / sum(kube_pod_container_resource_limits{namespace=\"$namespace\", resource=\"memory\"})", + "format": "time_series", + "instant": true, + "intervalFactor": 2, + "refId": "A" + } + ], + "thresholds": "70,80", + "timeFrom": null, + "timeShift": null, + "title": "Memory Utilisation (from limits)", + "tooltip": { + "shared": false, + "sort": 2, + "value_type": "individual" + }, + "type": "singlestat", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": false, + "title": "Headlines", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 5, + "interval": "1m", + "legend": { + "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "alias": "quota - requests", + "color": "#F2495C", + "dashes": true, + "fill": 0, + "hiddenSeries": true, + "hideTooltip": true, + "legend": true, + "linewidth": 2, + "stack": false + }, + { + "alias": "quota - limits", + "color": "#FF9830", + "dashes": true, + "fill": 0, + "hiddenSeries": true, + "hideTooltip": true, + "legend": true, + "linewidth": 2, + "stack": false + } + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate{namespace=\"$namespace\"}) by (pod)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}pod{{`}}`}}", + "legendLink": null, + "step": 10 + }, + { + "expr": "scalar(kube_resourcequota{namespace=\"$namespace\", type=\"hard\",resource=\"requests.cpu\"})", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "quota - requests", + "legendLink": null, + "step": 10 + }, + { + "expr": "scalar(kube_resourcequota{namespace=\"$namespace\", type=\"hard\",resource=\"limits.cpu\"})", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "quota - limits", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "CPU Usage", + "tooltip": { + "shared": false, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "CPU Usage", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "id": 6, + "interval": "1m", + "legend": { + "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": false, + "steppedLine": false, + "styles": [ + { + "alias": "Time", + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "pattern": "Time", + "type": "hidden" + }, + { + "alias": "CPU Usage", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #A", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "CPU Requests", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #B", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "CPU Requests %", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #C", + "thresholds": [ + + ], + "type": "number", + "unit": "percentunit" + }, + { + "alias": "CPU Limits", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #D", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "CPU Limits %", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #E", + "thresholds": [ + + ], + "type": "number", + "unit": "percentunit" + }, + { + "alias": "Pod", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": true, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "d/6581e46e4e5c7ba40a07646395ef7b23/k8s-resources-pod?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$namespace&var-pod=$__cell", + "pattern": "pod", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "pattern": "/.*/", + "thresholds": [ + + ], + "type": "string", + "unit": "short" + } + ], + "targets": [ + { + "expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate{namespace=\"$namespace\"}) by (pod)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "A", + "step": 10 + }, + { + "expr": "sum(cluster:namespace:pod_cpu:active:kube_pod_container_resource_requests{namespace=\"$namespace\"}) by (pod)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "B", + "step": 10 + }, + { + "expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate{namespace=\"$namespace\"}) by (pod) / sum(cluster:namespace:pod_cpu:active:kube_pod_container_resource_requests{namespace=\"$namespace\"}) by (pod)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "C", + "step": 10 + }, + { + "expr": "sum(cluster:namespace:pod_cpu:active:kube_pod_container_resource_limits{namespace=\"$namespace\"}) by (pod)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "D", + "step": 10 + }, + { + "expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate{namespace=\"$namespace\"}) by (pod) / sum(cluster:namespace:pod_cpu:active:kube_pod_container_resource_limits{namespace=\"$namespace\"}) by (pod)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "E", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "CPU Quota", + "tooltip": { + "shared": false, + "sort": 2, + "value_type": "individual" + }, + "transform": "table", + "type": "table", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "CPU Quota", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 7, + "interval": "1m", + "legend": { + "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "alias": "quota - requests", + "color": "#F2495C", + "dashes": true, + "fill": 0, + "hiddenSeries": true, + "hideTooltip": true, + "legend": true, + "linewidth": 2, + "stack": false + }, + { + "alias": "quota - limits", + "color": "#FF9830", + "dashes": true, + "fill": 0, + "hiddenSeries": true, + "hideTooltip": true, + "legend": true, + "linewidth": 2, + "stack": false + } + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum(container_memory_working_set_bytes{namespace=\"$namespace\", container!=\"\", image!=\"\"}) by (pod)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}pod{{`}}`}}", + "legendLink": null, + "step": 10 + }, + { + "expr": "scalar(kube_resourcequota{namespace=\"$namespace\", type=\"hard\",resource=\"requests.memory\"})", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "quota - requests", + "legendLink": null, + "step": 10 + }, + { + "expr": "scalar(kube_resourcequota{namespace=\"$namespace\", type=\"hard\",resource=\"limits.memory\"})", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "quota - limits", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Memory Usage (w/o cache)", + "tooltip": { + "shared": false, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "bytes", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Memory Usage", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "id": 8, + "interval": "1m", + "legend": { + "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": false, + "steppedLine": false, + "styles": [ + { + "alias": "Time", + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "pattern": "Time", + "type": "hidden" + }, + { + "alias": "Memory Usage", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #A", + "thresholds": [ + + ], + "type": "number", + "unit": "bytes" + }, + { + "alias": "Memory Requests", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #B", + "thresholds": [ + + ], + "type": "number", + "unit": "bytes" + }, + { + "alias": "Memory Requests %", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #C", + "thresholds": [ + + ], + "type": "number", + "unit": "percentunit" + }, + { + "alias": "Memory Limits", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #D", + "thresholds": [ + + ], + "type": "number", + "unit": "bytes" + }, + { + "alias": "Memory Limits %", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #E", + "thresholds": [ + + ], + "type": "number", + "unit": "percentunit" + }, + { + "alias": "Memory Usage (RSS)", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #F", + "thresholds": [ + + ], + "type": "number", + "unit": "bytes" + }, + { + "alias": "Memory Usage (Cache)", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #G", + "thresholds": [ + + ], + "type": "number", + "unit": "bytes" + }, + { + "alias": "Memory Usage (Swap)", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #H", + "thresholds": [ + + ], + "type": "number", + "unit": "bytes" + }, + { + "alias": "Pod", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": true, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "d/6581e46e4e5c7ba40a07646395ef7b23/k8s-resources-pod?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$namespace&var-pod=$__cell", + "pattern": "pod", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "pattern": "/.*/", + "thresholds": [ + + ], + "type": "string", + "unit": "short" + } + ], + "targets": [ + { + "expr": "sum(container_memory_working_set_bytes{namespace=\"$namespace\",container!=\"\", image!=\"\"}) by (pod)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "A", + "step": 10 + }, + { + "expr": "sum(cluster:namespace:pod_memory:active:kube_pod_container_resource_requests{namespace=\"$namespace\"}) by (pod)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "B", + "step": 10 + }, + { + "expr": "sum(container_memory_working_set_bytes{namespace=\"$namespace\",container!=\"\", image!=\"\"}) by (pod) / sum(cluster:namespace:pod_memory:active:kube_pod_container_resource_requests{namespace=\"$namespace\"}) by (pod)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "C", + "step": 10 + }, + { + "expr": "sum(cluster:namespace:pod_memory:active:kube_pod_container_resource_limits{namespace=\"$namespace\"}) by (pod)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "D", + "step": 10 + }, + { + "expr": "sum(container_memory_working_set_bytes{namespace=\"$namespace\",container!=\"\", image!=\"\"}) by (pod) / sum(cluster:namespace:pod_memory:active:kube_pod_container_resource_limits{namespace=\"$namespace\"}) by (pod)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "E", + "step": 10 + }, + { + "expr": "sum(container_memory_rss{namespace=\"$namespace\",container!=\"\"}) by (pod)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "F", + "step": 10 + }, + { + "expr": "sum(container_memory_cache{namespace=\"$namespace\",container!=\"\"}) by (pod)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "G", + "step": 10 + }, + { + "expr": "sum(container_memory_swap{namespace=\"$namespace\",container!=\"\"}) by (pod)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "H", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Memory Quota", + "tooltip": { + "shared": false, + "sort": 2, + "value_type": "individual" + }, + "transform": "table", + "type": "table", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Memory Quota", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "id": 9, + "interval": "1m", + "legend": { + "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": false, + "steppedLine": false, + "styles": [ + { + "alias": "Time", + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "pattern": "Time", + "type": "hidden" + }, + { + "alias": "Current Receive Bandwidth", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #A", + "thresholds": [ + + ], + "type": "number", + "unit": "Bps" + }, + { + "alias": "Current Transmit Bandwidth", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #B", + "thresholds": [ + + ], + "type": "number", + "unit": "Bps" + }, + { + "alias": "Rate of Received Packets", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #C", + "thresholds": [ + + ], + "type": "number", + "unit": "pps" + }, + { + "alias": "Rate of Transmitted Packets", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #D", + "thresholds": [ + + ], + "type": "number", + "unit": "pps" + }, + { + "alias": "Rate of Received Packets Dropped", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #E", + "thresholds": [ + + ], + "type": "number", + "unit": "pps" + }, + { + "alias": "Rate of Transmitted Packets Dropped", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #F", + "thresholds": [ + + ], + "type": "number", + "unit": "pps" + }, + { + "alias": "Pod", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": true, + "linkTargetBlank": false, + "linkTooltip": "Drill down to pods", + "linkUrl": "d/6581e46e4e5c7ba40a07646395ef7b23/k8s-resources-pod?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$namespace&var-pod=$__cell", + "pattern": "pod", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "pattern": "/.*/", + "thresholds": [ + + ], + "type": "string", + "unit": "short" + } + ], + "targets": [ + { + "expr": "sum(irate(container_network_receive_bytes_total{namespace=\"$namespace\"}[$__rate_interval])) by (pod)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "A", + "step": 10 + }, + { + "expr": "sum(irate(container_network_transmit_bytes_total{namespace=\"$namespace\"}[$__rate_interval])) by (pod)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "B", + "step": 10 + }, + { + "expr": "sum(irate(container_network_receive_packets_total{namespace=\"$namespace\"}[$__rate_interval])) by (pod)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "C", + "step": 10 + }, + { + "expr": "sum(irate(container_network_transmit_packets_total{namespace=\"$namespace\"}[$__rate_interval])) by (pod)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "D", + "step": 10 + }, + { + "expr": "sum(irate(container_network_receive_packets_dropped_total{namespace=\"$namespace\"}[$__rate_interval])) by (pod)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "E", + "step": 10 + }, + { + "expr": "sum(irate(container_network_transmit_packets_dropped_total{namespace=\"$namespace\"}[$__rate_interval])) by (pod)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "F", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Current Network Usage", + "tooltip": { + "shared": false, + "sort": 2, + "value_type": "individual" + }, + "transform": "table", + "type": "table", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Current Network Usage", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 10, + "interval": "1m", + "legend": { + "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum(irate(container_network_receive_bytes_total{namespace=\"$namespace\"}[$__rate_interval])) by (pod)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}pod{{`}}`}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Receive Bandwidth", + "tooltip": { + "shared": false, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 11, + "interval": "1m", + "legend": { + "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum(irate(container_network_transmit_bytes_total{namespace=\"$namespace\"}[$__rate_interval])) by (pod)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}pod{{`}}`}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Transmit Bandwidth", + "tooltip": { + "shared": false, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Bandwidth", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 12, + "interval": "1m", + "legend": { + "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum(irate(container_network_receive_packets_total{namespace=\"$namespace\"}[$__rate_interval])) by (pod)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}pod{{`}}`}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Rate of Received Packets", + "tooltip": { + "shared": false, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "pps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 13, + "interval": "1m", + "legend": { + "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum(irate(container_network_transmit_packets_total{namespace=\"$namespace\"}[$__rate_interval])) by (pod)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}pod{{`}}`}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Rate of Transmitted Packets", + "tooltip": { + "shared": false, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "pps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Rate of Packets", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 14, + "interval": "1m", + "legend": { + "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum(irate(container_network_receive_packets_dropped_total{namespace=\"$namespace\"}[$__rate_interval])) by (pod)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}pod{{`}}`}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Rate of Received Packets Dropped", + "tooltip": { + "shared": false, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "pps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 15, + "interval": "1m", + "legend": { + "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum(irate(container_network_transmit_packets_dropped_total{namespace=\"$namespace\"}[$__rate_interval])) by (pod)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}pod{{`}}`}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Rate of Transmitted Packets Dropped", + "tooltip": { + "shared": false, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "pps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Rate of Packets Dropped", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "decimals": -1, + "fill": 10, + "id": 16, + "interval": "1m", + "legend": { + "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "ceil(sum by(pod) (rate(container_fs_reads_total{container!=\"\", device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", namespace=\"$namespace\"}[$__rate_interval]) + rate(container_fs_writes_total{container!=\"\", device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", namespace=\"$namespace\"}[$__rate_interval])))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}pod{{`}}`}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "IOPS(Reads+Writes)", + "tooltip": { + "shared": false, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 17, + "interval": "1m", + "legend": { + "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum by(pod) (rate(container_fs_reads_bytes_total{container!=\"\", device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", namespace=\"$namespace\"}[$__rate_interval]) + rate(container_fs_writes_bytes_total{container!=\"\", device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", namespace=\"$namespace\"}[$__rate_interval]))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}pod{{`}}`}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "ThroughPut(Read+Write)", + "tooltip": { + "shared": false, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Storage IO", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "id": 18, + "interval": "1m", + "legend": { + "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "sort": { + "col": 4, + "desc": true + }, + "spaceLength": 10, + "span": 12, + "stack": false, + "steppedLine": false, + "styles": [ + { + "alias": "Time", + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "pattern": "Time", + "type": "hidden" + }, + { + "alias": "IOPS(Reads)", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": -1, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #A", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "IOPS(Writes)", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": -1, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #B", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "IOPS(Reads + Writes)", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": -1, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #C", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "Throughput(Read)", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #D", + "thresholds": [ + + ], + "type": "number", + "unit": "Bps" + }, + { + "alias": "Throughput(Write)", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #E", + "thresholds": [ + + ], + "type": "number", + "unit": "Bps" + }, + { + "alias": "Throughput(Read + Write)", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #F", + "thresholds": [ + + ], + "type": "number", + "unit": "Bps" + }, + { + "alias": "Pod", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": true, + "linkTargetBlank": false, + "linkTooltip": "Drill down to pods", + "linkUrl": "d/6581e46e4e5c7ba40a07646395ef7b23/k8s-resources-pod?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$namespace&var-pod=$__cell", + "pattern": "pod", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "pattern": "/.*/", + "thresholds": [ + + ], + "type": "string", + "unit": "short" + } + ], + "targets": [ + { + "expr": "sum by(pod) (rate(container_fs_reads_total{device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", container!=\"\",namespace=\"$namespace\"}[$__rate_interval]))", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "A", + "step": 10 + }, + { + "expr": "sum by(pod) (rate(container_fs_writes_total{device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", container!=\"\",namespace=\"$namespace\"}[$__rate_interval]))", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "B", + "step": 10 + }, + { + "expr": "sum by(pod) (rate(container_fs_reads_total{device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", container!=\"\",namespace=\"$namespace\"}[$__rate_interval]) + rate(container_fs_writes_total{device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", container!=\"\",namespace=\"$namespace\"}[$__rate_interval]))", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "C", + "step": 10 + }, + { + "expr": "sum by(pod) (rate(container_fs_reads_bytes_total{device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", container!=\"\",namespace=\"$namespace\"}[$__rate_interval]))", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "D", + "step": 10 + }, + { + "expr": "sum by(pod) (rate(container_fs_writes_bytes_total{device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", container!=\"\",namespace=\"$namespace\"}[$__rate_interval]))", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "E", + "step": 10 + }, + { + "expr": "sum by(pod) (rate(container_fs_reads_bytes_total{device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", container!=\"\",namespace=\"$namespace\"}[$__rate_interval]) + rate(container_fs_writes_bytes_total{device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", container!=\"\",namespace=\"$namespace\"}[$__rate_interval]))", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "F", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Current Storage IO", + "tooltip": { + "shared": false, + "sort": 2, + "value_type": "individual" + }, + "transform": "table", + "type": "table", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Storage IO - Distribution", + "titleSize": "h6" + } + ], + "schemaVersion": 14, + "style": "dark", + "tags": [ + "kubernetes-mixin" + ], + "templating": { + "list": [ + { + "current": { + "text": "Prometheus", + "value": "Prometheus" + }, + "hide": 0, + "label": "Data Source", + "name": "datasource", + "options": [ + + ], + "query": "prometheus", + "refresh": 1, + "regex": "", + "type": "datasource" + }, + { + "allValue": null, + "current": { + "text": "", + "value": "" + }, + "datasource": "$datasource", + "hide": 0, + "includeAll": false, + "label": null, + "multi": false, + "name": "namespace", + "options": [ + + ], + "query": "label_values(kube_pod_info, namespace)", + "refresh": 2, + "regex": "", + "sort": 1, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "query", + "useTags": false + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + "timezone": "{{ .Values.grafana.defaultDashboardsTimezone }}", + "title": "Kubernetes / Compute Resources / Namespace (Pods)", + "uid": "85a562078cdf77779eaa1add43ccec1e", + "version": 0 + } +{{- end }} \ No newline at end of file diff --git a/charts/rancher-project-monitoring/0.2.0-rc1/templates/grafana/dashboards-1.14/k8s-resources-node.yaml b/charts/rancher-project-monitoring/0.2.0-rc1/templates/grafana/dashboards-1.14/k8s-resources-node.yaml new file mode 100644 index 00000000..e2e8d2aa --- /dev/null +++ b/charts/rancher-project-monitoring/0.2.0-rc1/templates/grafana/dashboards-1.14/k8s-resources-node.yaml @@ -0,0 +1,963 @@ +{{- /* +Generated from 'k8s-resources-node' from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/grafana-dashboardDefinitions.yaml +Do not change in-place! In order to change this file first read following link: +https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack +*/ -}} +{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} +{{- if and (or .Values.grafana.enabled .Values.grafana.forceDeployDashboards) (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.grafana.defaultDashboardsEnabled }} +apiVersion: v1 +kind: ConfigMap +metadata: + namespace: {{ template "project-prometheus-stack.namespace" . }} + name: {{ printf "%s-%s" (include "project-prometheus-stack.fullname" $) "k8s-resources-node" | trunc 63 | trimSuffix "-" }} + annotations: +{{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} + labels: + {{- if $.Values.grafana.sidecar.dashboards.label }} + {{ $.Values.grafana.sidecar.dashboards.label }}: {{ ternary $.Values.grafana.sidecar.dashboards.labelValue "1" (not (empty $.Values.grafana.sidecar.dashboards.labelValue)) | quote }} + {{- end }} + app: {{ template "project-prometheus-stack.name" $ }}-grafana +{{ include "project-prometheus-stack.labels" $ | indent 4 }} +data: + k8s-resources-node.json: |- + { + "annotations": { + "list": [ + + ] + }, + "editable": true, + "gnetId": null, + "graphTooltip": 0, + "hideControls": false, + "links": [ + + ], + "refresh": "10s", + "rows": [ + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 1, + "interval": "1m", + "legend": { + "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate{node=~\"$node\"}) by (pod)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}pod{{`}}`}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "CPU Usage", + "tooltip": { + "shared": false, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "CPU Usage", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "id": 2, + "interval": "1m", + "legend": { + "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": false, + "steppedLine": false, + "styles": [ + { + "alias": "Time", + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "pattern": "Time", + "type": "hidden" + }, + { + "alias": "CPU Usage", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #A", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "CPU Requests", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #B", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "CPU Requests %", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #C", + "thresholds": [ + + ], + "type": "number", + "unit": "percentunit" + }, + { + "alias": "CPU Limits", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #D", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "CPU Limits %", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #E", + "thresholds": [ + + ], + "type": "number", + "unit": "percentunit" + }, + { + "alias": "Pod", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "pod", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "pattern": "/.*/", + "thresholds": [ + + ], + "type": "string", + "unit": "short" + } + ], + "targets": [ + { + "expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate{node=~\"$node\"}) by (pod)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "A", + "step": 10 + }, + { + "expr": "sum(cluster:namespace:pod_cpu:active:kube_pod_container_resource_requests{node=~\"$node\"}) by (pod)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "B", + "step": 10 + }, + { + "expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate{node=~\"$node\"}) by (pod) / sum(cluster:namespace:pod_cpu:active:kube_pod_container_resource_requests{node=~\"$node\"}) by (pod)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "C", + "step": 10 + }, + { + "expr": "sum(cluster:namespace:pod_cpu:active:kube_pod_container_resource_limits{node=~\"$node\"}) by (pod)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "D", + "step": 10 + }, + { + "expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate{node=~\"$node\"}) by (pod) / sum(cluster:namespace:pod_cpu:active:kube_pod_container_resource_limits{node=~\"$node\"}) by (pod)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "E", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "CPU Quota", + "tooltip": { + "shared": false, + "sort": 2, + "value_type": "individual" + }, + "transform": "table", + "type": "table", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "CPU Quota", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 3, + "interval": "1m", + "legend": { + "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum(node_namespace_pod_container:container_memory_working_set_bytes{node=~\"$node\", container!=\"\"}) by (pod)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}pod{{`}}`}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Memory Usage (w/o cache)", + "tooltip": { + "shared": false, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "bytes", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Memory Usage", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "id": 4, + "interval": "1m", + "legend": { + "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": false, + "steppedLine": false, + "styles": [ + { + "alias": "Time", + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "pattern": "Time", + "type": "hidden" + }, + { + "alias": "Memory Usage", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #A", + "thresholds": [ + + ], + "type": "number", + "unit": "bytes" + }, + { + "alias": "Memory Requests", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #B", + "thresholds": [ + + ], + "type": "number", + "unit": "bytes" + }, + { + "alias": "Memory Requests %", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #C", + "thresholds": [ + + ], + "type": "number", + "unit": "percentunit" + }, + { + "alias": "Memory Limits", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #D", + "thresholds": [ + + ], + "type": "number", + "unit": "bytes" + }, + { + "alias": "Memory Limits %", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #E", + "thresholds": [ + + ], + "type": "number", + "unit": "percentunit" + }, + { + "alias": "Memory Usage (RSS)", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #F", + "thresholds": [ + + ], + "type": "number", + "unit": "bytes" + }, + { + "alias": "Memory Usage (Cache)", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #G", + "thresholds": [ + + ], + "type": "number", + "unit": "bytes" + }, + { + "alias": "Memory Usage (Swap)", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #H", + "thresholds": [ + + ], + "type": "number", + "unit": "bytes" + }, + { + "alias": "Pod", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "pod", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "pattern": "/.*/", + "thresholds": [ + + ], + "type": "string", + "unit": "short" + } + ], + "targets": [ + { + "expr": "sum(node_namespace_pod_container:container_memory_working_set_bytes{node=~\"$node\",container!=\"\"}) by (pod)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "A", + "step": 10 + }, + { + "expr": "sum(cluster:namespace:pod_memory:active:kube_pod_container_resource_requests{node=~\"$node\"}) by (pod)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "B", + "step": 10 + }, + { + "expr": "sum(node_namespace_pod_container:container_memory_working_set_bytes{node=~\"$node\",container!=\"\"}) by (pod) / sum(cluster:namespace:pod_memory:active:kube_pod_container_resource_requests{node=~\"$node\"}) by (pod)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "C", + "step": 10 + }, + { + "expr": "sum(cluster:namespace:pod_memory:active:kube_pod_container_resource_limits{node=~\"$node\"}) by (pod)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "D", + "step": 10 + }, + { + "expr": "sum(node_namespace_pod_container:container_memory_working_set_bytes{node=~\"$node\",container!=\"\"}) by (pod) / sum(cluster:namespace:pod_memory:active:kube_pod_container_resource_limits{node=~\"$node\"}) by (pod)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "E", + "step": 10 + }, + { + "expr": "sum(node_namespace_pod_container:container_memory_rss{node=~\"$node\",container!=\"\"}) by (pod)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "F", + "step": 10 + }, + { + "expr": "sum(node_namespace_pod_container:container_memory_cache{node=~\"$node\",container!=\"\"}) by (pod)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "G", + "step": 10 + }, + { + "expr": "sum(node_namespace_pod_container:container_memory_swap{node=~\"$node\",container!=\"\"}) by (pod)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "H", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Memory Quota", + "tooltip": { + "shared": false, + "sort": 2, + "value_type": "individual" + }, + "transform": "table", + "type": "table", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Memory Quota", + "titleSize": "h6" + } + ], + "schemaVersion": 14, + "style": "dark", + "tags": [ + "kubernetes-mixin" + ], + "templating": { + "list": [ + { + "current": { + "text": "Prometheus", + "value": "Prometheus" + }, + "hide": 0, + "label": "Data Source", + "name": "datasource", + "options": [ + + ], + "query": "prometheus", + "refresh": 1, + "regex": "", + "type": "datasource" + }, + { + "allValue": null, + "current": { + "text": "", + "value": "" + }, + "datasource": "$datasource", + "hide": 0, + "includeAll": false, + "label": null, + "multi": true, + "name": "node", + "options": [ + + ], + "query": "label_values(kube_pod_info, node)", + "refresh": 2, + "regex": "", + "sort": 1, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "query", + "useTags": false + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + "timezone": "{{ .Values.grafana.defaultDashboardsTimezone }}", + "title": "Kubernetes / Compute Resources / Node (Pods)", + "uid": "200ac8fdbfbb74b39aff88118e4d1c2c", + "version": 0 + } +{{- end }} \ No newline at end of file diff --git a/charts/rancher-project-monitoring/0.2.0-rc1/templates/grafana/dashboards-1.14/k8s-resources-pod.yaml b/charts/rancher-project-monitoring/0.2.0-rc1/templates/grafana/dashboards-1.14/k8s-resources-pod.yaml new file mode 100644 index 00000000..c8d57cfd --- /dev/null +++ b/charts/rancher-project-monitoring/0.2.0-rc1/templates/grafana/dashboards-1.14/k8s-resources-pod.yaml @@ -0,0 +1,2442 @@ +{{- /* +Generated from 'k8s-resources-pod' from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/grafana-dashboardDefinitions.yaml +Do not change in-place! In order to change this file first read following link: +https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack +*/ -}} +{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} +{{- if and (or .Values.grafana.enabled .Values.grafana.forceDeployDashboards) (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.grafana.defaultDashboardsEnabled }} +apiVersion: v1 +kind: ConfigMap +metadata: + namespace: {{ template "project-prometheus-stack.namespace" . }} + name: {{ printf "%s-%s" (include "project-prometheus-stack.fullname" $) "k8s-resources-pod" | trunc 63 | trimSuffix "-" }} + annotations: +{{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} + labels: + {{- if $.Values.grafana.sidecar.dashboards.label }} + {{ $.Values.grafana.sidecar.dashboards.label }}: {{ ternary $.Values.grafana.sidecar.dashboards.labelValue "1" (not (empty $.Values.grafana.sidecar.dashboards.labelValue)) | quote }} + {{- end }} + app: {{ template "project-prometheus-stack.name" $ }}-grafana +{{ include "project-prometheus-stack.labels" $ | indent 4 }} +data: + k8s-resources-pod.json: |- + { + "annotations": { + "list": [ + + ] + }, + "editable": true, + "gnetId": null, + "graphTooltip": 0, + "hideControls": false, + "links": [ + + ], + "refresh": "10s", + "rows": [ + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 1, + "interval": "1m", + "legend": { + "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "alias": "requests", + "color": "#F2495C", + "fill": 0, + "hideTooltip": true, + "legend": true, + "linewidth": 2, + "stack": false + }, + { + "alias": "limits", + "color": "#FF9830", + "fill": 0, + "hideTooltip": true, + "legend": true, + "linewidth": 2, + "stack": false + } + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate{namespace=\"$namespace\", pod=\"$pod\"}) by (container)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}container{{`}}`}}", + "legendLink": null, + "step": 10 + }, + { + "expr": "sum(\n kube_pod_container_resource_requests{namespace=\"$namespace\", pod=\"$pod\", resource=\"cpu\"}\n)\n", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "requests", + "legendLink": null, + "step": 10 + }, + { + "expr": "sum(\n kube_pod_container_resource_limits{namespace=\"$namespace\", pod=\"$pod\", resource=\"cpu\"}\n)\n", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "limits", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "CPU Usage", + "tooltip": { + "shared": false, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "CPU Usage", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 2, + "interval": "1m", + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "max": true, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum(increase(container_cpu_cfs_throttled_periods_total{namespace=\"$namespace\", pod=\"$pod\", container!=\"\"}[$__rate_interval])) by (container) /sum(increase(container_cpu_cfs_periods_total{namespace=\"$namespace\", pod=\"$pod\", container!=\"\"}[$__rate_interval])) by (container)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}container{{`}}`}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + { + "colorMode": "critical", + "fill": true, + "line": true, + "op": "gt", + "value": 0.25, + "yaxis": "left" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "CPU Throttling", + "tooltip": { + "shared": false, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "percentunit", + "label": null, + "logBase": 1, + "max": 1, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "CPU Throttling", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "id": 3, + "interval": "1m", + "legend": { + "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": false, + "steppedLine": false, + "styles": [ + { + "alias": "Time", + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "pattern": "Time", + "type": "hidden" + }, + { + "alias": "CPU Usage", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #A", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "CPU Requests", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #B", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "CPU Requests %", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #C", + "thresholds": [ + + ], + "type": "number", + "unit": "percentunit" + }, + { + "alias": "CPU Limits", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #D", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "CPU Limits %", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #E", + "thresholds": [ + + ], + "type": "number", + "unit": "percentunit" + }, + { + "alias": "Container", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "container", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "pattern": "/.*/", + "thresholds": [ + + ], + "type": "string", + "unit": "short" + } + ], + "targets": [ + { + "expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate{namespace=\"$namespace\", pod=\"$pod\"}) by (container)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "A", + "step": 10 + }, + { + "expr": "sum(cluster:namespace:pod_cpu:active:kube_pod_container_resource_requests{namespace=\"$namespace\", pod=\"$pod\"}) by (container)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "B", + "step": 10 + }, + { + "expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate{namespace=\"$namespace\", pod=\"$pod\"}) by (container) / sum(cluster:namespace:pod_cpu:active:kube_pod_container_resource_requests{namespace=\"$namespace\", pod=\"$pod\"}) by (container)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "C", + "step": 10 + }, + { + "expr": "sum(cluster:namespace:pod_cpu:active:kube_pod_container_resource_limits{namespace=\"$namespace\", pod=\"$pod\"}) by (container)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "D", + "step": 10 + }, + { + "expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate{namespace=\"$namespace\", pod=\"$pod\"}) by (container) / sum(cluster:namespace:pod_cpu:active:kube_pod_container_resource_limits{namespace=\"$namespace\", pod=\"$pod\"}) by (container)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "E", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "CPU Quota", + "tooltip": { + "shared": false, + "sort": 2, + "value_type": "individual" + }, + "transform": "table", + "type": "table", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "CPU Quota", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 4, + "interval": "1m", + "legend": { + "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "alias": "requests", + "color": "#F2495C", + "dashes": true, + "fill": 0, + "hideTooltip": true, + "legend": true, + "linewidth": 2, + "stack": false + }, + { + "alias": "limits", + "color": "#FF9830", + "dashes": true, + "fill": 0, + "hideTooltip": true, + "legend": true, + "linewidth": 2, + "stack": false + } + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum(container_memory_working_set_bytes{namespace=\"$namespace\", pod=\"$pod\", container!=\"\", image!=\"\"}) by (container)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}container{{`}}`}}", + "legendLink": null, + "step": 10 + }, + { + "expr": "sum(\n kube_pod_container_resource_requests{namespace=\"$namespace\", pod=\"$pod\", resource=\"memory\"}\n)\n", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "requests", + "legendLink": null, + "step": 10 + }, + { + "expr": "sum(\n kube_pod_container_resource_limits{namespace=\"$namespace\", pod=\"$pod\", resource=\"memory\"}\n)\n", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "limits", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Memory Usage (WSS)", + "tooltip": { + "shared": false, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "bytes", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Memory Usage", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "id": 5, + "interval": "1m", + "legend": { + "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": false, + "steppedLine": false, + "styles": [ + { + "alias": "Time", + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "pattern": "Time", + "type": "hidden" + }, + { + "alias": "Memory Usage (WSS)", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #A", + "thresholds": [ + + ], + "type": "number", + "unit": "bytes" + }, + { + "alias": "Memory Requests", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #B", + "thresholds": [ + + ], + "type": "number", + "unit": "bytes" + }, + { + "alias": "Memory Requests %", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #C", + "thresholds": [ + + ], + "type": "number", + "unit": "percentunit" + }, + { + "alias": "Memory Limits", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #D", + "thresholds": [ + + ], + "type": "number", + "unit": "bytes" + }, + { + "alias": "Memory Limits %", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #E", + "thresholds": [ + + ], + "type": "number", + "unit": "percentunit" + }, + { + "alias": "Memory Usage (RSS)", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #F", + "thresholds": [ + + ], + "type": "number", + "unit": "bytes" + }, + { + "alias": "Memory Usage (Cache)", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #G", + "thresholds": [ + + ], + "type": "number", + "unit": "bytes" + }, + { + "alias": "Memory Usage (Swap)", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #H", + "thresholds": [ + + ], + "type": "number", + "unit": "bytes" + }, + { + "alias": "Container", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "container", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "pattern": "/.*/", + "thresholds": [ + + ], + "type": "string", + "unit": "short" + } + ], + "targets": [ + { + "expr": "sum(container_memory_working_set_bytes{namespace=\"$namespace\", pod=\"$pod\", container!=\"\", image!=\"\"}) by (container)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "A", + "step": 10 + }, + { + "expr": "sum(cluster:namespace:pod_memory:active:kube_pod_container_resource_requests{namespace=\"$namespace\", pod=\"$pod\"}) by (container)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "B", + "step": 10 + }, + { + "expr": "sum(container_memory_working_set_bytes{namespace=\"$namespace\", pod=\"$pod\", image!=\"\"}) by (container) / sum(cluster:namespace:pod_memory:active:kube_pod_container_resource_requests{namespace=\"$namespace\", pod=\"$pod\"}) by (container)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "C", + "step": 10 + }, + { + "expr": "sum(cluster:namespace:pod_memory:active:kube_pod_container_resource_limits{namespace=\"$namespace\", pod=\"$pod\"}) by (container)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "D", + "step": 10 + }, + { + "expr": "sum(container_memory_working_set_bytes{namespace=\"$namespace\", pod=\"$pod\", container!=\"\", image!=\"\"}) by (container) / sum(cluster:namespace:pod_memory:active:kube_pod_container_resource_limits{namespace=\"$namespace\", pod=\"$pod\"}) by (container)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "E", + "step": 10 + }, + { + "expr": "sum(container_memory_rss{namespace=\"$namespace\", pod=\"$pod\", container != \"\", container != \"POD\"}) by (container)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "F", + "step": 10 + }, + { + "expr": "sum(container_memory_cache{namespace=\"$namespace\", pod=\"$pod\", container != \"\", container != \"POD\"}) by (container)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "G", + "step": 10 + }, + { + "expr": "sum(container_memory_swap{namespace=\"$namespace\", pod=\"$pod\", container != \"\", container != \"POD\"}) by (container)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "H", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Memory Quota", + "tooltip": { + "shared": false, + "sort": 2, + "value_type": "individual" + }, + "transform": "table", + "type": "table", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Memory Quota", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 6, + "interval": "1m", + "legend": { + "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum(irate(container_network_receive_bytes_total{namespace=\"$namespace\", pod=~\"$pod\"}[$__rate_interval])) by (pod)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}pod{{`}}`}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Receive Bandwidth", + "tooltip": { + "shared": false, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 7, + "interval": "1m", + "legend": { + "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum(irate(container_network_transmit_bytes_total{namespace=\"$namespace\", pod=~\"$pod\"}[$__rate_interval])) by (pod)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}pod{{`}}`}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Transmit Bandwidth", + "tooltip": { + "shared": false, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Bandwidth", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 8, + "interval": "1m", + "legend": { + "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum(irate(container_network_receive_packets_total{namespace=\"$namespace\", pod=~\"$pod\"}[$__rate_interval])) by (pod)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}pod{{`}}`}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Rate of Received Packets", + "tooltip": { + "shared": false, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "pps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 9, + "interval": "1m", + "legend": { + "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum(irate(container_network_transmit_packets_total{namespace=\"$namespace\", pod=~\"$pod\"}[$__rate_interval])) by (pod)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}pod{{`}}`}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Rate of Transmitted Packets", + "tooltip": { + "shared": false, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "pps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Rate of Packets", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 10, + "interval": "1m", + "legend": { + "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum(irate(container_network_receive_packets_dropped_total{namespace=\"$namespace\", pod=~\"$pod\"}[$__rate_interval])) by (pod)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}pod{{`}}`}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Rate of Received Packets Dropped", + "tooltip": { + "shared": false, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "pps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 11, + "interval": "1m", + "legend": { + "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum(irate(container_network_transmit_packets_dropped_total{namespace=\"$namespace\", pod=~\"$pod\"}[$__rate_interval])) by (pod)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}pod{{`}}`}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Rate of Transmitted Packets Dropped", + "tooltip": { + "shared": false, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "pps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Rate of Packets Dropped", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "decimals": -1, + "fill": 10, + "id": 12, + "interval": "1m", + "legend": { + "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "ceil(sum by(pod) (rate(container_fs_reads_total{device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", container!=\"\", namespace=\"$namespace\", pod=~\"$pod\"}[$__rate_interval])))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Reads", + "legendLink": null, + "step": 10 + }, + { + "expr": "ceil(sum by(pod) (rate(container_fs_writes_total{device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", container!=\"\", namespace=\"$namespace\", pod=~\"$pod\"}[$__rate_interval])))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Writes", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "IOPS", + "tooltip": { + "shared": false, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 13, + "interval": "1m", + "legend": { + "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum by(pod) (rate(container_fs_reads_bytes_total{device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", container!=\"\", namespace=\"$namespace\", pod=~\"$pod\"}[$__rate_interval]))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Reads", + "legendLink": null, + "step": 10 + }, + { + "expr": "sum by(pod) (rate(container_fs_writes_bytes_total{device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", container!=\"\", namespace=\"$namespace\", pod=~\"$pod\"}[$__rate_interval]))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Writes", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "ThroughPut", + "tooltip": { + "shared": false, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Storage IO - Distribution(Pod - Read & Writes)", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "decimals": -1, + "fill": 10, + "id": 14, + "interval": "1m", + "legend": { + "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "ceil(sum by(container) (rate(container_fs_reads_total{container!=\"\", namespace=\"$namespace\", pod=\"$pod\"}[$__rate_interval]) + rate(container_fs_writes_total{container!=\"\", namespace=\"$namespace\", pod=\"$pod\"}[$__rate_interval])))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}container{{`}}`}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "IOPS(Reads+Writes)", + "tooltip": { + "shared": false, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 15, + "interval": "1m", + "legend": { + "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum by(container) (rate(container_fs_reads_bytes_total{container!=\"\", namespace=\"$namespace\", pod=\"$pod\"}[$__rate_interval]) + rate(container_fs_writes_bytes_total{container!=\"\", namespace=\"$namespace\", pod=\"$pod\"}[$__rate_interval]))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}container{{`}}`}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "ThroughPut(Read+Write)", + "tooltip": { + "shared": false, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Storage IO - Distribution(Containers)", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "id": 16, + "interval": "1m", + "legend": { + "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "sort": { + "col": 4, + "desc": true + }, + "spaceLength": 10, + "span": 12, + "stack": false, + "steppedLine": false, + "styles": [ + { + "alias": "Time", + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "pattern": "Time", + "type": "hidden" + }, + { + "alias": "IOPS(Reads)", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": -1, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #A", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "IOPS(Writes)", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": -1, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #B", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "IOPS(Reads + Writes)", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": -1, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #C", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "Throughput(Read)", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #D", + "thresholds": [ + + ], + "type": "number", + "unit": "Bps" + }, + { + "alias": "Throughput(Write)", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #E", + "thresholds": [ + + ], + "type": "number", + "unit": "Bps" + }, + { + "alias": "Throughput(Read + Write)", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #F", + "thresholds": [ + + ], + "type": "number", + "unit": "Bps" + }, + { + "alias": "Container", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "container", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "pattern": "/.*/", + "thresholds": [ + + ], + "type": "string", + "unit": "short" + } + ], + "targets": [ + { + "expr": "sum by(container) (rate(container_fs_reads_total{device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", container!=\"\", namespace=\"$namespace\", pod=\"$pod\"}[$__rate_interval]))", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "A", + "step": 10 + }, + { + "expr": "sum by(container) (rate(container_fs_writes_total{device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", container!=\"\", namespace=\"$namespace\", pod=\"$pod\"}[$__rate_interval]))", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "B", + "step": 10 + }, + { + "expr": "sum by(container) (rate(container_fs_reads_total{device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", container!=\"\", namespace=\"$namespace\", pod=\"$pod\"}[$__rate_interval]) + rate(container_fs_writes_total{container!=\"\", namespace=\"$namespace\", pod=\"$pod\"}[$__rate_interval]))", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "C", + "step": 10 + }, + { + "expr": "sum by(container) (rate(container_fs_reads_bytes_total{device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", container!=\"\", namespace=\"$namespace\", pod=\"$pod\"}[$__rate_interval]))", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "D", + "step": 10 + }, + { + "expr": "sum by(container) (rate(container_fs_writes_bytes_total{device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", container!=\"\", namespace=\"$namespace\", pod=\"$pod\"}[$__rate_interval]))", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "E", + "step": 10 + }, + { + "expr": "sum by(container) (rate(container_fs_reads_bytes_total{device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", container!=\"\", namespace=\"$namespace\", pod=\"$pod\"}[$__rate_interval]) + rate(container_fs_writes_bytes_total{container!=\"\", namespace=\"$namespace\", pod=\"$pod\"}[$__rate_interval]))", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "F", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Current Storage IO", + "tooltip": { + "shared": false, + "sort": 2, + "value_type": "individual" + }, + "transform": "table", + "type": "table", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Storage IO - Distribution", + "titleSize": "h6" + } + ], + "schemaVersion": 14, + "style": "dark", + "tags": [ + "kubernetes-mixin" + ], + "templating": { + "list": [ + { + "current": { + "text": "Prometheus", + "value": "Prometheus" + }, + "hide": 0, + "label": "Data Source", + "name": "datasource", + "options": [ + + ], + "query": "prometheus", + "refresh": 1, + "regex": "", + "type": "datasource" + }, + { + "allValue": null, + "current": { + "text": "", + "value": "" + }, + "datasource": "$datasource", + "hide": 0, + "includeAll": false, + "label": null, + "multi": false, + "name": "namespace", + "options": [ + + ], + "query": "label_values(kube_pod_info, namespace)", + "refresh": 2, + "regex": "", + "sort": 1, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "current": { + "text": "", + "value": "" + }, + "datasource": "$datasource", + "hide": 0, + "includeAll": false, + "label": null, + "multi": false, + "name": "pod", + "options": [ + + ], + "query": "label_values(kube_pod_info{namespace=\"$namespace\"}, pod)", + "refresh": 2, + "regex": "", + "sort": 1, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "query", + "useTags": false + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + "timezone": "{{ .Values.grafana.defaultDashboardsTimezone }}", + "title": "Kubernetes / Compute Resources / Pod", + "uid": "6581e46e4e5c7ba40a07646395ef7b23", + "version": 0 + } +{{- end }} \ No newline at end of file diff --git a/charts/rancher-project-monitoring/0.2.0-rc1/templates/grafana/dashboards-1.14/k8s-resources-project.yaml b/charts/rancher-project-monitoring/0.2.0-rc1/templates/grafana/dashboards-1.14/k8s-resources-project.yaml new file mode 100644 index 00000000..56d9c77f --- /dev/null +++ b/charts/rancher-project-monitoring/0.2.0-rc1/templates/grafana/dashboards-1.14/k8s-resources-project.yaml @@ -0,0 +1,2480 @@ +{{- /* +Generated from 'k8s-resources-cluster' from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/grafana-dashboardDefinitions.yaml +Do not change in-place! In order to change this file first read following link: +https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack +*/ -}} +{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} +{{- if and (or .Values.grafana.enabled .Values.grafana.forceDeployDashboards) (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.grafana.defaultDashboardsEnabled }} +apiVersion: v1 +kind: ConfigMap +metadata: + namespace: {{ template "project-prometheus-stack.namespace" . }} + name: {{ printf "%s-%s" (include "project-prometheus-stack.fullname" $) "k8s-resources-cluster" | trunc 63 | trimSuffix "-" }} + annotations: +{{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} + labels: + {{- if $.Values.grafana.sidecar.dashboards.label }} + {{ $.Values.grafana.sidecar.dashboards.label }}: {{ ternary $.Values.grafana.sidecar.dashboards.labelValue "1" (not (empty $.Values.grafana.sidecar.dashboards.labelValue)) | quote }} + {{- end }} + app: {{ template "project-prometheus-stack.name" $ }}-grafana +{{ include "project-prometheus-stack.labels" $ | indent 4 }} +data: + k8s-resources-cluster.json: |- + { + "annotations": { + "list": [ + + ] + }, + "editable": true, + "gnetId": null, + "graphTooltip": 0, + "hideControls": false, + "links": [ + + ], + "refresh": "10s", + "rows": [ + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 7, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate{}) by (namespace)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}namespace{{`}}`}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "CPU Usage", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "CPU", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "id": 8, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": false, + "steppedLine": false, + "styles": [ + { + "alias": "Time", + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "pattern": "Time", + "type": "hidden" + }, + { + "alias": "Pods", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 0, + "link": true, + "linkTargetBlank": false, + "linkTooltip": "Drill down to pods", + "linkUrl": "/d/85a562078cdf77779eaa1add43ccec1e/k8s-resources-namespace?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$__cell_1", + "pattern": "Value #A", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "Workloads", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 0, + "link": true, + "linkTargetBlank": false, + "linkTooltip": "Drill down to workloads", + "linkUrl": "/d/a87fb0d919ec0ea5f6543124e16c42a5/k8s-resources-workloads-namespace?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$__cell_1", + "pattern": "Value #B", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "CPU Usage", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #C", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "CPU Requests", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #D", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "CPU Requests %", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #E", + "thresholds": [ + + ], + "type": "number", + "unit": "percentunit" + }, + { + "alias": "CPU Limits", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #F", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "CPU Limits %", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #G", + "thresholds": [ + + ], + "type": "number", + "unit": "percentunit" + }, + { + "alias": "Namespace", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": true, + "linkTargetBlank": false, + "linkTooltip": "Drill down to pods", + "linkUrl": "/d/85a562078cdf77779eaa1add43ccec1e/k8s-resources-namespace?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$__cell", + "pattern": "namespace", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "pattern": "/.*/", + "thresholds": [ + + ], + "type": "string", + "unit": "short" + } + ], + "targets": [ + { + "expr": "sum(kube_pod_owner{}) by (namespace)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "A", + "step": 10 + }, + { + "expr": "count(avg(namespace_workload_pod:kube_pod_owner:relabel{}) by (workload, namespace)) by (namespace)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "B", + "step": 10 + }, + { + "expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate{}) by (namespace)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "C", + "step": 10 + }, + { + "expr": "sum(namespace_cpu:kube_pod_container_resource_requests:sum{}) by (namespace)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "D", + "step": 10 + }, + { + "expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate{}) by (namespace) / sum(namespace_cpu:kube_pod_container_resource_requests:sum{}) by (namespace)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "E", + "step": 10 + }, + { + "expr": "sum(namespace_cpu:kube_pod_container_resource_limits:sum{}) by (namespace)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "F", + "step": 10 + }, + { + "expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate{}) by (namespace) / sum(namespace_cpu:kube_pod_container_resource_limits:sum{}) by (namespace)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "G", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "CPU Quota", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "transform": "table", + "type": "table", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "CPU Quota", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 9, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum(container_memory_rss{container!=\"\"}) by (namespace)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}namespace{{`}}`}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Memory Usage (w/o cache)", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "bytes", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Memory", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "id": 10, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": false, + "steppedLine": false, + "styles": [ + { + "alias": "Time", + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "pattern": "Time", + "type": "hidden" + }, + { + "alias": "Pods", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 0, + "link": true, + "linkTargetBlank": false, + "linkTooltip": "Drill down to pods", + "linkUrl": "/d/85a562078cdf77779eaa1add43ccec1e/k8s-resources-namespace?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$__cell_1", + "pattern": "Value #A", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "Workloads", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 0, + "link": true, + "linkTargetBlank": false, + "linkTooltip": "Drill down to workloads", + "linkUrl": "/d/a87fb0d919ec0ea5f6543124e16c42a5/k8s-resources-workloads-namespace?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$__cell_1", + "pattern": "Value #B", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "Memory Usage", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #C", + "thresholds": [ + + ], + "type": "number", + "unit": "bytes" + }, + { + "alias": "Memory Requests", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #D", + "thresholds": [ + + ], + "type": "number", + "unit": "bytes" + }, + { + "alias": "Memory Requests %", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #E", + "thresholds": [ + + ], + "type": "number", + "unit": "percentunit" + }, + { + "alias": "Memory Limits", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #F", + "thresholds": [ + + ], + "type": "number", + "unit": "bytes" + }, + { + "alias": "Memory Limits %", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #G", + "thresholds": [ + + ], + "type": "number", + "unit": "percentunit" + }, + { + "alias": "Namespace", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": true, + "linkTargetBlank": false, + "linkTooltip": "Drill down to pods", + "linkUrl": "/d/85a562078cdf77779eaa1add43ccec1e/k8s-resources-namespace?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$__cell", + "pattern": "namespace", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "pattern": "/.*/", + "thresholds": [ + + ], + "type": "string", + "unit": "short" + } + ], + "targets": [ + { + "expr": "sum(kube_pod_owner{}) by (namespace)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "A", + "step": 10 + }, + { + "expr": "count(avg(namespace_workload_pod:kube_pod_owner:relabel{}) by (workload, namespace)) by (namespace)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "B", + "step": 10 + }, + { + "expr": "sum(container_memory_rss{container!=\"\"}) by (namespace)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "C", + "step": 10 + }, + { + "expr": "sum(namespace_memory:kube_pod_container_resource_requests:sum{}) by (namespace)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "D", + "step": 10 + }, + { + "expr": "sum(container_memory_rss{container!=\"\"}) by (namespace) / sum(namespace_memory:kube_pod_container_resource_requests:sum{}) by (namespace)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "E", + "step": 10 + }, + { + "expr": "sum(namespace_memory:kube_pod_container_resource_limits:sum{}) by (namespace)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "F", + "step": 10 + }, + { + "expr": "sum(container_memory_rss{container!=\"\"}) by (namespace) / sum(namespace_memory:kube_pod_container_resource_limits:sum{}) by (namespace)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "G", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Requests by Namespace", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "transform": "table", + "type": "table", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Memory Requests", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "id": 11, + "interval": "1m", + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": false, + "steppedLine": false, + "styles": [ + { + "alias": "Time", + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "pattern": "Time", + "type": "hidden" + }, + { + "alias": "Current Receive Bandwidth", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #A", + "thresholds": [ + + ], + "type": "number", + "unit": "Bps" + }, + { + "alias": "Current Transmit Bandwidth", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #B", + "thresholds": [ + + ], + "type": "number", + "unit": "Bps" + }, + { + "alias": "Rate of Received Packets", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #C", + "thresholds": [ + + ], + "type": "number", + "unit": "pps" + }, + { + "alias": "Rate of Transmitted Packets", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #D", + "thresholds": [ + + ], + "type": "number", + "unit": "pps" + }, + { + "alias": "Rate of Received Packets Dropped", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #E", + "thresholds": [ + + ], + "type": "number", + "unit": "pps" + }, + { + "alias": "Rate of Transmitted Packets Dropped", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #F", + "thresholds": [ + + ], + "type": "number", + "unit": "pps" + }, + { + "alias": "Namespace", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": true, + "linkTargetBlank": false, + "linkTooltip": "Drill down to pods", + "linkUrl": "/d/85a562078cdf77779eaa1add43ccec1e/k8s-resources-namespace?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$__cell", + "pattern": "namespace", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "pattern": "/.*/", + "thresholds": [ + + ], + "type": "string", + "unit": "short" + } + ], + "targets": [ + { + "expr": "sum(irate(container_network_receive_bytes_total{namespace=~\".+\"}[$__rate_interval])) by (namespace)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "A", + "step": 10 + }, + { + "expr": "sum(irate(container_network_transmit_bytes_total{namespace=~\".+\"}[$__rate_interval])) by (namespace)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "B", + "step": 10 + }, + { + "expr": "sum(irate(container_network_receive_packets_total{namespace=~\".+\"}[$__rate_interval])) by (namespace)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "C", + "step": 10 + }, + { + "expr": "sum(irate(container_network_transmit_packets_total{namespace=~\".+\"}[$__rate_interval])) by (namespace)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "D", + "step": 10 + }, + { + "expr": "sum(irate(container_network_receive_packets_dropped_total{namespace=~\".+\"}[$__rate_interval])) by (namespace)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "E", + "step": 10 + }, + { + "expr": "sum(irate(container_network_transmit_packets_dropped_total{namespace=~\".+\"}[$__rate_interval])) by (namespace)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "F", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Current Network Usage", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "transform": "table", + "type": "table", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Current Network Usage", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 12, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum(irate(container_network_receive_bytes_total{namespace=~\".+\"}[$__rate_interval])) by (namespace)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}namespace{{`}}`}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Receive Bandwidth", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 13, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum(irate(container_network_transmit_bytes_total{namespace=~\".+\"}[$__rate_interval])) by (namespace)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}namespace{{`}}`}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Transmit Bandwidth", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Bandwidth", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 14, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "avg(irate(container_network_receive_bytes_total{namespace=~\".+\"}[$__rate_interval])) by (namespace)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}namespace{{`}}`}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Average Container Bandwidth by Namespace: Received", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 15, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "avg(irate(container_network_transmit_bytes_total{namespace=~\".+\"}[$__rate_interval])) by (namespace)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}namespace{{`}}`}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Average Container Bandwidth by Namespace: Transmitted", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Average Container Bandwidth by Namespace", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 16, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum(irate(container_network_receive_packets_total{namespace=~\".+\"}[$__rate_interval])) by (namespace)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}namespace{{`}}`}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Rate of Received Packets", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "pps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 17, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum(irate(container_network_transmit_packets_total{namespace=~\".+\"}[$__rate_interval])) by (namespace)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}namespace{{`}}`}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Rate of Transmitted Packets", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "pps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Rate of Packets", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 18, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum(irate(container_network_receive_packets_dropped_total{namespace=~\".+\"}[$__rate_interval])) by (namespace)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}namespace{{`}}`}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Rate of Received Packets Dropped", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "pps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 19, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum(irate(container_network_transmit_packets_dropped_total{namespace=~\".+\"}[$__rate_interval])) by (namespace)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}namespace{{`}}`}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Rate of Transmitted Packets Dropped", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "pps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Rate of Packets Dropped", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "decimals": -1, + "fill": 10, + "id": 20, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "ceil(sum by(namespace) (rate(container_fs_reads_total{container!=\"\"}[5m]) + rate(container_fs_writes_total{container!=\"\"}[5m])))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}namespace{{`}}`}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "IOPS(Reads+Writes)", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 21, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum by(namespace) (rate(container_fs_reads_bytes_total{container!=\"\"}[5m]) + rate(container_fs_writes_bytes_total{container!=\"\"}[5m]))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}namespace{{`}}`}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "ThroughPut(Read+Write)", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Storage IO", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "id": 22, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "sort": { + "col": 4, + "desc": true + }, + "spaceLength": 10, + "span": 12, + "stack": false, + "steppedLine": false, + "styles": [ + { + "alias": "Time", + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "pattern": "Time", + "type": "hidden" + }, + { + "alias": "IOPS(Reads)", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": -1, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #A", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "IOPS(Writes)", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": -1, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #B", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "IOPS(Reads + Writes)", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": -1, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #C", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "Throughput(Read)", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #D", + "thresholds": [ + + ], + "type": "number", + "unit": "Bps" + }, + { + "alias": "Throughput(Write)", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #E", + "thresholds": [ + + ], + "type": "number", + "unit": "Bps" + }, + { + "alias": "Throughput(Read + Write)", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #F", + "thresholds": [ + + ], + "type": "number", + "unit": "Bps" + }, + { + "alias": "Namespace", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": true, + "linkTargetBlank": false, + "linkTooltip": "Drill down to pods", + "linkUrl": "/d/85a562078cdf77779eaa1add43ccec1e/k8s-resources-namespace?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$__cell", + "pattern": "namespace", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "pattern": "/.*/", + "thresholds": [ + + ], + "type": "string", + "unit": "short" + } + ], + "targets": [ + { + "expr": "sum by(namespace) (rate(container_fs_reads_total{container!=\"\"}[5m]))", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "A", + "step": 10 + }, + { + "expr": "sum by(namespace) (rate(container_fs_writes_total{container!=\"\"}[5m]))", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "B", + "step": 10 + }, + { + "expr": "sum by(namespace) (rate(container_fs_reads_total{container!=\"\"}[5m]) + rate(container_fs_writes_total{container!=\"\"}[5m]))", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "C", + "step": 10 + }, + { + "expr": "sum by(namespace) (rate(container_fs_reads_bytes_total{container!=\"\"}[5m]))", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "D", + "step": 10 + }, + { + "expr": "sum by(namespace) (rate(container_fs_writes_bytes_total{container!=\"\"}[5m]))", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "E", + "step": 10 + }, + { + "expr": "sum by(namespace) (rate(container_fs_reads_bytes_total{container!=\"\"}[5m]) + rate(container_fs_writes_bytes_total{container!=\"\"}[5m]))", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "F", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Current Storage IO", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "transform": "table", + "type": "table", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Storage IO - Distribution", + "titleSize": "h6" + } + ], + "schemaVersion": 14, + "style": "dark", + "tags": [ + "kubernetes-mixin" + ], + "templating": { + "list": [ + { + "current": { + "text": "default", + "value": "default" + }, + "hide": 0, + "label": null, + "name": "datasource", + "options": [ + + ], + "query": "prometheus", + "refresh": 1, + "regex": "", + "type": "datasource" + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + "timezone": "{{ .Values.grafana.defaultDashboardsTimezone }}", + "title": "Kubernetes / Compute Resources / Project", + "uid": "efa86fd1d0c121a26444b636a3f509a8", + "version": 0 + } +{{- end }} \ No newline at end of file diff --git a/charts/rancher-project-monitoring/0.2.0-rc1/templates/grafana/dashboards-1.14/k8s-resources-workload.yaml b/charts/rancher-project-monitoring/0.2.0-rc1/templates/grafana/dashboards-1.14/k8s-resources-workload.yaml new file mode 100644 index 00000000..4e72d70a --- /dev/null +++ b/charts/rancher-project-monitoring/0.2.0-rc1/templates/grafana/dashboards-1.14/k8s-resources-workload.yaml @@ -0,0 +1,1997 @@ +{{- /* +Generated from 'k8s-resources-workload' from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/grafana-dashboardDefinitions.yaml +Do not change in-place! In order to change this file first read following link: +https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack +*/ -}} +{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} +{{- if and (or .Values.grafana.enabled .Values.grafana.forceDeployDashboards) (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.grafana.defaultDashboardsEnabled }} +apiVersion: v1 +kind: ConfigMap +metadata: + namespace: {{ template "project-prometheus-stack.namespace" . }} + name: {{ printf "%s-%s" (include "project-prometheus-stack.fullname" $) "k8s-resources-workload" | trunc 63 | trimSuffix "-" }} + annotations: +{{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} + labels: + {{- if $.Values.grafana.sidecar.dashboards.label }} + {{ $.Values.grafana.sidecar.dashboards.label }}: {{ ternary $.Values.grafana.sidecar.dashboards.labelValue "1" (not (empty $.Values.grafana.sidecar.dashboards.labelValue)) | quote }} + {{- end }} + app: {{ template "project-prometheus-stack.name" $ }}-grafana +{{ include "project-prometheus-stack.labels" $ | indent 4 }} +data: + k8s-resources-workload.json: |- + { + "annotations": { + "list": [ + + ] + }, + "editable": true, + "gnetId": null, + "graphTooltip": 0, + "hideControls": false, + "links": [ + + ], + "refresh": "10s", + "rows": [ + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 1, + "interval": "1m", + "legend": { + "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum(\n node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate{namespace=\"$namespace\"}\n * on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}pod{{`}}`}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "CPU Usage", + "tooltip": { + "shared": false, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "CPU Usage", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "id": 2, + "interval": "1m", + "legend": { + "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": false, + "steppedLine": false, + "styles": [ + { + "alias": "Time", + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "pattern": "Time", + "type": "hidden" + }, + { + "alias": "CPU Usage", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #A", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "CPU Requests", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #B", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "CPU Requests %", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #C", + "thresholds": [ + + ], + "type": "number", + "unit": "percentunit" + }, + { + "alias": "CPU Limits", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #D", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "CPU Limits %", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #E", + "thresholds": [ + + ], + "type": "number", + "unit": "percentunit" + }, + { + "alias": "Pod", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": true, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "d/6581e46e4e5c7ba40a07646395ef7b23/k8s-resources-pod?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$namespace&var-pod=$__cell", + "pattern": "pod", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "pattern": "/.*/", + "thresholds": [ + + ], + "type": "string", + "unit": "short" + } + ], + "targets": [ + { + "expr": "sum(\n node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate{namespace=\"$namespace\"}\n * on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "A", + "step": 10 + }, + { + "expr": "sum(\n kube_pod_container_resource_requests{namespace=\"$namespace\", resource=\"cpu\"}\n * on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "B", + "step": 10 + }, + { + "expr": "sum(\n node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate{namespace=\"$namespace\"}\n * on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n/sum(\n kube_pod_container_resource_requests{namespace=\"$namespace\", resource=\"cpu\"}\n * on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "C", + "step": 10 + }, + { + "expr": "sum(\n kube_pod_container_resource_limits{namespace=\"$namespace\", resource=\"cpu\"}\n * on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "D", + "step": 10 + }, + { + "expr": "sum(\n node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate{namespace=\"$namespace\"}\n * on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n/sum(\n kube_pod_container_resource_limits{namespace=\"$namespace\", resource=\"cpu\"}\n * on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "E", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "CPU Quota", + "tooltip": { + "shared": false, + "sort": 2, + "value_type": "individual" + }, + "transform": "table", + "type": "table", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "CPU Quota", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 3, + "interval": "1m", + "legend": { + "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum(\n container_memory_working_set_bytes{namespace=\"$namespace\", container!=\"\", image!=\"\"}\n * on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}pod{{`}}`}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Memory Usage", + "tooltip": { + "shared": false, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "bytes", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Memory Usage", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "id": 4, + "interval": "1m", + "legend": { + "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": false, + "steppedLine": false, + "styles": [ + { + "alias": "Time", + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "pattern": "Time", + "type": "hidden" + }, + { + "alias": "Memory Usage", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #A", + "thresholds": [ + + ], + "type": "number", + "unit": "bytes" + }, + { + "alias": "Memory Requests", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #B", + "thresholds": [ + + ], + "type": "number", + "unit": "bytes" + }, + { + "alias": "Memory Requests %", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #C", + "thresholds": [ + + ], + "type": "number", + "unit": "percentunit" + }, + { + "alias": "Memory Limits", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #D", + "thresholds": [ + + ], + "type": "number", + "unit": "bytes" + }, + { + "alias": "Memory Limits %", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #E", + "thresholds": [ + + ], + "type": "number", + "unit": "percentunit" + }, + { + "alias": "Pod", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": true, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "d/6581e46e4e5c7ba40a07646395ef7b23/k8s-resources-pod?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$namespace&var-pod=$__cell", + "pattern": "pod", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "pattern": "/.*/", + "thresholds": [ + + ], + "type": "string", + "unit": "short" + } + ], + "targets": [ + { + "expr": "sum(\n container_memory_working_set_bytes{namespace=\"$namespace\", container!=\"\", image!=\"\"}\n * on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "A", + "step": 10 + }, + { + "expr": "sum(\n kube_pod_container_resource_requests{namespace=\"$namespace\", resource=\"memory\"}\n * on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "B", + "step": 10 + }, + { + "expr": "sum(\n container_memory_working_set_bytes{namespace=\"$namespace\", container!=\"\", image!=\"\"}\n * on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n/sum(\n kube_pod_container_resource_requests{namespace=\"$namespace\", resource=\"memory\"}\n * on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "C", + "step": 10 + }, + { + "expr": "sum(\n kube_pod_container_resource_limits{namespace=\"$namespace\", resource=\"memory\"}\n * on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "D", + "step": 10 + }, + { + "expr": "sum(\n container_memory_working_set_bytes{namespace=\"$namespace\", container!=\"\", image!=\"\"}\n * on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n/sum(\n kube_pod_container_resource_limits{namespace=\"$namespace\", resource=\"memory\"}\n * on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "E", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Memory Quota", + "tooltip": { + "shared": false, + "sort": 2, + "value_type": "individual" + }, + "transform": "table", + "type": "table", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Memory Quota", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "id": 5, + "interval": "1m", + "legend": { + "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": false, + "steppedLine": false, + "styles": [ + { + "alias": "Time", + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "pattern": "Time", + "type": "hidden" + }, + { + "alias": "Current Receive Bandwidth", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #A", + "thresholds": [ + + ], + "type": "number", + "unit": "Bps" + }, + { + "alias": "Current Transmit Bandwidth", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #B", + "thresholds": [ + + ], + "type": "number", + "unit": "Bps" + }, + { + "alias": "Rate of Received Packets", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #C", + "thresholds": [ + + ], + "type": "number", + "unit": "pps" + }, + { + "alias": "Rate of Transmitted Packets", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #D", + "thresholds": [ + + ], + "type": "number", + "unit": "pps" + }, + { + "alias": "Rate of Received Packets Dropped", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #E", + "thresholds": [ + + ], + "type": "number", + "unit": "pps" + }, + { + "alias": "Rate of Transmitted Packets Dropped", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #F", + "thresholds": [ + + ], + "type": "number", + "unit": "pps" + }, + { + "alias": "Pod", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": true, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "d/6581e46e4e5c7ba40a07646395ef7b23/k8s-resources-pod?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$namespace&var-pod=$__cell", + "pattern": "pod", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "pattern": "/.*/", + "thresholds": [ + + ], + "type": "string", + "unit": "short" + } + ], + "targets": [ + { + "expr": "(sum(irate(container_network_receive_bytes_total{namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "A", + "step": 10 + }, + { + "expr": "(sum(irate(container_network_transmit_bytes_total{namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "B", + "step": 10 + }, + { + "expr": "(sum(irate(container_network_receive_packets_total{namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "C", + "step": 10 + }, + { + "expr": "(sum(irate(container_network_transmit_packets_total{namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "D", + "step": 10 + }, + { + "expr": "(sum(irate(container_network_receive_packets_dropped_total{namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "E", + "step": 10 + }, + { + "expr": "(sum(irate(container_network_transmit_packets_dropped_total{namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "F", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Current Network Usage", + "tooltip": { + "shared": false, + "sort": 2, + "value_type": "individual" + }, + "transform": "table", + "type": "table", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Current Network Usage", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 6, + "interval": "1m", + "legend": { + "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "(sum(irate(container_network_receive_bytes_total{namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}pod{{`}}`}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Receive Bandwidth", + "tooltip": { + "shared": false, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 7, + "interval": "1m", + "legend": { + "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "(sum(irate(container_network_transmit_bytes_total{namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}pod{{`}}`}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Transmit Bandwidth", + "tooltip": { + "shared": false, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Bandwidth", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 8, + "interval": "1m", + "legend": { + "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "(avg(irate(container_network_receive_bytes_total{namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}pod{{`}}`}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Average Container Bandwidth by Pod: Received", + "tooltip": { + "shared": false, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 9, + "interval": "1m", + "legend": { + "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "(avg(irate(container_network_transmit_bytes_total{namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}pod{{`}}`}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Average Container Bandwidth by Pod: Transmitted", + "tooltip": { + "shared": false, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Average Container Bandwidth by Pod", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 10, + "interval": "1m", + "legend": { + "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "(sum(irate(container_network_receive_packets_total{namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}pod{{`}}`}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Rate of Received Packets", + "tooltip": { + "shared": false, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "pps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 11, + "interval": "1m", + "legend": { + "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "(sum(irate(container_network_transmit_packets_total{namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}pod{{`}}`}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Rate of Transmitted Packets", + "tooltip": { + "shared": false, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "pps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Rate of Packets", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 12, + "interval": "1m", + "legend": { + "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "(sum(irate(container_network_receive_packets_dropped_total{namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}pod{{`}}`}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Rate of Received Packets Dropped", + "tooltip": { + "shared": false, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "pps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 13, + "interval": "1m", + "legend": { + "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "(sum(irate(container_network_transmit_packets_dropped_total{namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}pod{{`}}`}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Rate of Transmitted Packets Dropped", + "tooltip": { + "shared": false, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "pps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Rate of Packets Dropped", + "titleSize": "h6" + } + ], + "schemaVersion": 14, + "style": "dark", + "tags": [ + "kubernetes-mixin" + ], + "templating": { + "list": [ + { + "current": { + "text": "Prometheus", + "value": "Prometheus" + }, + "hide": 0, + "label": "Data Source", + "name": "datasource", + "options": [ + + ], + "query": "prometheus", + "refresh": 1, + "regex": "", + "type": "datasource" + }, + { + "allValue": null, + "current": { + "text": "", + "value": "" + }, + "datasource": "$datasource", + "hide": 0, + "includeAll": false, + "label": null, + "multi": false, + "name": "namespace", + "options": [ + + ], + "query": "label_values(kube_pod_info, namespace)", + "refresh": 2, + "regex": "", + "sort": 1, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "current": { + "text": "", + "value": "" + }, + "datasource": "$datasource", + "hide": 0, + "includeAll": false, + "label": null, + "multi": false, + "name": "workload", + "options": [ + + ], + "query": "label_values(namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\"}, workload)", + "refresh": 2, + "regex": "", + "sort": 1, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "current": { + "text": "", + "value": "" + }, + "datasource": "$datasource", + "hide": 0, + "includeAll": false, + "label": null, + "multi": false, + "name": "type", + "options": [ + + ], + "query": "label_values(namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=\"$workload\"}, workload_type)", + "refresh": 2, + "regex": "", + "sort": 1, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "query", + "useTags": false + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + "timezone": "{{ .Values.grafana.defaultDashboardsTimezone }}", + "title": "Kubernetes / Compute Resources / Workload", + "uid": "a164a7f0339f99e89cea5cb47e9be617", + "version": 0 + } +{{- end }} \ No newline at end of file diff --git a/charts/rancher-project-monitoring/0.2.0-rc1/templates/grafana/dashboards-1.14/k8s-resources-workloads-namespace.yaml b/charts/rancher-project-monitoring/0.2.0-rc1/templates/grafana/dashboards-1.14/k8s-resources-workloads-namespace.yaml new file mode 100644 index 00000000..c6548c43 --- /dev/null +++ b/charts/rancher-project-monitoring/0.2.0-rc1/templates/grafana/dashboards-1.14/k8s-resources-workloads-namespace.yaml @@ -0,0 +1,2162 @@ +{{- /* +Generated from 'k8s-resources-workloads-namespace' from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/grafana-dashboardDefinitions.yaml +Do not change in-place! In order to change this file first read following link: +https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack +*/ -}} +{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} +{{- if and (or .Values.grafana.enabled .Values.grafana.forceDeployDashboards) (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.grafana.defaultDashboardsEnabled }} +apiVersion: v1 +kind: ConfigMap +metadata: + namespace: {{ template "project-prometheus-stack.namespace" . }} + name: {{ printf "%s-%s" (include "project-prometheus-stack.fullname" $) "k8s-resources-workloads-namespace" | trunc 63 | trimSuffix "-" }} + annotations: +{{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} + labels: + {{- if $.Values.grafana.sidecar.dashboards.label }} + {{ $.Values.grafana.sidecar.dashboards.label }}: {{ ternary $.Values.grafana.sidecar.dashboards.labelValue "1" (not (empty $.Values.grafana.sidecar.dashboards.labelValue)) | quote }} + {{- end }} + app: {{ template "project-prometheus-stack.name" $ }}-grafana +{{ include "project-prometheus-stack.labels" $ | indent 4 }} +data: + k8s-resources-workloads-namespace.json: |- + { + "annotations": { + "list": [ + + ] + }, + "editable": true, + "gnetId": null, + "graphTooltip": 0, + "hideControls": false, + "links": [ + + ], + "refresh": "10s", + "rows": [ + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 1, + "interval": "1m", + "legend": { + "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "alias": "quota - requests", + "color": "#F2495C", + "dashes": true, + "fill": 0, + "hiddenSeries": true, + "hideTooltip": true, + "legend": true, + "linewidth": 2, + "stack": false + }, + { + "alias": "quota - limits", + "color": "#FF9830", + "dashes": true, + "fill": 0, + "hiddenSeries": true, + "hideTooltip": true, + "legend": true, + "linewidth": 2, + "stack": false + } + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum(\n node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate{namespace=\"$namespace\"}\n* on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}workload{{`}}`}} - {{`{{`}}workload_type{{`}}`}}", + "legendLink": null, + "step": 10 + }, + { + "expr": "scalar(kube_resourcequota{namespace=\"$namespace\", type=\"hard\",resource=\"requests.cpu\"})", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "quota - requests", + "legendLink": null, + "step": 10 + }, + { + "expr": "scalar(kube_resourcequota{namespace=\"$namespace\", type=\"hard\",resource=\"limits.cpu\"})", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "quota - limits", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "CPU Usage", + "tooltip": { + "shared": false, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "CPU Usage", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "id": 2, + "interval": "1m", + "legend": { + "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": false, + "steppedLine": false, + "styles": [ + { + "alias": "Time", + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "pattern": "Time", + "type": "hidden" + }, + { + "alias": "Running Pods", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 0, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #A", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "CPU Usage", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #B", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "CPU Requests", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #C", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "CPU Requests %", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #D", + "thresholds": [ + + ], + "type": "number", + "unit": "percentunit" + }, + { + "alias": "CPU Limits", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #E", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "CPU Limits %", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #F", + "thresholds": [ + + ], + "type": "number", + "unit": "percentunit" + }, + { + "alias": "Workload", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": true, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "d/a164a7f0339f99e89cea5cb47e9be617/k8s-resources-workload?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$namespace&var-workload=$__cell&var-type=$__cell_2", + "pattern": "workload", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "Workload Type", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "workload_type", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "pattern": "/.*/", + "thresholds": [ + + ], + "type": "string", + "unit": "short" + } + ], + "targets": [ + { + "expr": "count(namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload_type=\"$type\"}) by (workload, workload_type)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "A", + "step": 10 + }, + { + "expr": "sum(\n node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate{namespace=\"$namespace\"}\n* on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "B", + "step": 10 + }, + { + "expr": "sum(\n kube_pod_container_resource_requests{namespace=\"$namespace\", resource=\"cpu\"}\n* on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "C", + "step": 10 + }, + { + "expr": "sum(\n node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate{namespace=\"$namespace\"}\n* on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n/sum(\n kube_pod_container_resource_requests{namespace=\"$namespace\", resource=\"cpu\"}\n* on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "D", + "step": 10 + }, + { + "expr": "sum(\n kube_pod_container_resource_limits{namespace=\"$namespace\", resource=\"cpu\"}\n* on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "E", + "step": 10 + }, + { + "expr": "sum(\n node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate{namespace=\"$namespace\"}\n* on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n/sum(\n kube_pod_container_resource_limits{namespace=\"$namespace\", resource=\"cpu\"}\n* on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "F", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "CPU Quota", + "tooltip": { + "shared": false, + "sort": 2, + "value_type": "individual" + }, + "transform": "table", + "type": "table", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "CPU Quota", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 3, + "interval": "1m", + "legend": { + "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "alias": "quota - requests", + "color": "#F2495C", + "dashes": true, + "fill": 0, + "hiddenSeries": true, + "hideTooltip": true, + "legend": true, + "linewidth": 2, + "stack": false + }, + { + "alias": "quota - limits", + "color": "#FF9830", + "dashes": true, + "fill": 0, + "hiddenSeries": true, + "hideTooltip": true, + "legend": true, + "linewidth": 2, + "stack": false + } + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum(\n container_memory_working_set_bytes{namespace=\"$namespace\", container!=\"\", image!=\"\"}\n * on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}workload{{`}}`}} - {{`{{`}}workload_type{{`}}`}}", + "legendLink": null, + "step": 10 + }, + { + "expr": "scalar(kube_resourcequota{namespace=\"$namespace\", type=\"hard\",resource=\"requests.memory\"})", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "quota - requests", + "legendLink": null, + "step": 10 + }, + { + "expr": "scalar(kube_resourcequota{namespace=\"$namespace\", type=\"hard\",resource=\"limits.memory\"})", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "quota - limits", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Memory Usage", + "tooltip": { + "shared": false, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "bytes", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Memory Usage", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "id": 4, + "interval": "1m", + "legend": { + "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": false, + "steppedLine": false, + "styles": [ + { + "alias": "Time", + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "pattern": "Time", + "type": "hidden" + }, + { + "alias": "Running Pods", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 0, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #A", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "Memory Usage", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #B", + "thresholds": [ + + ], + "type": "number", + "unit": "bytes" + }, + { + "alias": "Memory Requests", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #C", + "thresholds": [ + + ], + "type": "number", + "unit": "bytes" + }, + { + "alias": "Memory Requests %", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #D", + "thresholds": [ + + ], + "type": "number", + "unit": "percentunit" + }, + { + "alias": "Memory Limits", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #E", + "thresholds": [ + + ], + "type": "number", + "unit": "bytes" + }, + { + "alias": "Memory Limits %", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #F", + "thresholds": [ + + ], + "type": "number", + "unit": "percentunit" + }, + { + "alias": "Workload", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": true, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "d/a164a7f0339f99e89cea5cb47e9be617/k8s-resources-workload?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$namespace&var-workload=$__cell&var-type=$__cell_2", + "pattern": "workload", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "Workload Type", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "workload_type", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "pattern": "/.*/", + "thresholds": [ + + ], + "type": "string", + "unit": "short" + } + ], + "targets": [ + { + "expr": "count(namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload_type=\"$type\"}) by (workload, workload_type)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "A", + "step": 10 + }, + { + "expr": "sum(\n container_memory_working_set_bytes{namespace=\"$namespace\", container!=\"\", image!=\"\"}\n * on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "B", + "step": 10 + }, + { + "expr": "sum(\n kube_pod_container_resource_requests{namespace=\"$namespace\", resource=\"memory\"}\n* on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "C", + "step": 10 + }, + { + "expr": "sum(\n container_memory_working_set_bytes{namespace=\"$namespace\", container!=\"\", image!=\"\"}\n * on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n/sum(\n kube_pod_container_resource_requests{namespace=\"$namespace\", resource=\"memory\"}\n* on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "D", + "step": 10 + }, + { + "expr": "sum(\n kube_pod_container_resource_limits{namespace=\"$namespace\", resource=\"memory\"}\n* on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "E", + "step": 10 + }, + { + "expr": "sum(\n container_memory_working_set_bytes{namespace=\"$namespace\", container!=\"\", image!=\"\"}\n * on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n/sum(\n kube_pod_container_resource_limits{namespace=\"$namespace\", resource=\"memory\"}\n* on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "F", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Memory Quota", + "tooltip": { + "shared": false, + "sort": 2, + "value_type": "individual" + }, + "transform": "table", + "type": "table", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Memory Quota", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "id": 5, + "interval": "1m", + "legend": { + "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": false, + "steppedLine": false, + "styles": [ + { + "alias": "Time", + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "pattern": "Time", + "type": "hidden" + }, + { + "alias": "Current Receive Bandwidth", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #A", + "thresholds": [ + + ], + "type": "number", + "unit": "Bps" + }, + { + "alias": "Current Transmit Bandwidth", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #B", + "thresholds": [ + + ], + "type": "number", + "unit": "Bps" + }, + { + "alias": "Rate of Received Packets", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #C", + "thresholds": [ + + ], + "type": "number", + "unit": "pps" + }, + { + "alias": "Rate of Transmitted Packets", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #D", + "thresholds": [ + + ], + "type": "number", + "unit": "pps" + }, + { + "alias": "Rate of Received Packets Dropped", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #E", + "thresholds": [ + + ], + "type": "number", + "unit": "pps" + }, + { + "alias": "Rate of Transmitted Packets Dropped", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #F", + "thresholds": [ + + ], + "type": "number", + "unit": "pps" + }, + { + "alias": "Workload", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": true, + "linkTargetBlank": false, + "linkTooltip": "Drill down to pods", + "linkUrl": "d/a164a7f0339f99e89cea5cb47e9be617/k8s-resources-workload?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$namespace&var-workload=$__cell&var-type=$type", + "pattern": "workload", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "Workload Type", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "workload_type", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "pattern": "/.*/", + "thresholds": [ + + ], + "type": "string", + "unit": "short" + } + ], + "targets": [ + { + "expr": "(sum(irate(container_network_receive_bytes_total{namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload_type=\"$type\"}) by (workload))\n", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "A", + "step": 10 + }, + { + "expr": "(sum(irate(container_network_transmit_bytes_total{namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload_type=\"$type\"}) by (workload))\n", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "B", + "step": 10 + }, + { + "expr": "(sum(irate(container_network_receive_packets_total{namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload_type=\"$type\"}) by (workload))\n", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "C", + "step": 10 + }, + { + "expr": "(sum(irate(container_network_transmit_packets_total{namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload_type=\"$type\"}) by (workload))\n", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "D", + "step": 10 + }, + { + "expr": "(sum(irate(container_network_receive_packets_dropped_total{namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload_type=\"$type\"}) by (workload))\n", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "E", + "step": 10 + }, + { + "expr": "(sum(irate(container_network_transmit_packets_dropped_total{namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload_type=\"$type\"}) by (workload))\n", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "F", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Current Network Usage", + "tooltip": { + "shared": false, + "sort": 2, + "value_type": "individual" + }, + "transform": "table", + "type": "table", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Current Network Usage", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 6, + "interval": "1m", + "legend": { + "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "(sum(irate(container_network_receive_bytes_total{namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}workload{{`}}`}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Receive Bandwidth", + "tooltip": { + "shared": false, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 7, + "interval": "1m", + "legend": { + "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "(sum(irate(container_network_transmit_bytes_total{namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}workload{{`}}`}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Transmit Bandwidth", + "tooltip": { + "shared": false, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Bandwidth", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 8, + "interval": "1m", + "legend": { + "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "(avg(irate(container_network_receive_bytes_total{namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}workload{{`}}`}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Average Container Bandwidth by Workload: Received", + "tooltip": { + "shared": false, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 9, + "interval": "1m", + "legend": { + "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "(avg(irate(container_network_transmit_bytes_total{namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}workload{{`}}`}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Average Container Bandwidth by Workload: Transmitted", + "tooltip": { + "shared": false, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Average Container Bandwidth by Workload", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 10, + "interval": "1m", + "legend": { + "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "(sum(irate(container_network_receive_packets_total{namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}workload{{`}}`}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Rate of Received Packets", + "tooltip": { + "shared": false, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "pps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 11, + "interval": "1m", + "legend": { + "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "(sum(irate(container_network_transmit_packets_total{namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}workload{{`}}`}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Rate of Transmitted Packets", + "tooltip": { + "shared": false, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "pps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Rate of Packets", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 12, + "interval": "1m", + "legend": { + "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "(sum(irate(container_network_receive_packets_dropped_total{namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}workload{{`}}`}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Rate of Received Packets Dropped", + "tooltip": { + "shared": false, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "pps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 13, + "interval": "1m", + "legend": { + "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "(sum(irate(container_network_transmit_packets_dropped_total{namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}workload{{`}}`}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Rate of Transmitted Packets Dropped", + "tooltip": { + "shared": false, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "pps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Rate of Packets Dropped", + "titleSize": "h6" + } + ], + "schemaVersion": 14, + "style": "dark", + "tags": [ + "kubernetes-mixin" + ], + "templating": { + "list": [ + { + "current": { + "text": "Prometheus", + "value": "Prometheus" + }, + "hide": 0, + "label": "Data Source", + "name": "datasource", + "options": [ + + ], + "query": "prometheus", + "refresh": 1, + "regex": "", + "type": "datasource" + }, + { + "allValue": null, + "auto": false, + "auto_count": 30, + "auto_min": "10s", + "current": { + "text": "deployment", + "value": "deployment" + }, + "datasource": "$datasource", + "definition": "label_values(namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\".+\"}, workload_type)", + "hide": 0, + "includeAll": false, + "label": null, + "multi": false, + "name": "type", + "options": [ + + ], + "query": "label_values(namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\".+\"}, workload_type)", + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "current": { + "text": "", + "value": "" + }, + "datasource": "$datasource", + "hide": 0, + "includeAll": false, + "label": null, + "multi": false, + "name": "namespace", + "options": [ + + ], + "query": "label_values(kube_pod_info, namespace)", + "refresh": 2, + "regex": "", + "sort": 1, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "query", + "useTags": false + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + "timezone": "{{ .Values.grafana.defaultDashboardsTimezone }}", + "title": "Kubernetes / Compute Resources / Namespace (Workloads)", + "uid": "a87fb0d919ec0ea5f6543124e16c42a5", + "version": 0 + } +{{- end }} \ No newline at end of file diff --git a/charts/rancher-project-monitoring/0.2.0-rc1/templates/grafana/dashboards-1.14/namespace-by-pod.yaml b/charts/rancher-project-monitoring/0.2.0-rc1/templates/grafana/dashboards-1.14/namespace-by-pod.yaml new file mode 100644 index 00000000..0d4fdc0f --- /dev/null +++ b/charts/rancher-project-monitoring/0.2.0-rc1/templates/grafana/dashboards-1.14/namespace-by-pod.yaml @@ -0,0 +1,1438 @@ +{{- /* +Generated from 'namespace-by-pod' from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/grafana-dashboardDefinitions.yaml +Do not change in-place! In order to change this file first read following link: +https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack +*/ -}} +{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} +{{- if and (or .Values.grafana.enabled .Values.grafana.forceDeployDashboards) (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.grafana.defaultDashboardsEnabled }} +apiVersion: v1 +kind: ConfigMap +metadata: + namespace: {{ template "project-prometheus-stack.namespace" . }} + name: {{ printf "%s-%s" (include "project-prometheus-stack.fullname" $) "namespace-by-pod" | trunc 63 | trimSuffix "-" }} + annotations: +{{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} + labels: + {{- if $.Values.grafana.sidecar.dashboards.label }} + {{ $.Values.grafana.sidecar.dashboards.label }}: {{ ternary $.Values.grafana.sidecar.dashboards.labelValue "1" (not (empty $.Values.grafana.sidecar.dashboards.labelValue)) | quote }} + {{- end }} + app: {{ template "project-prometheus-stack.name" $ }}-grafana +{{ include "project-prometheus-stack.labels" $ | indent 4 }} +data: + namespace-by-pod.json: |- + { + "__inputs": [ + + ], + "__requires": [ + + ], + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": "-- Grafana --", + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "gnetId": null, + "graphTooltip": 0, + "hideControls": false, + "id": null, + "links": [ + + ], + "panels": [ + { + "collapse": false, + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 2, + "panels": [ + + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Current Bandwidth", + "titleSize": "h6", + "type": "row" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "$datasource", + "decimals": 0, + "format": "time_series", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 9, + "w": 12, + "x": 0, + "y": 1 + }, + "height": 9, + "id": 3, + "interval": null, + "links": [ + + ], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "minSpan": 12, + "nullPointMode": "connected", + "nullText": null, + "options": { + "fieldOptions": { + "calcs": [ + "last" + ], + "defaults": { + "max": 10000000000, + "min": 0, + "title": "$namespace", + "unit": "Bps" + }, + "mappings": [ + + ], + "override": { + + }, + "thresholds": [ + { + "color": "dark-green", + "index": 0, + "value": null + }, + { + "color": "dark-yellow", + "index": 1, + "value": 5000000000 + }, + { + "color": "dark-red", + "index": 2, + "value": 7000000000 + } + ], + "values": false + } + }, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "span": 12, + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "expr": "sum(irate(container_network_receive_bytes_total{namespace=~\"$namespace\"}[$interval:$resolution]))", + "format": "time_series", + "instant": null, + "intervalFactor": 1, + "legendFormat": "", + "refId": "A" + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Current Rate of Bytes Received", + "type": "gauge", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "$datasource", + "decimals": 0, + "format": "time_series", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 9, + "w": 12, + "x": 12, + "y": 1 + }, + "height": 9, + "id": 4, + "interval": null, + "links": [ + + ], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "minSpan": 12, + "nullPointMode": "connected", + "nullText": null, + "options": { + "fieldOptions": { + "calcs": [ + "last" + ], + "defaults": { + "max": 10000000000, + "min": 0, + "title": "$namespace", + "unit": "Bps" + }, + "mappings": [ + + ], + "override": { + + }, + "thresholds": [ + { + "color": "dark-green", + "index": 0, + "value": null + }, + { + "color": "dark-yellow", + "index": 1, + "value": 5000000000 + }, + { + "color": "dark-red", + "index": 2, + "value": 7000000000 + } + ], + "values": false + } + }, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "span": 12, + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "expr": "sum(irate(container_network_transmit_bytes_total{namespace=~\"$namespace\"}[$interval:$resolution]))", + "format": "time_series", + "instant": null, + "intervalFactor": 1, + "legendFormat": "", + "refId": "A" + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Current Rate of Bytes Transmitted", + "type": "gauge", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + }, + { + "columns": [ + { + "text": "Time", + "value": "Time" + }, + { + "text": "Value #A", + "value": "Value #A" + }, + { + "text": "Value #B", + "value": "Value #B" + }, + { + "text": "Value #C", + "value": "Value #C" + }, + { + "text": "Value #D", + "value": "Value #D" + }, + { + "text": "Value #E", + "value": "Value #E" + }, + { + "text": "Value #F", + "value": "Value #F" + }, + { + "text": "pod", + "value": "pod" + } + ], + "datasource": "$datasource", + "fill": 1, + "fontSize": "100%", + "gridPos": { + "h": 9, + "w": 24, + "x": 0, + "y": 10 + }, + "id": 5, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "minSpan": 24, + "nullPointMode": "null as zero", + "renderer": "flot", + "scroll": true, + "showHeader": true, + "sort": { + "col": 0, + "desc": false + }, + "spaceLength": 10, + "span": 24, + "styles": [ + { + "alias": "Time", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Time", + "thresholds": [ + + ], + "type": "hidden", + "unit": "short" + }, + { + "alias": "Bandwidth Received", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #A", + "thresholds": [ + + ], + "type": "number", + "unit": "Bps" + }, + { + "alias": "Bandwidth Transmitted", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #B", + "thresholds": [ + + ], + "type": "number", + "unit": "Bps" + }, + { + "alias": "Rate of Received Packets", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #C", + "thresholds": [ + + ], + "type": "number", + "unit": "pps" + }, + { + "alias": "Rate of Transmitted Packets", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #D", + "thresholds": [ + + ], + "type": "number", + "unit": "pps" + }, + { + "alias": "Rate of Received Packets Dropped", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #E", + "thresholds": [ + + ], + "type": "number", + "unit": "pps" + }, + { + "alias": "Rate of Transmitted Packets Dropped", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #F", + "thresholds": [ + + ], + "type": "number", + "unit": "pps" + }, + { + "alias": "Pod", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": true, + "linkTooltip": "Drill down", + "linkUrl": "d/7a18067ce943a40ae25454675c19ff5c/kubernetes-networking-pod?orgId=1&refresh=30s&var-namespace=$namespace&var-pod=$__cell", + "pattern": "pod", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + } + ], + "targets": [ + { + "expr": "sum(irate(container_network_receive_bytes_total{namespace=~\"$namespace\"}[$interval:$resolution])) by (pod)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "A", + "step": 10 + }, + { + "expr": "sum(irate(container_network_transmit_bytes_total{namespace=~\"$namespace\"}[$interval:$resolution])) by (pod)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "B", + "step": 10 + }, + { + "expr": "sum(irate(container_network_receive_packets_total{namespace=~\"$namespace\"}[$interval:$resolution])) by (pod)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "C", + "step": 10 + }, + { + "expr": "sum(irate(container_network_transmit_packets_total{namespace=~\"$namespace\"}[$interval:$resolution])) by (pod)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "D", + "step": 10 + }, + { + "expr": "sum(irate(container_network_receive_packets_dropped_total{namespace=~\"$namespace\"}[$interval:$resolution])) by (pod)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "E", + "step": 10 + }, + { + "expr": "sum(irate(container_network_transmit_packets_dropped_total{namespace=~\"$namespace\"}[$interval:$resolution])) by (pod)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "F", + "step": 10 + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Current Status", + "type": "table" + }, + { + "collapse": false, + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 19 + }, + "id": 6, + "panels": [ + + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Bandwidth", + "titleSize": "h6", + "type": "row" + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 12, + "x": 0, + "y": 20 + }, + "id": 7, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "hideEmpty": true, + "hideZero": true, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "sideWidth": null, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 2, + "links": [ + + ], + "minSpan": 12, + "nullPointMode": "connected", + "paceLength": 10, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum(irate(container_network_receive_bytes_total{namespace=~\"$namespace\"}[$interval:$resolution])) by (pod)", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{`{{`}}pod{{`}}`}}", + "refId": "A", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Receive Bandwidth", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 12, + "x": 12, + "y": 20 + }, + "id": 8, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "hideEmpty": true, + "hideZero": true, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "sideWidth": null, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 2, + "links": [ + + ], + "minSpan": 12, + "nullPointMode": "connected", + "paceLength": 10, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum(irate(container_network_transmit_bytes_total{namespace=~\"$namespace\"}[$interval:$resolution])) by (pod)", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{`{{`}}pod{{`}}`}}", + "refId": "A", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Transmit Bandwidth", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + }, + { + "collapse": true, + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 29 + }, + "id": 9, + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 0, + "y": 30 + }, + "id": 10, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "hideEmpty": true, + "hideZero": true, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "sideWidth": null, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 2, + "links": [ + + ], + "minSpan": 12, + "nullPointMode": "connected", + "paceLength": 10, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum(irate(container_network_receive_packets_total{namespace=~\"$namespace\"}[$interval:$resolution])) by (pod)", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{`{{`}}pod{{`}}`}}", + "refId": "A", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Rate of Received Packets", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "pps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "pps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 12, + "y": 30 + }, + "id": 11, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "hideEmpty": true, + "hideZero": true, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "sideWidth": null, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 2, + "links": [ + + ], + "minSpan": 12, + "nullPointMode": "connected", + "paceLength": 10, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum(irate(container_network_transmit_packets_total{namespace=~\"$namespace\"}[$interval:$resolution])) by (pod)", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{`{{`}}pod{{`}}`}}", + "refId": "A", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Rate of Transmitted Packets", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "pps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "pps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Packets", + "titleSize": "h6", + "type": "row" + }, + { + "collapse": true, + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 30 + }, + "id": 12, + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 0, + "y": 40 + }, + "id": 13, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "hideEmpty": true, + "hideZero": true, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "sideWidth": null, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 2, + "links": [ + + ], + "minSpan": 12, + "nullPointMode": "connected", + "paceLength": 10, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum(irate(container_network_receive_packets_dropped_total{namespace=~\"$namespace\"}[$interval:$resolution])) by (pod)", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{`{{`}}pod{{`}}`}}", + "refId": "A", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Rate of Received Packets Dropped", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "pps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "pps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 12, + "y": 40 + }, + "id": 14, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "hideEmpty": true, + "hideZero": true, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "sideWidth": null, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 2, + "links": [ + + ], + "minSpan": 12, + "nullPointMode": "connected", + "paceLength": 10, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum(irate(container_network_transmit_packets_dropped_total{namespace=~\"$namespace\"}[$interval:$resolution])) by (pod)", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{`{{`}}pod{{`}}`}}", + "refId": "A", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Rate of Transmitted Packets Dropped", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "pps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "pps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Errors", + "titleSize": "h6", + "type": "row" + } + ], + "refresh": "10s", + "rows": [ + + ], + "schemaVersion": 18, + "style": "dark", + "tags": [ + "kubernetes-mixin" + ], + "templating": { + "list": [ + { + "current": { + "text": "Prometheus", + "value": "Prometheus" + }, + "hide": 0, + "label": "Data Source", + "name": "datasource", + "options": [ + + ], + "query": "prometheus", + "refresh": 1, + "regex": "", + "type": "datasource" + }, + { + "allValue": ".+", + "auto": false, + "auto_count": 30, + "auto_min": "10s", + "current": { + "text": "kube-system", + "value": "kube-system" + }, + "datasource": "$datasource", + "definition": "label_values(container_network_receive_packets_total, namespace)", + "hide": 0, + "includeAll": true, + "label": null, + "multi": false, + "name": "namespace", + "options": [ + + ], + "query": "label_values(container_network_receive_packets_total, namespace)", + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "auto": false, + "auto_count": 30, + "auto_min": "10s", + "current": { + "text": "5m", + "value": "5m" + }, + "datasource": "$datasource", + "hide": 0, + "includeAll": false, + "label": null, + "multi": false, + "name": "resolution", + "options": [ + { + "selected": false, + "text": "30s", + "value": "30s" + }, + { + "selected": true, + "text": "5m", + "value": "5m" + }, + { + "selected": false, + "text": "1h", + "value": "1h" + } + ], + "query": "30s,5m,1h", + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "interval", + "useTags": false + }, + { + "allValue": null, + "auto": false, + "auto_count": 30, + "auto_min": "10s", + "current": { + "text": "5m", + "value": "5m" + }, + "datasource": "$datasource", + "hide": 2, + "includeAll": false, + "label": null, + "multi": false, + "name": "interval", + "options": [ + { + "selected": true, + "text": "4h", + "value": "4h" + } + ], + "query": "4h", + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "interval", + "useTags": false + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + "timezone": "{{ .Values.grafana.defaultDashboardsTimezone }}", + "title": "Kubernetes / Networking / Namespace (Pods)", + "uid": "8b7a8b326d7a6f1f04244066368c67af", + "version": 0 + } +{{- end }} \ No newline at end of file diff --git a/charts/rancher-project-monitoring/0.2.0-rc1/templates/grafana/dashboards-1.14/namespace-by-workload.yaml b/charts/rancher-project-monitoring/0.2.0-rc1/templates/grafana/dashboards-1.14/namespace-by-workload.yaml new file mode 100644 index 00000000..aa2a3573 --- /dev/null +++ b/charts/rancher-project-monitoring/0.2.0-rc1/templates/grafana/dashboards-1.14/namespace-by-workload.yaml @@ -0,0 +1,1710 @@ +{{- /* +Generated from 'namespace-by-workload' from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/grafana-dashboardDefinitions.yaml +Do not change in-place! In order to change this file first read following link: +https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack +*/ -}} +{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} +{{- if and (or .Values.grafana.enabled .Values.grafana.forceDeployDashboards) (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.grafana.defaultDashboardsEnabled }} +apiVersion: v1 +kind: ConfigMap +metadata: + namespace: {{ template "project-prometheus-stack.namespace" . }} + name: {{ printf "%s-%s" (include "project-prometheus-stack.fullname" $) "namespace-by-workload" | trunc 63 | trimSuffix "-" }} + annotations: +{{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} + labels: + {{- if $.Values.grafana.sidecar.dashboards.label }} + {{ $.Values.grafana.sidecar.dashboards.label }}: {{ ternary $.Values.grafana.sidecar.dashboards.labelValue "1" (not (empty $.Values.grafana.sidecar.dashboards.labelValue)) | quote }} + {{- end }} + app: {{ template "project-prometheus-stack.name" $ }}-grafana +{{ include "project-prometheus-stack.labels" $ | indent 4 }} +data: + namespace-by-workload.json: |- + { + "__inputs": [ + + ], + "__requires": [ + + ], + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": "-- Grafana --", + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "gnetId": null, + "graphTooltip": 0, + "hideControls": false, + "id": null, + "links": [ + + ], + "panels": [ + { + "collapse": false, + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 2, + "panels": [ + + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Current Bandwidth", + "titleSize": "h6", + "type": "row" + }, + { + "aliasColors": { + + }, + "bars": true, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 12, + "x": 0, + "y": 1 + }, + "id": 3, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "hideEmpty": true, + "hideZero": true, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "sideWidth": null, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": false, + "linewidth": 1, + "links": [ + + ], + "minSpan": 24, + "nullPointMode": "null", + "paceLength": 10, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 24, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sort_desc(sum(irate(container_network_receive_bytes_total{namespace=\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{`{{`}} workload {{`}}`}}", + "refId": "A", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Current Rate of Bytes Received", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "series", + "name": null, + "show": false, + "values": [ + "current" + ] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + }, + { + "aliasColors": { + + }, + "bars": true, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 12, + "x": 12, + "y": 1 + }, + "id": 4, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "hideEmpty": true, + "hideZero": true, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "sideWidth": null, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": false, + "linewidth": 1, + "links": [ + + ], + "minSpan": 24, + "nullPointMode": "null", + "paceLength": 10, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 24, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sort_desc(sum(irate(container_network_transmit_bytes_total{namespace=\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{`{{`}} workload {{`}}`}}", + "refId": "A", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Current Rate of Bytes Transmitted", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "series", + "name": null, + "show": false, + "values": [ + "current" + ] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + }, + { + "columns": [ + { + "text": "Time", + "value": "Time" + }, + { + "text": "Value #A", + "value": "Value #A" + }, + { + "text": "Value #B", + "value": "Value #B" + }, + { + "text": "Value #C", + "value": "Value #C" + }, + { + "text": "Value #D", + "value": "Value #D" + }, + { + "text": "Value #E", + "value": "Value #E" + }, + { + "text": "Value #F", + "value": "Value #F" + }, + { + "text": "Value #G", + "value": "Value #G" + }, + { + "text": "Value #H", + "value": "Value #H" + }, + { + "text": "workload", + "value": "workload" + } + ], + "datasource": "$datasource", + "fill": 1, + "fontSize": "90%", + "gridPos": { + "h": 9, + "w": 24, + "x": 0, + "y": 10 + }, + "id": 5, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "minSpan": 24, + "nullPointMode": "null as zero", + "renderer": "flot", + "scroll": true, + "showHeader": true, + "sort": { + "col": 0, + "desc": false + }, + "spaceLength": 10, + "span": 24, + "styles": [ + { + "alias": "Time", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Time", + "thresholds": [ + + ], + "type": "hidden", + "unit": "short" + }, + { + "alias": "Current Bandwidth Received", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #A", + "thresholds": [ + + ], + "type": "number", + "unit": "Bps" + }, + { + "alias": "Current Bandwidth Transmitted", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #B", + "thresholds": [ + + ], + "type": "number", + "unit": "Bps" + }, + { + "alias": "Average Bandwidth Received", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #C", + "thresholds": [ + + ], + "type": "number", + "unit": "Bps" + }, + { + "alias": "Average Bandwidth Transmitted", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #D", + "thresholds": [ + + ], + "type": "number", + "unit": "Bps" + }, + { + "alias": "Rate of Received Packets", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #E", + "thresholds": [ + + ], + "type": "number", + "unit": "pps" + }, + { + "alias": "Rate of Transmitted Packets", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #F", + "thresholds": [ + + ], + "type": "number", + "unit": "pps" + }, + { + "alias": "Rate of Received Packets Dropped", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #G", + "thresholds": [ + + ], + "type": "number", + "unit": "pps" + }, + { + "alias": "Rate of Transmitted Packets Dropped", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #H", + "thresholds": [ + + ], + "type": "number", + "unit": "pps" + }, + { + "alias": "Workload", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": true, + "linkTooltip": "Drill down", + "linkUrl": "d/728bf77cc1166d2f3133bf25846876cc/kubernetes-networking-workload?orgId=1&refresh=30s&var-namespace=$namespace&var-type=$type&var-workload=$__cell", + "pattern": "workload", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + } + ], + "targets": [ + { + "expr": "sort_desc(sum(irate(container_network_receive_bytes_total{namespace=\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "A", + "step": 10 + }, + { + "expr": "sort_desc(sum(irate(container_network_transmit_bytes_total{namespace=\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "B", + "step": 10 + }, + { + "expr": "sort_desc(avg(irate(container_network_receive_bytes_total{namespace=\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "C", + "step": 10 + }, + { + "expr": "sort_desc(avg(irate(container_network_transmit_bytes_total{namespace=\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "D", + "step": 10 + }, + { + "expr": "sort_desc(sum(irate(container_network_receive_packets_total{namespace=\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "E", + "step": 10 + }, + { + "expr": "sort_desc(sum(irate(container_network_transmit_packets_total{namespace=\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "F", + "step": 10 + }, + { + "expr": "sort_desc(sum(irate(container_network_receive_packets_dropped_total{namespace=\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "G", + "step": 10 + }, + { + "expr": "sort_desc(sum(irate(container_network_transmit_packets_dropped_total{namespace=\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "H", + "step": 10 + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Current Status", + "type": "table" + }, + { + "collapse": true, + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 19 + }, + "id": 6, + "panels": [ + { + "aliasColors": { + + }, + "bars": true, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 12, + "x": 0, + "y": 20 + }, + "id": 7, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "hideEmpty": true, + "hideZero": true, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "sideWidth": null, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": false, + "linewidth": 1, + "links": [ + + ], + "minSpan": 24, + "nullPointMode": "null", + "paceLength": 10, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 24, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sort_desc(avg(irate(container_network_receive_bytes_total{namespace=\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{`{{`}} workload {{`}}`}}", + "refId": "A", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Average Rate of Bytes Received", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "series", + "name": null, + "show": false, + "values": [ + "current" + ] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + }, + { + "aliasColors": { + + }, + "bars": true, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 12, + "x": 12, + "y": 20 + }, + "id": 8, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "hideEmpty": true, + "hideZero": true, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "sideWidth": null, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": false, + "linewidth": 1, + "links": [ + + ], + "minSpan": 24, + "nullPointMode": "null", + "paceLength": 10, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 24, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sort_desc(avg(irate(container_network_transmit_bytes_total{namespace=\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{`{{`}} workload {{`}}`}}", + "refId": "A", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Average Rate of Bytes Transmitted", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "series", + "name": null, + "show": false, + "values": [ + "current" + ] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Average Bandwidth", + "titleSize": "h6", + "type": "row" + }, + { + "collapse": false, + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 29 + }, + "id": 9, + "panels": [ + + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Bandwidth HIstory", + "titleSize": "h6", + "type": "row" + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 12, + "x": 0, + "y": 38 + }, + "id": 10, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "hideEmpty": true, + "hideZero": true, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "sideWidth": null, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 2, + "links": [ + + ], + "minSpan": 12, + "nullPointMode": "connected", + "paceLength": 10, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sort_desc(sum(irate(container_network_receive_bytes_total{namespace=\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{`{{`}}workload{{`}}`}}", + "refId": "A", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Receive Bandwidth", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 12, + "x": 12, + "y": 38 + }, + "id": 11, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "hideEmpty": true, + "hideZero": true, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "sideWidth": null, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 2, + "links": [ + + ], + "minSpan": 12, + "nullPointMode": "connected", + "paceLength": 10, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sort_desc(sum(irate(container_network_transmit_bytes_total{namespace=\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{`{{`}}workload{{`}}`}}", + "refId": "A", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Transmit Bandwidth", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + }, + { + "collapse": true, + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 39 + }, + "id": 12, + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 12, + "x": 0, + "y": 40 + }, + "id": 13, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "hideEmpty": true, + "hideZero": true, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "sideWidth": null, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 2, + "links": [ + + ], + "minSpan": 12, + "nullPointMode": "connected", + "paceLength": 10, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sort_desc(sum(irate(container_network_receive_packets_total{namespace=\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{`{{`}}workload{{`}}`}}", + "refId": "A", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Rate of Received Packets", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "pps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "pps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 12, + "x": 12, + "y": 40 + }, + "id": 14, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "hideEmpty": true, + "hideZero": true, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "sideWidth": null, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 2, + "links": [ + + ], + "minSpan": 12, + "nullPointMode": "connected", + "paceLength": 10, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sort_desc(sum(irate(container_network_transmit_packets_total{namespace=\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{`{{`}}workload{{`}}`}}", + "refId": "A", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Rate of Transmitted Packets", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "pps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "pps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Packets", + "titleSize": "h6", + "type": "row" + }, + { + "collapse": true, + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 40 + }, + "id": 15, + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 12, + "x": 0, + "y": 41 + }, + "id": 16, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "hideEmpty": true, + "hideZero": true, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "sideWidth": null, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 2, + "links": [ + + ], + "minSpan": 12, + "nullPointMode": "connected", + "paceLength": 10, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sort_desc(sum(irate(container_network_receive_packets_dropped_total{namespace=\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{`{{`}}workload{{`}}`}}", + "refId": "A", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Rate of Received Packets Dropped", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "pps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "pps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 12, + "x": 12, + "y": 41 + }, + "id": 17, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "hideEmpty": true, + "hideZero": true, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "sideWidth": null, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 2, + "links": [ + + ], + "minSpan": 12, + "nullPointMode": "connected", + "paceLength": 10, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sort_desc(sum(irate(container_network_transmit_packets_dropped_total{namespace=\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{`{{`}}workload{{`}}`}}", + "refId": "A", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Rate of Transmitted Packets Dropped", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "pps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "pps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Errors", + "titleSize": "h6", + "type": "row" + } + ], + "refresh": "10s", + "rows": [ + + ], + "schemaVersion": 18, + "style": "dark", + "tags": [ + "kubernetes-mixin" + ], + "templating": { + "list": [ + { + "current": { + "text": "Prometheus", + "value": "Prometheus" + }, + "hide": 0, + "label": "Data Source", + "name": "datasource", + "options": [ + + ], + "query": "prometheus", + "refresh": 1, + "regex": "", + "type": "datasource" + }, + { + "allValue": null, + "auto": false, + "auto_count": 30, + "auto_min": "10s", + "current": { + "text": "kube-system", + "value": "kube-system" + }, + "datasource": "$datasource", + "definition": "label_values(container_network_receive_packets_total, namespace)", + "hide": 0, + "includeAll": false, + "label": null, + "multi": false, + "name": "namespace", + "options": [ + + ], + "query": "label_values(container_network_receive_packets_total, namespace)", + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "auto": false, + "auto_count": 30, + "auto_min": "10s", + "current": { + "text": "deployment", + "value": "deployment" + }, + "datasource": "$datasource", + "definition": "label_values(namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\".+\"}, workload_type)", + "hide": 0, + "includeAll": false, + "label": null, + "multi": false, + "name": "type", + "options": [ + + ], + "query": "label_values(namespace_workload_pod:kube_pod_owner:relabel{namespace=\"$namespace\", workload=~\".+\"}, workload_type)", + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "auto": false, + "auto_count": 30, + "auto_min": "10s", + "current": { + "text": "5m", + "value": "5m" + }, + "datasource": "$datasource", + "hide": 0, + "includeAll": false, + "label": null, + "multi": false, + "name": "resolution", + "options": [ + { + "selected": false, + "text": "30s", + "value": "30s" + }, + { + "selected": true, + "text": "5m", + "value": "5m" + }, + { + "selected": false, + "text": "1h", + "value": "1h" + } + ], + "query": "30s,5m,1h", + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "interval", + "useTags": false + }, + { + "allValue": null, + "auto": false, + "auto_count": 30, + "auto_min": "10s", + "current": { + "text": "5m", + "value": "5m" + }, + "datasource": "$datasource", + "hide": 2, + "includeAll": false, + "label": null, + "multi": false, + "name": "interval", + "options": [ + { + "selected": true, + "text": "4h", + "value": "4h" + } + ], + "query": "4h", + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "interval", + "useTags": false + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + "timezone": "{{ .Values.grafana.defaultDashboardsTimezone }}", + "title": "Kubernetes / Networking / Namespace (Workload)", + "uid": "bbb2a765a623ae38130206c7d94a160f", + "version": 0 + } +{{- end }} \ No newline at end of file diff --git a/charts/rancher-project-monitoring/0.2.0-rc1/templates/grafana/dashboards-1.14/persistentvolumesusage.yaml b/charts/rancher-project-monitoring/0.2.0-rc1/templates/grafana/dashboards-1.14/persistentvolumesusage.yaml new file mode 100644 index 00000000..cd599c62 --- /dev/null +++ b/charts/rancher-project-monitoring/0.2.0-rc1/templates/grafana/dashboards-1.14/persistentvolumesusage.yaml @@ -0,0 +1,561 @@ +{{- /* +Generated from 'persistentvolumesusage' from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/grafana-dashboardDefinitions.yaml +Do not change in-place! In order to change this file first read following link: +https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack +*/ -}} +{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} +{{- if and (or .Values.grafana.enabled .Values.grafana.forceDeployDashboards) (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.grafana.defaultDashboardsEnabled }} +apiVersion: v1 +kind: ConfigMap +metadata: + namespace: {{ template "project-prometheus-stack.namespace" . }} + name: {{ printf "%s-%s" (include "project-prometheus-stack.fullname" $) "persistentvolumesusage" | trunc 63 | trimSuffix "-" }} + annotations: +{{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} + labels: + {{- if $.Values.grafana.sidecar.dashboards.label }} + {{ $.Values.grafana.sidecar.dashboards.label }}: {{ ternary $.Values.grafana.sidecar.dashboards.labelValue "1" (not (empty $.Values.grafana.sidecar.dashboards.labelValue)) | quote }} + {{- end }} + app: {{ template "project-prometheus-stack.name" $ }}-grafana +{{ include "project-prometheus-stack.labels" $ | indent 4 }} +data: + persistentvolumesusage.json: |- + { + "__inputs": [ + + ], + "__requires": [ + + ], + "annotations": { + "list": [ + + ] + }, + "editable": false, + "gnetId": null, + "graphTooltip": 0, + "hideControls": false, + "id": null, + "links": [ + + ], + "refresh": "10s", + "rows": [ + { + "collapse": false, + "collapsed": false, + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "fillGradient": 0, + "gridPos": { + + }, + "id": 2, + "interval": "1m", + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": true, + "rightSide": true, + "show": true, + "sideWidth": null, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 9, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "(\n sum without(instance, node) (topk(1, (kubelet_volume_stats_capacity_bytes{metrics_path=\"/metrics\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"})))\n -\n sum without(instance, node) (topk(1, (kubelet_volume_stats_available_bytes{metrics_path=\"/metrics\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"})))\n)\n", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "Used Space", + "refId": "A" + }, + { + "expr": "sum without(instance, node) (topk(1, (kubelet_volume_stats_available_bytes{metrics_path=\"/metrics\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"})))\n", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "Free Space", + "refId": "B" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Volume Space Usage", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "bytes", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "bytes", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "rgba(50, 172, 45, 0.97)", + "rgba(237, 129, 40, 0.89)", + "rgba(245, 54, 54, 0.9)" + ], + "datasource": "$datasource", + "format": "percent", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": true, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + + }, + "id": 3, + "interval": "1m", + "legend": { + "alignAsTable": true, + "rightSide": true + }, + "links": [ + + ], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "span": 3, + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "expr": "max without(instance,node) (\n(\n topk(1, kubelet_volume_stats_capacity_bytes{metrics_path=\"/metrics\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"})\n -\n topk(1, kubelet_volume_stats_available_bytes{metrics_path=\"/metrics\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"})\n)\n/\ntopk(1, kubelet_volume_stats_capacity_bytes{metrics_path=\"/metrics\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"})\n* 100)\n", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "", + "refId": "A" + } + ], + "thresholds": "80, 90", + "title": "Volume Space Usage", + "tooltip": { + "shared": false + }, + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": false, + "title": "Dashboard Row", + "titleSize": "h6", + "type": "row" + }, + { + "collapse": false, + "collapsed": false, + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "fillGradient": 0, + "gridPos": { + + }, + "id": 4, + "interval": "1m", + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": true, + "rightSide": true, + "show": true, + "sideWidth": null, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 9, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum without(instance, node) (topk(1, (kubelet_volume_stats_inodes_used{metrics_path=\"/metrics\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"})))\n", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "Used inodes", + "refId": "A" + }, + { + "expr": "(\n sum without(instance, node) (topk(1, (kubelet_volume_stats_inodes{metrics_path=\"/metrics\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"})))\n -\n sum without(instance, node) (topk(1, (kubelet_volume_stats_inodes_used{metrics_path=\"/metrics\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"})))\n)\n", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": " Free inodes", + "refId": "B" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Volume inodes Usage", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "none", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "none", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "rgba(50, 172, 45, 0.97)", + "rgba(237, 129, 40, 0.89)", + "rgba(245, 54, 54, 0.9)" + ], + "datasource": "$datasource", + "format": "percent", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": true, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + + }, + "id": 5, + "interval": "1m", + "legend": { + "alignAsTable": true, + "rightSide": true + }, + "links": [ + + ], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "span": 3, + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "expr": "max without(instance,node) (\ntopk(1, kubelet_volume_stats_inodes_used{metrics_path=\"/metrics\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"})\n/\ntopk(1, kubelet_volume_stats_inodes{metrics_path=\"/metrics\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"})\n* 100)\n", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "", + "refId": "A" + } + ], + "thresholds": "80, 90", + "title": "Volume inodes Usage", + "tooltip": { + "shared": false + }, + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": false, + "title": "Dashboard Row", + "titleSize": "h6", + "type": "row" + } + ], + "schemaVersion": 14, + "style": "dark", + "tags": [ + "kubernetes-mixin" + ], + "templating": { + "list": [ + { + "current": { + "text": "Prometheus", + "value": "Prometheus" + }, + "hide": 0, + "label": "Data Source", + "name": "datasource", + "options": [ + + ], + "query": "prometheus", + "refresh": 1, + "regex": "", + "type": "datasource" + }, + { + "allValue": null, + "current": { + + }, + "datasource": "$datasource", + "hide": 0, + "includeAll": false, + "label": "Namespace", + "multi": false, + "name": "namespace", + "options": [ + + ], + "query": "label_values(kubelet_volume_stats_capacity_bytes{metrics_path=\"/metrics\"}, namespace)", + "refresh": 2, + "regex": "", + "sort": 1, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "current": { + + }, + "datasource": "$datasource", + "hide": 0, + "includeAll": false, + "label": "PersistentVolumeClaim", + "multi": false, + "name": "volume", + "options": [ + + ], + "query": "label_values(kubelet_volume_stats_capacity_bytes{metrics_path=\"/metrics\", namespace=\"$namespace\"}, persistentvolumeclaim)", + "refresh": 2, + "regex": "", + "sort": 1, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "query", + "useTags": false + } + ] + }, + "time": { + "from": "now-7d", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + "timezone": "{{ .Values.grafana.defaultDashboardsTimezone }}", + "title": "Kubernetes / Persistent Volumes", + "uid": "919b92a8e8041bd567af9edab12c840c", + "version": 0 + } +{{- end }} \ No newline at end of file diff --git a/charts/rancher-project-monitoring/0.2.0-rc1/templates/grafana/dashboards-1.14/pod-total.yaml b/charts/rancher-project-monitoring/0.2.0-rc1/templates/grafana/dashboards-1.14/pod-total.yaml new file mode 100644 index 00000000..48b0db9b --- /dev/null +++ b/charts/rancher-project-monitoring/0.2.0-rc1/templates/grafana/dashboards-1.14/pod-total.yaml @@ -0,0 +1,1202 @@ +{{- /* +Generated from 'pod-total' from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/grafana-dashboardDefinitions.yaml +Do not change in-place! In order to change this file first read following link: +https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack +*/ -}} +{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} +{{- if and (or .Values.grafana.enabled .Values.grafana.forceDeployDashboards) (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.grafana.defaultDashboardsEnabled }} +apiVersion: v1 +kind: ConfigMap +metadata: + namespace: {{ template "project-prometheus-stack.namespace" . }} + name: {{ printf "%s-%s" (include "project-prometheus-stack.fullname" $) "pod-total" | trunc 63 | trimSuffix "-" }} + annotations: +{{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} + labels: + {{- if $.Values.grafana.sidecar.dashboards.label }} + {{ $.Values.grafana.sidecar.dashboards.label }}: {{ ternary $.Values.grafana.sidecar.dashboards.labelValue "1" (not (empty $.Values.grafana.sidecar.dashboards.labelValue)) | quote }} + {{- end }} + app: {{ template "project-prometheus-stack.name" $ }}-grafana +{{ include "project-prometheus-stack.labels" $ | indent 4 }} +data: + pod-total.json: |- + { + "__inputs": [ + + ], + "__requires": [ + + ], + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": "-- Grafana --", + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "gnetId": null, + "graphTooltip": 0, + "hideControls": false, + "id": null, + "links": [ + + ], + "panels": [ + { + "collapse": false, + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 2, + "panels": [ + + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Current Bandwidth", + "titleSize": "h6", + "type": "row" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "$datasource", + "decimals": 0, + "format": "time_series", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 9, + "w": 12, + "x": 0, + "y": 1 + }, + "height": 9, + "id": 3, + "interval": null, + "links": [ + + ], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "minSpan": 12, + "nullPointMode": "connected", + "nullText": null, + "options": { + "fieldOptions": { + "calcs": [ + "last" + ], + "defaults": { + "max": 10000000000, + "min": 0, + "title": "$namespace: $pod", + "unit": "Bps" + }, + "mappings": [ + + ], + "override": { + + }, + "thresholds": [ + { + "color": "dark-green", + "index": 0, + "value": null + }, + { + "color": "dark-yellow", + "index": 1, + "value": 5000000000 + }, + { + "color": "dark-red", + "index": 2, + "value": 7000000000 + } + ], + "values": false + } + }, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "span": 12, + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "expr": "sum(irate(container_network_receive_bytes_total{namespace=~\"$namespace\", pod=~\"$pod\"}[$interval:$resolution]))", + "format": "time_series", + "instant": null, + "intervalFactor": 1, + "legendFormat": "", + "refId": "A" + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Current Rate of Bytes Received", + "type": "gauge", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "$datasource", + "decimals": 0, + "format": "time_series", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 9, + "w": 12, + "x": 12, + "y": 1 + }, + "height": 9, + "id": 4, + "interval": null, + "links": [ + + ], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "minSpan": 12, + "nullPointMode": "connected", + "nullText": null, + "options": { + "fieldOptions": { + "calcs": [ + "last" + ], + "defaults": { + "max": 10000000000, + "min": 0, + "title": "$namespace: $pod", + "unit": "Bps" + }, + "mappings": [ + + ], + "override": { + + }, + "thresholds": [ + { + "color": "dark-green", + "index": 0, + "value": null + }, + { + "color": "dark-yellow", + "index": 1, + "value": 5000000000 + }, + { + "color": "dark-red", + "index": 2, + "value": 7000000000 + } + ], + "values": false + } + }, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "span": 12, + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "expr": "sum(irate(container_network_transmit_bytes_total{namespace=~\"$namespace\", pod=~\"$pod\"}[$interval:$resolution]))", + "format": "time_series", + "instant": null, + "intervalFactor": 1, + "legendFormat": "", + "refId": "A" + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Current Rate of Bytes Transmitted", + "type": "gauge", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + }, + { + "collapse": false, + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 10 + }, + "id": 5, + "panels": [ + + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Bandwidth", + "titleSize": "h6", + "type": "row" + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 12, + "x": 0, + "y": 11 + }, + "id": 6, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "hideEmpty": true, + "hideZero": true, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "sideWidth": null, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 2, + "links": [ + + ], + "minSpan": 12, + "nullPointMode": "connected", + "paceLength": 10, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum(irate(container_network_receive_bytes_total{namespace=~\"$namespace\", pod=~\"$pod\"}[$interval:$resolution])) by (pod)", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{`{{`}}pod{{`}}`}}", + "refId": "A", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Receive Bandwidth", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 12, + "x": 12, + "y": 11 + }, + "id": 7, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "hideEmpty": true, + "hideZero": true, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "sideWidth": null, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 2, + "links": [ + + ], + "minSpan": 12, + "nullPointMode": "connected", + "paceLength": 10, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum(irate(container_network_transmit_bytes_total{namespace=~\"$namespace\", pod=~\"$pod\"}[$interval:$resolution])) by (pod)", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{`{{`}}pod{{`}}`}}", + "refId": "A", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Transmit Bandwidth", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + }, + { + "collapse": true, + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 20 + }, + "id": 8, + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 0, + "y": 21 + }, + "id": 9, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "hideEmpty": true, + "hideZero": true, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "sideWidth": null, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 2, + "links": [ + + ], + "minSpan": 12, + "nullPointMode": "connected", + "paceLength": 10, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum(irate(container_network_receive_packets_total{namespace=~\"$namespace\", pod=~\"$pod\"}[$interval:$resolution])) by (pod)", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{`{{`}}pod{{`}}`}}", + "refId": "A", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Rate of Received Packets", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "pps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "pps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 12, + "y": 21 + }, + "id": 10, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "hideEmpty": true, + "hideZero": true, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "sideWidth": null, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 2, + "links": [ + + ], + "minSpan": 12, + "nullPointMode": "connected", + "paceLength": 10, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum(irate(container_network_transmit_packets_total{namespace=~\"$namespace\", pod=~\"$pod\"}[$interval:$resolution])) by (pod)", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{`{{`}}pod{{`}}`}}", + "refId": "A", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Rate of Transmitted Packets", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "pps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "pps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Packets", + "titleSize": "h6", + "type": "row" + }, + { + "collapse": true, + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 21 + }, + "id": 11, + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 0, + "y": 32 + }, + "id": 12, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "hideEmpty": true, + "hideZero": true, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "sideWidth": null, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 2, + "links": [ + + ], + "minSpan": 12, + "nullPointMode": "connected", + "paceLength": 10, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum(irate(container_network_receive_packets_dropped_total{namespace=~\"$namespace\", pod=~\"$pod\"}[$interval:$resolution])) by (pod)", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{`{{`}}pod{{`}}`}}", + "refId": "A", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Rate of Received Packets Dropped", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "pps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "pps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 12, + "y": 32 + }, + "id": 13, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "hideEmpty": true, + "hideZero": true, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "sideWidth": null, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 2, + "links": [ + + ], + "minSpan": 12, + "nullPointMode": "connected", + "paceLength": 10, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum(irate(container_network_transmit_packets_dropped_total{namespace=~\"$namespace\", pod=~\"$pod\"}[$interval:$resolution])) by (pod)", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{`{{`}}pod{{`}}`}}", + "refId": "A", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Rate of Transmitted Packets Dropped", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "pps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "pps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Errors", + "titleSize": "h6", + "type": "row" + } + ], + "refresh": "10s", + "rows": [ + + ], + "schemaVersion": 18, + "style": "dark", + "tags": [ + "kubernetes-mixin" + ], + "templating": { + "list": [ + { + "current": { + "text": "Prometheus", + "value": "Prometheus" + }, + "hide": 0, + "label": "Data Source", + "name": "datasource", + "options": [ + + ], + "query": "prometheus", + "refresh": 1, + "regex": "", + "type": "datasource" + }, + { + "allValue": ".+", + "auto": false, + "auto_count": 30, + "auto_min": "10s", + "current": { + "text": "kube-system", + "value": "kube-system" + }, + "datasource": "$datasource", + "definition": "label_values(container_network_receive_packets_total, namespace)", + "hide": 0, + "includeAll": true, + "label": null, + "multi": false, + "name": "namespace", + "options": [ + + ], + "query": "label_values(container_network_receive_packets_total, namespace)", + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": ".+", + "auto": false, + "auto_count": 30, + "auto_min": "10s", + "current": { + "text": "", + "value": "" + }, + "datasource": "$datasource", + "definition": "label_values(container_network_receive_packets_total{namespace=~\"$namespace\"}, pod)", + "hide": 0, + "includeAll": false, + "label": null, + "multi": false, + "name": "pod", + "options": [ + + ], + "query": "label_values(container_network_receive_packets_total{namespace=~\"$namespace\"}, pod)", + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "auto": false, + "auto_count": 30, + "auto_min": "10s", + "current": { + "text": "5m", + "value": "5m" + }, + "datasource": "$datasource", + "hide": 0, + "includeAll": false, + "label": null, + "multi": false, + "name": "resolution", + "options": [ + { + "selected": false, + "text": "30s", + "value": "30s" + }, + { + "selected": true, + "text": "5m", + "value": "5m" + }, + { + "selected": false, + "text": "1h", + "value": "1h" + } + ], + "query": "30s,5m,1h", + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "interval", + "useTags": false + }, + { + "allValue": null, + "auto": false, + "auto_count": 30, + "auto_min": "10s", + "current": { + "text": "5m", + "value": "5m" + }, + "datasource": "$datasource", + "hide": 2, + "includeAll": false, + "label": null, + "multi": false, + "name": "interval", + "options": [ + { + "selected": true, + "text": "4h", + "value": "4h" + } + ], + "query": "4h", + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "interval", + "useTags": false + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + "timezone": "{{ .Values.grafana.defaultDashboardsTimezone }}", + "title": "Kubernetes / Networking / Pod", + "uid": "7a18067ce943a40ae25454675c19ff5c", + "version": 0 + } +{{- end }} \ No newline at end of file diff --git a/charts/rancher-project-monitoring/0.2.0-rc1/templates/grafana/dashboards-1.14/prometheus.yaml b/charts/rancher-project-monitoring/0.2.0-rc1/templates/grafana/dashboards-1.14/prometheus.yaml new file mode 100644 index 00000000..c94ce252 --- /dev/null +++ b/charts/rancher-project-monitoring/0.2.0-rc1/templates/grafana/dashboards-1.14/prometheus.yaml @@ -0,0 +1,1235 @@ +{{- /* +Generated from 'prometheus' from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/grafana-dashboardDefinitions.yaml +Do not change in-place! In order to change this file first read following link: +https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack +*/ -}} +{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} +{{- if and (or .Values.grafana.enabled .Values.grafana.forceDeployDashboards) (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.grafana.defaultDashboardsEnabled }} +apiVersion: v1 +kind: ConfigMap +metadata: + namespace: {{ template "project-prometheus-stack.namespace" . }} + name: {{ printf "%s-%s" (include "project-prometheus-stack.fullname" $) "prometheus" | trunc 63 | trimSuffix "-" }} + annotations: +{{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} + labels: + {{- if $.Values.grafana.sidecar.dashboards.label }} + {{ $.Values.grafana.sidecar.dashboards.label }}: {{ ternary $.Values.grafana.sidecar.dashboards.labelValue "1" (not (empty $.Values.grafana.sidecar.dashboards.labelValue)) | quote }} + {{- end }} + app: {{ template "project-prometheus-stack.name" $ }}-grafana +{{ include "project-prometheus-stack.labels" $ | indent 4 }} +data: + prometheus.json: |- + { + "annotations": { + "list": [ + + ] + }, + "editable": true, + "gnetId": null, + "graphTooltip": 0, + "hideControls": false, + "links": [ + + ], + "refresh": "60s", + "rows": [ + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "id": 1, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": false, + "steppedLine": false, + "styles": [ + { + "alias": "Time", + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "pattern": "Time", + "type": "hidden" + }, + { + "alias": "Count", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #A", + "thresholds": [ + + ], + "type": "hidden", + "unit": "short" + }, + { + "alias": "Uptime", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #B", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "Instance", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "instance", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "Job", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "job", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "Version", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "version", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "pattern": "/.*/", + "thresholds": [ + + ], + "type": "string", + "unit": "short" + } + ], + "targets": [ + { + "expr": "count by (job, instance, version) (prometheus_build_info{job=~\"$job\", instance=~\"$instance\"})", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "A", + "step": 10 + }, + { + "expr": "max by (job, instance) (time() - process_start_time_seconds{job=~\"$job\", instance=~\"$instance\"})", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "B", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Prometheus Stats", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "transform": "table", + "type": "table", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Prometheus Stats", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "id": 2, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sum(rate(prometheus_target_sync_length_seconds_sum{job=~\"$job\",instance=~\"$instance\"}[5m])) by (scrape_job) * 1e3", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}scrape_job{{`}}`}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Target Sync", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "ms", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 3, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum(prometheus_sd_discovered_targets{job=~\"$job\",instance=~\"$instance\"})", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Targets", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Targets", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Discovery", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "id": 4, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 4, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "rate(prometheus_target_interval_length_seconds_sum{job=~\"$job\",instance=~\"$instance\"}[5m]) / rate(prometheus_target_interval_length_seconds_count{job=~\"$job\",instance=~\"$instance\"}[5m]) * 1e3", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}interval{{`}}`}} configured", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Average Scrape Interval Duration", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "ms", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 5, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 4, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum by (job) (rate(prometheus_target_scrapes_exceeded_body_size_limit_total[1m]))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "exceeded body size limit: {{`{{`}}job{{`}}`}}", + "legendLink": null, + "step": 10 + }, + { + "expr": "sum by (job) (rate(prometheus_target_scrapes_exceeded_sample_limit_total[1m]))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "exceeded sample limit: {{`{{`}}job{{`}}`}}", + "legendLink": null, + "step": 10 + }, + { + "expr": "sum by (job) (rate(prometheus_target_scrapes_sample_duplicate_timestamp_total[1m]))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "duplicate timestamp: {{`{{`}}job{{`}}`}}", + "legendLink": null, + "step": 10 + }, + { + "expr": "sum by (job) (rate(prometheus_target_scrapes_sample_out_of_bounds_total[1m]))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "out of bounds: {{`{{`}}job{{`}}`}}", + "legendLink": null, + "step": 10 + }, + { + "expr": "sum by (job) (rate(prometheus_target_scrapes_sample_out_of_order_total[1m]))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "out of order: {{`{{`}}job{{`}}`}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Scrape failures", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 6, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 4, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "rate(prometheus_tsdb_head_samples_appended_total{job=~\"$job\",instance=~\"$instance\"}[5m])", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}job{{`}}`}} {{`{{`}}instance{{`}}`}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Appended Samples", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Retrieval", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 7, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "prometheus_tsdb_head_series{job=~\"$job\",instance=~\"$instance\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}job{{`}}`}} {{`{{`}}instance{{`}}`}} head series", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Head Series", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 8, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "prometheus_tsdb_head_chunks{job=~\"$job\",instance=~\"$instance\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}job{{`}}`}} {{`{{`}}instance{{`}}`}} head chunks", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Head Chunks", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Storage", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 9, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "rate(prometheus_engine_query_duration_seconds_count{job=~\"$job\",instance=~\"$instance\",slice=\"inner_eval\"}[5m])", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}job{{`}}`}} {{`{{`}}instance{{`}}`}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Query Rate", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 10, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "max by (slice) (prometheus_engine_query_duration_seconds{quantile=\"0.9\",job=~\"$job\",instance=~\"$instance\"}) * 1e3", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}slice{{`}}`}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Stage Duration", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "ms", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Query", + "titleSize": "h6" + } + ], + "schemaVersion": 14, + "style": "dark", + "tags": [ + "prometheus-mixin" + ], + "templating": { + "list": [ + { + "current": { + "text": "Prometheus", + "value": "Prometheus" + }, + "hide": 0, + "label": "Data Source", + "name": "datasource", + "options": [ + + ], + "query": "prometheus", + "refresh": 1, + "regex": "", + "type": "datasource" + }, + { + "allValue": ".+", + "current": { + "selected": true, + "text": "All", + "value": "$__all" + }, + "datasource": "$datasource", + "hide": 0, + "includeAll": true, + "label": "job", + "multi": true, + "name": "job", + "options": [ + + ], + "query": "label_values(prometheus_build_info{job=\"prometheus-k8s\",namespace=\"monitoring\"}, job)", + "refresh": 1, + "regex": "", + "sort": 2, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": ".+", + "current": { + "selected": true, + "text": "All", + "value": "$__all" + }, + "datasource": "$datasource", + "hide": 0, + "includeAll": true, + "label": "instance", + "multi": true, + "name": "instance", + "options": [ + + ], + "query": "label_values(prometheus_build_info{job=~\"$job\"}, instance)", + "refresh": 1, + "regex": "", + "sort": 2, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "query", + "useTags": false + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + "timezone": "{{ .Values.grafana.defaultDashboardsTimezone }}", + "title": "Prometheus / Overview", + "uid": "", + "version": 0 + } +{{- end }} \ No newline at end of file diff --git a/charts/rancher-project-monitoring/0.2.0-rc1/templates/grafana/dashboards-1.14/workload-total.yaml b/charts/rancher-project-monitoring/0.2.0-rc1/templates/grafana/dashboards-1.14/workload-total.yaml new file mode 100644 index 00000000..0dfd208c --- /dev/null +++ b/charts/rancher-project-monitoring/0.2.0-rc1/templates/grafana/dashboards-1.14/workload-total.yaml @@ -0,0 +1,1412 @@ +{{- /* +Generated from 'workload-total' from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/grafana-dashboardDefinitions.yaml +Do not change in-place! In order to change this file first read following link: +https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack +*/ -}} +{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} +{{- if and (or .Values.grafana.enabled .Values.grafana.forceDeployDashboards) (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.grafana.defaultDashboardsEnabled }} +apiVersion: v1 +kind: ConfigMap +metadata: + namespace: {{ template "project-prometheus-stack.namespace" . }} + name: {{ printf "%s-%s" (include "project-prometheus-stack.fullname" $) "workload-total" | trunc 63 | trimSuffix "-" }} + annotations: +{{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} + labels: + {{- if $.Values.grafana.sidecar.dashboards.label }} + {{ $.Values.grafana.sidecar.dashboards.label }}: {{ ternary $.Values.grafana.sidecar.dashboards.labelValue "1" (not (empty $.Values.grafana.sidecar.dashboards.labelValue)) | quote }} + {{- end }} + app: {{ template "project-prometheus-stack.name" $ }}-grafana +{{ include "project-prometheus-stack.labels" $ | indent 4 }} +data: + workload-total.json: |- + { + "__inputs": [ + + ], + "__requires": [ + + ], + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": "-- Grafana --", + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "gnetId": null, + "graphTooltip": 0, + "hideControls": false, + "id": null, + "links": [ + + ], + "panels": [ + { + "collapse": false, + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 2, + "panels": [ + + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Current Bandwidth", + "titleSize": "h6", + "type": "row" + }, + { + "aliasColors": { + + }, + "bars": true, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 12, + "x": 0, + "y": 1 + }, + "id": 3, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "hideEmpty": true, + "hideZero": true, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "sideWidth": null, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": false, + "linewidth": 1, + "links": [ + + ], + "minSpan": 24, + "nullPointMode": "null", + "paceLength": 10, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 24, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sort_desc(sum(irate(container_network_receive_bytes_total{namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=~\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{`{{`}} pod {{`}}`}}", + "refId": "A", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Current Rate of Bytes Received", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "series", + "name": null, + "show": false, + "values": [ + "current" + ] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + }, + { + "aliasColors": { + + }, + "bars": true, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 12, + "x": 12, + "y": 1 + }, + "id": 4, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "hideEmpty": true, + "hideZero": true, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "sideWidth": null, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": false, + "linewidth": 1, + "links": [ + + ], + "minSpan": 24, + "nullPointMode": "null", + "paceLength": 10, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 24, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sort_desc(sum(irate(container_network_transmit_bytes_total{namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=~\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{`{{`}} pod {{`}}`}}", + "refId": "A", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Current Rate of Bytes Transmitted", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "series", + "name": null, + "show": false, + "values": [ + "current" + ] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + }, + { + "collapse": true, + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 10 + }, + "id": 5, + "panels": [ + { + "aliasColors": { + + }, + "bars": true, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 12, + "x": 0, + "y": 11 + }, + "id": 6, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "hideEmpty": true, + "hideZero": true, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "sideWidth": null, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": false, + "linewidth": 1, + "links": [ + + ], + "minSpan": 24, + "nullPointMode": "null", + "paceLength": 10, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 24, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sort_desc(avg(irate(container_network_receive_bytes_total{namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=~\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{`{{`}} pod {{`}}`}}", + "refId": "A", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Average Rate of Bytes Received", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "series", + "name": null, + "show": false, + "values": [ + "current" + ] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + }, + { + "aliasColors": { + + }, + "bars": true, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 12, + "x": 12, + "y": 11 + }, + "id": 7, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "hideEmpty": true, + "hideZero": true, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "sideWidth": null, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": false, + "linewidth": 1, + "links": [ + + ], + "minSpan": 24, + "nullPointMode": "null", + "paceLength": 10, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 24, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sort_desc(avg(irate(container_network_transmit_bytes_total{namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=~\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{`{{`}} pod {{`}}`}}", + "refId": "A", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Average Rate of Bytes Transmitted", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "series", + "name": null, + "show": false, + "values": [ + "current" + ] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Average Bandwidth", + "titleSize": "h6", + "type": "row" + }, + { + "collapse": false, + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 11 + }, + "id": 8, + "panels": [ + + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Bandwidth HIstory", + "titleSize": "h6", + "type": "row" + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 12, + "x": 0, + "y": 12 + }, + "id": 9, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "hideEmpty": true, + "hideZero": true, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "sideWidth": null, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 2, + "links": [ + + ], + "minSpan": 12, + "nullPointMode": "connected", + "paceLength": 10, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sort_desc(sum(irate(container_network_receive_bytes_total{namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=~\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{`{{`}}pod{{`}}`}}", + "refId": "A", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Receive Bandwidth", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 12, + "x": 12, + "y": 12 + }, + "id": 10, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "hideEmpty": true, + "hideZero": true, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "sideWidth": null, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 2, + "links": [ + + ], + "minSpan": 12, + "nullPointMode": "connected", + "paceLength": 10, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sort_desc(sum(irate(container_network_transmit_bytes_total{namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=~\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{`{{`}}pod{{`}}`}}", + "refId": "A", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Transmit Bandwidth", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + }, + { + "collapse": true, + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 21 + }, + "id": 11, + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 12, + "x": 0, + "y": 22 + }, + "id": 12, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "hideEmpty": true, + "hideZero": true, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "sideWidth": null, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 2, + "links": [ + + ], + "minSpan": 12, + "nullPointMode": "connected", + "paceLength": 10, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sort_desc(sum(irate(container_network_receive_packets_total{namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=~\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{`{{`}}pod{{`}}`}}", + "refId": "A", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Rate of Received Packets", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "pps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "pps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 12, + "x": 12, + "y": 22 + }, + "id": 13, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "hideEmpty": true, + "hideZero": true, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "sideWidth": null, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 2, + "links": [ + + ], + "minSpan": 12, + "nullPointMode": "connected", + "paceLength": 10, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sort_desc(sum(irate(container_network_transmit_packets_total{namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=~\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{`{{`}}pod{{`}}`}}", + "refId": "A", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Rate of Transmitted Packets", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "pps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "pps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Packets", + "titleSize": "h6", + "type": "row" + }, + { + "collapse": true, + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 22 + }, + "id": 14, + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 12, + "x": 0, + "y": 23 + }, + "id": 15, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "hideEmpty": true, + "hideZero": true, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "sideWidth": null, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 2, + "links": [ + + ], + "minSpan": 12, + "nullPointMode": "connected", + "paceLength": 10, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sort_desc(sum(irate(container_network_receive_packets_dropped_total{namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=~\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{`{{`}}pod{{`}}`}}", + "refId": "A", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Rate of Received Packets Dropped", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "pps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "pps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 12, + "x": 12, + "y": 23 + }, + "id": 16, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "hideEmpty": true, + "hideZero": true, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "sideWidth": null, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 2, + "links": [ + + ], + "minSpan": 12, + "nullPointMode": "connected", + "paceLength": 10, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sort_desc(sum(irate(container_network_transmit_packets_dropped_total{namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{namespace=~\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{`{{`}}pod{{`}}`}}", + "refId": "A", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Rate of Transmitted Packets Dropped", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "pps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "pps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Errors", + "titleSize": "h6", + "type": "row" + } + ], + "refresh": "10s", + "rows": [ + + ], + "schemaVersion": 18, + "style": "dark", + "tags": [ + "kubernetes-mixin" + ], + "templating": { + "list": [ + { + "current": { + "text": "Prometheus", + "value": "Prometheus" + }, + "hide": 0, + "label": "Data Source", + "name": "datasource", + "options": [ + + ], + "query": "prometheus", + "refresh": 1, + "regex": "", + "type": "datasource" + }, + { + "allValue": ".+", + "auto": false, + "auto_count": 30, + "auto_min": "10s", + "current": { + "text": "kube-system", + "value": "kube-system" + }, + "datasource": "$datasource", + "definition": "label_values(container_network_receive_packets_total, namespace)", + "hide": 0, + "includeAll": true, + "label": null, + "multi": false, + "name": "namespace", + "options": [ + + ], + "query": "label_values(container_network_receive_packets_total, namespace)", + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "auto": false, + "auto_count": 30, + "auto_min": "10s", + "current": { + "text": "", + "value": "" + }, + "datasource": "$datasource", + "definition": "label_values(namespace_workload_pod:kube_pod_owner:relabel{namespace=~\"$namespace\"}, workload)", + "hide": 0, + "includeAll": false, + "label": null, + "multi": false, + "name": "workload", + "options": [ + + ], + "query": "label_values(namespace_workload_pod:kube_pod_owner:relabel{namespace=~\"$namespace\"}, workload)", + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "auto": false, + "auto_count": 30, + "auto_min": "10s", + "current": { + "text": "deployment", + "value": "deployment" + }, + "datasource": "$datasource", + "definition": "label_values(namespace_workload_pod:kube_pod_owner:relabel{namespace=~\"$namespace\", workload=~\"$workload\"}, workload_type)", + "hide": 0, + "includeAll": false, + "label": null, + "multi": false, + "name": "type", + "options": [ + + ], + "query": "label_values(namespace_workload_pod:kube_pod_owner:relabel{namespace=~\"$namespace\", workload=~\"$workload\"}, workload_type)", + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "auto": false, + "auto_count": 30, + "auto_min": "10s", + "current": { + "text": "5m", + "value": "5m" + }, + "datasource": "$datasource", + "hide": 0, + "includeAll": false, + "label": null, + "multi": false, + "name": "resolution", + "options": [ + { + "selected": false, + "text": "30s", + "value": "30s" + }, + { + "selected": true, + "text": "5m", + "value": "5m" + }, + { + "selected": false, + "text": "1h", + "value": "1h" + } + ], + "query": "30s,5m,1h", + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "interval", + "useTags": false + }, + { + "allValue": null, + "auto": false, + "auto_count": 30, + "auto_min": "10s", + "current": { + "text": "5m", + "value": "5m" + }, + "datasource": "$datasource", + "hide": 2, + "includeAll": false, + "label": null, + "multi": false, + "name": "interval", + "options": [ + { + "selected": true, + "text": "4h", + "value": "4h" + } + ], + "query": "4h", + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "interval", + "useTags": false + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + "timezone": "{{ .Values.grafana.defaultDashboardsTimezone }}", + "title": "Kubernetes / Networking / Workload", + "uid": "728bf77cc1166d2f3133bf25846876cc", + "version": 0 + } +{{- end }} \ No newline at end of file diff --git a/charts/rancher-project-monitoring/0.2.0-rc1/templates/hardened.yaml b/charts/rancher-project-monitoring/0.2.0-rc1/templates/hardened.yaml new file mode 100644 index 00000000..edf359c9 --- /dev/null +++ b/charts/rancher-project-monitoring/0.2.0-rc1/templates/hardened.yaml @@ -0,0 +1,121 @@ +{{- $namespaces := dict "_0" .Release.Namespace -}} +apiVersion: batch/v1 +kind: Job +metadata: + name: {{ template "project-prometheus-stack.fullname" . }}-patch-sa + namespace: {{ .Release.Namespace }} + labels: + app: {{ template "project-prometheus-stack.fullname" . }}-patch-sa + annotations: + "helm.sh/hook": post-install, post-upgrade + "helm.sh/hook-delete-policy": hook-succeeded, before-hook-creation +spec: + template: + metadata: + name: {{ template "project-prometheus-stack.fullname" . }}-patch-sa + labels: + app: {{ template "project-prometheus-stack.fullname" . }}-patch-sa + spec: + serviceAccountName: {{ template "project-prometheus-stack.fullname" . }}-patch-sa + securityContext: + runAsNonRoot: true + runAsUser: 1000 + restartPolicy: Never + nodeSelector: {{ include "linux-node-selector" . | nindent 8 }} + tolerations: {{ include "linux-node-tolerations" . | nindent 8 }} + containers: + {{- range $_, $ns := $namespaces }} + - name: patch-sa-{{ $ns }} + image: {{ template "system_default_registry" $ }}{{ $.Values.global.kubectl.repository }}:{{ $.Values.global.kubectl.tag }} + imagePullPolicy: {{ $.Values.global.kubectl.pullPolicy }} + command: ["kubectl", "patch", "serviceaccount", "default", "-p", "{\"automountServiceAccountToken\": false}"] + args: ["-n", "{{ $ns }}"] + {{- end }} +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: {{ template "project-prometheus-stack.fullname" . }}-patch-sa + labels: + app: {{ template "project-prometheus-stack.fullname" . }}-patch-sa +rules: +- apiGroups: + - "" + resources: + - serviceaccounts + verbs: ['get', 'patch'] +- apiGroups: ['policy'] + resources: ['podsecuritypolicies'] + verbs: ['use'] + resourceNames: + - {{ template "project-prometheus-stack.fullname" . }}-patch-sa +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: {{ template "project-prometheus-stack.fullname" . }}-patch-sa + labels: + app: {{ template "project-prometheus-stack.fullname" . }}-patch-sa +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: {{ template "project-prometheus-stack.fullname" . }}-patch-sa +subjects: +- kind: ServiceAccount + name: {{ template "project-prometheus-stack.fullname" . }}-patch-sa + namespace: {{ .Release.Namespace }} +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ template "project-prometheus-stack.fullname" . }}-patch-sa + namespace: {{ .Release.Namespace }} + labels: + app: {{ template "project-prometheus-stack.fullname" . }}-patch-sa +--- +apiVersion: policy/v1beta1 +kind: PodSecurityPolicy +metadata: + name: {{ template "project-prometheus-stack.fullname" . }}-patch-sa + namespace: {{ .Release.Namespace }} + labels: + app: {{ template "project-prometheus-stack.fullname" . }}-patch-sa +spec: + privileged: false + hostNetwork: false + hostIPC: false + hostPID: false + runAsUser: + rule: 'MustRunAsNonRoot' + seLinux: + rule: 'RunAsAny' + supplementalGroups: + rule: 'MustRunAs' + ranges: + - min: 1 + max: 65535 + fsGroup: + rule: 'MustRunAs' + ranges: + - min: 1 + max: 65535 + readOnlyRootFilesystem: false + volumes: + - 'secret' +{{- range $_, $ns := $namespaces }} +--- +apiVersion: networking.k8s.io/v1 +kind: NetworkPolicy +metadata: + name: default-allow-all + namespace: {{ $ns }} +spec: + podSelector: {} + ingress: + - {} + egress: + - {} + policyTypes: + - Ingress + - Egress +{{- end }} diff --git a/charts/rancher-project-monitoring/0.2.0-rc1/templates/prometheus/_rules.tpl b/charts/rancher-project-monitoring/0.2.0-rc1/templates/prometheus/_rules.tpl new file mode 100644 index 00000000..d82cc2d3 --- /dev/null +++ b/charts/rancher-project-monitoring/0.2.0-rc1/templates/prometheus/_rules.tpl @@ -0,0 +1,8 @@ +{{- define "rules.names" }} +rules: + - "alertmanager.rules" + - "general.rules" + - "kubernetes-storage" + - "prometheus" + - "kubernetes-apps" +{{- end }} \ No newline at end of file diff --git a/charts/rancher-project-monitoring/0.2.0-rc1/templates/prometheus/clusterrole.yaml b/charts/rancher-project-monitoring/0.2.0-rc1/templates/prometheus/clusterrole.yaml new file mode 100644 index 00000000..b5d97aec --- /dev/null +++ b/charts/rancher-project-monitoring/0.2.0-rc1/templates/prometheus/clusterrole.yaml @@ -0,0 +1,25 @@ +{{- if and .Values.prometheus.enabled .Values.global.rbac.create }} +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: {{ template "project-prometheus-stack.fullname" . }}-prometheus + labels: + app: {{ template "project-prometheus-stack.name" . }}-prometheus +{{ include "project-prometheus-stack.labels" . | indent 4 }} +rules: +# This permission are not in the kube-prometheus repo +# they're grabbed from https://github.com/prometheus/prometheus/blob/master/documentation/examples/rbac-setup.yml +- apiGroups: [""] + resources: + - nodes + - nodes/metrics + - services + - endpoints + - pods + verbs: ["get", "list", "watch"] +- apiGroups: + - "networking.k8s.io" + resources: + - ingresses + verbs: ["get", "list", "watch"] +{{- end }} diff --git a/charts/rancher-project-monitoring/0.2.0-rc1/templates/prometheus/clusterrolebinding.yaml b/charts/rancher-project-monitoring/0.2.0-rc1/templates/prometheus/clusterrolebinding.yaml new file mode 100644 index 00000000..18249a0c --- /dev/null +++ b/charts/rancher-project-monitoring/0.2.0-rc1/templates/prometheus/clusterrolebinding.yaml @@ -0,0 +1,18 @@ +{{- if and .Values.prometheus.enabled .Values.global.rbac.create }} +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: {{ template "project-prometheus-stack.fullname" . }}-prometheus + labels: + app: {{ template "project-prometheus-stack.name" . }}-prometheus +{{ include "project-prometheus-stack.labels" . | indent 4 }} +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: {{ template "project-prometheus-stack.fullname" . }}-prometheus +subjects: + - kind: ServiceAccount + name: {{ template "project-prometheus-stack.prometheus.serviceAccountName" . }} + namespace: {{ template "project-prometheus-stack.namespace" . }} +{{- end }} + diff --git a/charts/rancher-project-monitoring/0.2.0-rc1/templates/prometheus/extrasecret.yaml b/charts/rancher-project-monitoring/0.2.0-rc1/templates/prometheus/extrasecret.yaml new file mode 100644 index 00000000..61664d01 --- /dev/null +++ b/charts/rancher-project-monitoring/0.2.0-rc1/templates/prometheus/extrasecret.yaml @@ -0,0 +1,20 @@ +{{- if .Values.prometheus.extraSecret.data -}} +{{- $secretName := printf "prometheus-%s-extra" (include "project-prometheus-stack.fullname" . ) -}} +apiVersion: v1 +kind: Secret +metadata: + name: {{ default $secretName .Values.prometheus.extraSecret.name }} + namespace: {{ template "project-prometheus-stack.namespace" . }} +{{- if .Values.prometheus.extraSecret.annotations }} + annotations: +{{ toYaml .Values.prometheus.extraSecret.annotations | indent 4 }} +{{- end }} + labels: + app: {{ template "project-prometheus-stack.name" . }}-prometheus + app.kubernetes.io/component: prometheus +{{ include "project-prometheus-stack.labels" . | indent 4 }} +data: +{{- range $key, $val := .Values.prometheus.extraSecret.data }} + {{ $key }}: {{ $val | b64enc | quote }} +{{- end }} +{{- end }} diff --git a/charts/rancher-project-monitoring/0.2.0-rc1/templates/prometheus/federate.yaml b/charts/rancher-project-monitoring/0.2.0-rc1/templates/prometheus/federate.yaml new file mode 100644 index 00000000..29d4ba20 --- /dev/null +++ b/charts/rancher-project-monitoring/0.2.0-rc1/templates/prometheus/federate.yaml @@ -0,0 +1,10 @@ +{{- if and .Values.prometheus.enabled .Values.federate.enabled }} +apiVersion: v1 +kind: Secret +metadata: + name: {{ template "project-prometheus-stack.fullname" . }}-federate + namespace: {{ template "project-prometheus-stack.namespace" . }} + labels: {{ include "project-prometheus-stack.labels" . | nindent 4 }} +data: + federate-scrape-config.yaml: {{ tpl (.Files.Get "files/federate/federate-scrape-config.yaml" ) $ | b64enc | quote }} +{{- end }} diff --git a/charts/rancher-project-monitoring/0.2.0-rc1/templates/prometheus/ingress.yaml b/charts/rancher-project-monitoring/0.2.0-rc1/templates/prometheus/ingress.yaml new file mode 100644 index 00000000..387e2b5d --- /dev/null +++ b/charts/rancher-project-monitoring/0.2.0-rc1/templates/prometheus/ingress.yaml @@ -0,0 +1,77 @@ +{{- if and .Values.prometheus.enabled .Values.prometheus.ingress.enabled -}} + {{- $pathType := .Values.prometheus.ingress.pathType | default "ImplementationSpecific" -}} + {{- $serviceName := printf "%s-%s" (include "project-prometheus-stack.fullname" .) "prometheus" -}} + {{- $servicePort := .Values.prometheus.ingress.servicePort | default .Values.prometheus.service.port -}} + {{- $routePrefix := list .Values.prometheus.prometheusSpec.routePrefix -}} + {{- $paths := .Values.prometheus.ingress.paths | default $routePrefix -}} + {{- $apiIsStable := eq (include "project-prometheus-stack.ingress.isStable" .) "true" -}} + {{- $ingressSupportsPathType := eq (include "project-prometheus-stack.ingress.supportsPathType" .) "true" -}} +apiVersion: {{ include "project-prometheus-stack.ingress.apiVersion" . }} +kind: Ingress +metadata: +{{- if .Values.prometheus.ingress.annotations }} + annotations: +{{ toYaml .Values.prometheus.ingress.annotations | indent 4 }} +{{- end }} + name: {{ $serviceName }} + namespace: {{ template "project-prometheus-stack.namespace" . }} + labels: + app: {{ template "project-prometheus-stack.name" . }}-prometheus +{{ include "project-prometheus-stack.labels" . | indent 4 }} +{{- if .Values.prometheus.ingress.labels }} +{{ toYaml .Values.prometheus.ingress.labels | indent 4 }} +{{- end }} +spec: + {{- if $apiIsStable }} + {{- if .Values.prometheus.ingress.ingressClassName }} + ingressClassName: {{ .Values.prometheus.ingress.ingressClassName }} + {{- end }} + {{- end }} + rules: + {{- if .Values.prometheus.ingress.hosts }} + {{- range $host := .Values.prometheus.ingress.hosts }} + - host: {{ tpl $host $ }} + http: + paths: + {{- range $p := $paths }} + - path: {{ tpl $p $ }} + {{- if and $pathType $ingressSupportsPathType }} + pathType: {{ $pathType }} + {{- end }} + backend: + {{- if $apiIsStable }} + service: + name: {{ $serviceName }} + port: + number: {{ $servicePort }} + {{- else }} + serviceName: {{ $serviceName }} + servicePort: {{ $servicePort }} + {{- end }} + {{- end -}} + {{- end -}} + {{- else }} + - http: + paths: + {{- range $p := $paths }} + - path: {{ tpl $p $ }} + {{- if and $pathType $ingressSupportsPathType }} + pathType: {{ $pathType }} + {{- end }} + backend: + {{- if $apiIsStable }} + service: + name: {{ $serviceName }} + port: + number: {{ $servicePort }} + {{- else }} + serviceName: {{ $serviceName }} + servicePort: {{ $servicePort }} + {{- end }} + {{- end -}} + {{- end -}} + {{- if .Values.prometheus.ingress.tls }} + tls: +{{ tpl (toYaml .Values.prometheus.ingress.tls | indent 4) . }} + {{- end -}} +{{- end -}} diff --git a/charts/rancher-project-monitoring/0.2.0-rc1/templates/prometheus/nginx-config.yaml b/charts/rancher-project-monitoring/0.2.0-rc1/templates/prometheus/nginx-config.yaml new file mode 100644 index 00000000..c28edc07 --- /dev/null +++ b/charts/rancher-project-monitoring/0.2.0-rc1/templates/prometheus/nginx-config.yaml @@ -0,0 +1,68 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: prometheus-nginx-proxy-config + namespace: {{ template "project-prometheus-stack.namespace" . }} + labels: + app: {{ template "project-prometheus-stack.name" . }}-prometheus +{{ include "project-prometheus-stack.labels" . | indent 4 }} +{{- if .Values.prometheus.annotations }} + annotations: +{{ toYaml .Values.prometheus.annotations | indent 4 }} +{{- end }} +data: + nginx.conf: |- + worker_processes auto; + error_log /dev/stdout warn; + pid /var/cache/nginx/nginx.pid; + + events { + worker_connections 1024; + } + + http { + include /etc/nginx/mime.types; + log_format main '[$time_local - $status] $remote_addr - $remote_user $request ($http_referer)'; + + proxy_connect_timeout 10; + proxy_read_timeout 180; + proxy_send_timeout 5; + proxy_buffering off; + proxy_cache_path /var/cache/nginx/cache levels=1:2 keys_zone=my_zone:100m inactive=1d max_size=10g; + + server { + listen 8081; + access_log off; + + gzip on; + gzip_min_length 1k; + gzip_comp_level 2; + gzip_types text/plain application/javascript application/x-javascript text/css application/xml text/javascript image/jpeg image/gif image/png; + gzip_vary on; + gzip_disable "MSIE [1-6]\."; + + proxy_set_header Host $host; + + location / { + proxy_cache my_zone; + proxy_cache_valid 200 302 1d; + proxy_cache_valid 301 30d; + proxy_cache_valid any 5m; + proxy_cache_bypass $http_cache_control; + add_header X-Proxy-Cache $upstream_cache_status; + add_header Cache-Control "public"; + + proxy_pass http://localhost:9090/; + + sub_filter_once off; + sub_filter 'var PATH_PREFIX = "";' 'var PATH_PREFIX = ".";'; + + if ($request_filename ~ .*\.(?:js|css|jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|ogg|ogv|webm)$) { + expires 90d; + } + + rewrite ^/k8s/clusters/.*/proxy(.*) /$1 break; + + } + } + } diff --git a/charts/rancher-project-monitoring/0.2.0-rc1/templates/prometheus/podDisruptionBudget.yaml b/charts/rancher-project-monitoring/0.2.0-rc1/templates/prometheus/podDisruptionBudget.yaml new file mode 100644 index 00000000..24e4c6a7 --- /dev/null +++ b/charts/rancher-project-monitoring/0.2.0-rc1/templates/prometheus/podDisruptionBudget.yaml @@ -0,0 +1,21 @@ +{{- if and .Values.prometheus.enabled .Values.prometheus.podDisruptionBudget.enabled }} +apiVersion: {{ include "project-prometheus-stack.pdb.apiVersion" . }} +kind: PodDisruptionBudget +metadata: + name: {{ template "project-prometheus-stack.fullname" . }}-prometheus + namespace: {{ template "project-prometheus-stack.namespace" . }} + labels: + app: {{ template "project-prometheus-stack.name" . }}-prometheus +{{ include "project-prometheus-stack.labels" . | indent 4 }} +spec: + {{- if .Values.prometheus.podDisruptionBudget.minAvailable }} + minAvailable: {{ .Values.prometheus.podDisruptionBudget.minAvailable }} + {{- end }} + {{- if .Values.prometheus.podDisruptionBudget.maxUnavailable }} + maxUnavailable: {{ .Values.prometheus.podDisruptionBudget.maxUnavailable }} + {{- end }} + selector: + matchLabels: + app.kubernetes.io/name: prometheus + prometheus: {{ template "project-prometheus-stack.prometheus.crname" . }} +{{- end }} diff --git a/charts/rancher-project-monitoring/0.2.0-rc1/templates/prometheus/prometheus.yaml b/charts/rancher-project-monitoring/0.2.0-rc1/templates/prometheus/prometheus.yaml new file mode 100644 index 00000000..96d4f78b --- /dev/null +++ b/charts/rancher-project-monitoring/0.2.0-rc1/templates/prometheus/prometheus.yaml @@ -0,0 +1,310 @@ +{{- if .Values.prometheus.enabled }} +apiVersion: monitoring.coreos.com/v1 +kind: Prometheus +metadata: + name: {{ template "project-prometheus-stack.prometheus.crname" . }} + namespace: {{ template "project-prometheus-stack.namespace" . }} + labels: + app: {{ template "project-prometheus-stack.name" . }}-prometheus +{{ include "project-prometheus-stack.labels" . | indent 4 }} +{{- if .Values.prometheus.annotations }} + annotations: +{{ toYaml .Values.prometheus.annotations | indent 4 }} +{{- end }} +spec: + alerting: + alertmanagers: +{{- if .Values.prometheus.prometheusSpec.alertingEndpoints }} +{{ toYaml .Values.prometheus.prometheusSpec.alertingEndpoints | indent 6 }} +{{- else if .Values.alertmanager.enabled }} + - namespace: {{ template "project-prometheus-stack.namespace" . }} + name: {{ template "project-prometheus-stack.fullname" . }}-alertmanager + port: {{ .Values.alertmanager.alertmanagerSpec.portName }} + {{- if .Values.alertmanager.alertmanagerSpec.routePrefix }} + pathPrefix: "{{ .Values.alertmanager.alertmanagerSpec.routePrefix }}" + {{- end }} + apiVersion: {{ .Values.alertmanager.apiVersion }} +{{- else }} + [] +{{- end }} +{{- if .Values.prometheus.prometheusSpec.apiserverConfig }} + apiserverConfig: +{{ toYaml .Values.prometheus.prometheusSpec.apiserverConfig | indent 4}} +{{- end }} +{{- if .Values.prometheus.prometheusSpec.image }} + {{- if and .Values.prometheus.prometheusSpec.image.tag .Values.prometheus.prometheusSpec.image.sha }} + image: "{{ template "system_default_registry" . }}{{ .Values.prometheus.prometheusSpec.image.repository }}:{{ .Values.prometheus.prometheusSpec.image.tag }}@sha256:{{ .Values.prometheus.prometheusSpec.image.sha }}" + {{- else if .Values.prometheus.prometheusSpec.image.sha }} + image: "{{ template "system_default_registry" . }}{{ .Values.prometheus.prometheusSpec.image.repository }}@sha256:{{ .Values.prometheus.prometheusSpec.image.sha }}" + {{- else if .Values.prometheus.prometheusSpec.image.tag }} + image: "{{ template "system_default_registry" . }}{{ .Values.prometheus.prometheusSpec.image.repository }}:{{ .Values.prometheus.prometheusSpec.image.tag }}" + {{- else }} + image: "{{ template "system_default_registry" . }}{{ .Values.prometheus.prometheusSpec.image.repository }}" + {{- end }} + version: {{ .Values.prometheus.prometheusSpec.image.tag }} + {{- if .Values.prometheus.prometheusSpec.image.sha }} + sha: {{ .Values.prometheus.prometheusSpec.image.sha }} + {{- end }} +{{- end }} +{{- if .Values.prometheus.prometheusSpec.externalLabels }} + externalLabels: +{{ tpl (toYaml .Values.prometheus.prometheusSpec.externalLabels | indent 4) . }} +{{- end }} +{{- if .Values.prometheus.prometheusSpec.prometheusExternalLabelNameClear }} + prometheusExternalLabelName: "" +{{- else if .Values.prometheus.prometheusSpec.prometheusExternalLabelName }} + prometheusExternalLabelName: "{{ .Values.prometheus.prometheusSpec.prometheusExternalLabelName }}" +{{- end }} +{{- if .Values.prometheus.prometheusSpec.enableRemoteWriteReceiver }} + enableRemoteWriteReceiver: {{ .Values.prometheus.prometheusSpec.enableRemoteWriteReceiver }} +{{- end }} +{{- if .Values.prometheus.prometheusSpec.externalUrl }} + externalUrl: "{{ tpl .Values.prometheus.prometheusSpec.externalUrl . }}" +{{- else if and .Values.prometheus.ingress.enabled .Values.prometheus.ingress.hosts }} + externalUrl: "http://{{ tpl (index .Values.prometheus.ingress.hosts 0) . }}{{ .Values.prometheus.prometheusSpec.routePrefix }}" +{{- else if not (or (empty .Values.global.cattle.url) (empty .Values.global.cattle.clusterId)) }} + externalUrl: "{{ .Values.global.cattle.url }}/k8s/clusters/{{ .Values.global.cattle.clusterId }}/api/v1/namespaces/{{ template "project-prometheus-stack.namespace" . }}/services/http:{{ template "project-prometheus-stack.fullname" . }}-prometheus:{{ .Values.prometheus.service.port }}/proxy" +{{- else }} + externalUrl: http://{{ template "project-prometheus-stack.fullname" . }}-prometheus.{{ template "project-prometheus-stack.namespace" . }}:{{ .Values.prometheus.service.port }} +{{- end }} + nodeSelector: {{ include "linux-node-selector" . | nindent 4 }} +{{- if .Values.prometheus.prometheusSpec.nodeSelector }} +{{ toYaml .Values.prometheus.prometheusSpec.nodeSelector | indent 4 }} +{{- end }} + paused: {{ .Values.prometheus.prometheusSpec.paused }} + replicas: {{ .Values.prometheus.prometheusSpec.replicas }} + shards: {{ .Values.prometheus.prometheusSpec.shards }} + logLevel: {{ .Values.prometheus.prometheusSpec.logLevel }} + logFormat: {{ .Values.prometheus.prometheusSpec.logFormat }} + listenLocal: {{ .Values.prometheus.prometheusSpec.listenLocal }} + enableAdminAPI: {{ .Values.prometheus.prometheusSpec.enableAdminAPI }} +{{- if .Values.prometheus.prometheusSpec.web }} + web: +{{ toYaml .Values.prometheus.prometheusSpec.web | indent 4 }} +{{- end }} +{{- if .Values.prometheus.prometheusSpec.exemplars }} + exemplars: + {{ toYaml .Values.prometheus.prometheusSpec.exemplars | indent 4 }} +{{- end }} +{{- if .Values.prometheus.prometheusSpec.enableFeatures }} + enableFeatures: +{{- range $enableFeatures := .Values.prometheus.prometheusSpec.enableFeatures }} + - {{ tpl $enableFeatures $ }} +{{- end }} +{{- end }} +{{- if .Values.prometheus.prometheusSpec.scrapeInterval }} + scrapeInterval: {{ .Values.prometheus.prometheusSpec.scrapeInterval }} +{{- end }} +{{- if .Values.prometheus.prometheusSpec.scrapeTimeout }} + scrapeTimeout: {{ .Values.prometheus.prometheusSpec.scrapeTimeout }} +{{- end }} +{{- if .Values.prometheus.prometheusSpec.evaluationInterval }} + evaluationInterval: {{ .Values.prometheus.prometheusSpec.evaluationInterval }} +{{- end }} +{{- if .Values.prometheus.prometheusSpec.resources }} + resources: +{{ toYaml .Values.prometheus.prometheusSpec.resources | indent 4 }} +{{- end }} + retention: {{ .Values.prometheus.prometheusSpec.retention | quote }} +{{- if .Values.prometheus.prometheusSpec.retentionSize }} + retentionSize: {{ .Values.prometheus.prometheusSpec.retentionSize | quote }} +{{- end }} +{{- if eq .Values.prometheus.prometheusSpec.walCompression false }} + walCompression: false +{{ else }} + walCompression: true +{{- end }} +{{- if .Values.prometheus.prometheusSpec.routePrefix }} + routePrefix: {{ .Values.prometheus.prometheusSpec.routePrefix | quote }} +{{- end }} +{{- if .Values.prometheus.prometheusSpec.secrets }} + secrets: +{{ toYaml .Values.prometheus.prometheusSpec.secrets | indent 4 }} +{{- end }} +{{- if .Values.prometheus.prometheusSpec.configMaps }} + configMaps: +{{ toYaml .Values.prometheus.prometheusSpec.configMaps | indent 4 }} +{{- end }} + serviceAccountName: {{ template "project-prometheus-stack.prometheus.serviceAccountName" . }} +{{- if .Values.prometheus.prometheusSpec.serviceMonitorSelector }} + serviceMonitorSelector: +{{ toYaml .Values.prometheus.prometheusSpec.serviceMonitorSelector | indent 4 }} +{{ else if .Values.prometheus.prometheusSpec.serviceMonitorSelectorNilUsesHelmValues }} + serviceMonitorSelector: + matchLabels: + release: {{ $.Release.Name | quote }} +{{ else }} + serviceMonitorSelector: {} +{{- end }} + serviceMonitorNamespaceSelector: {{ .Values.global.cattle.projectNamespaceSelector | toYaml | nindent 4 }} +{{- if .Values.prometheus.prometheusSpec.podMonitorSelector }} + podMonitorSelector: +{{ toYaml .Values.prometheus.prometheusSpec.podMonitorSelector | indent 4 }} +{{ else if .Values.prometheus.prometheusSpec.podMonitorSelectorNilUsesHelmValues }} + podMonitorSelector: + matchLabels: + release: {{ $.Release.Name | quote }} +{{ else }} + podMonitorSelector: {} +{{- end }} + podMonitorNamespaceSelector: {{ .Values.global.cattle.projectNamespaceSelector | toYaml | nindent 4 }} +{{- if .Values.prometheus.prometheusSpec.probeSelector }} + probeSelector: +{{ toYaml .Values.prometheus.prometheusSpec.probeSelector | indent 4 }} +{{ else if .Values.prometheus.prometheusSpec.probeSelectorNilUsesHelmValues }} + probeSelector: + matchLabels: + release: {{ $.Release.Name | quote }} +{{ else }} + probeSelector: {} +{{- end }} + probeNamespaceSelector: {{ .Values.global.cattle.projectNamespaceSelector | toYaml | nindent 4 }} +{{- if .Values.prometheus.prometheusSpec.securityContext }} + securityContext: +{{ toYaml .Values.prometheus.prometheusSpec.securityContext | indent 4 }} +{{- end }} + ruleNamespaceSelector: {{ .Values.global.cattle.projectNamespaceSelector | toYaml | nindent 4 }} +{{- if .Values.prometheus.prometheusSpec.ruleSelector }} + ruleSelector: +{{ toYaml .Values.prometheus.prometheusSpec.ruleSelector | indent 4}} +{{- else if .Values.prometheus.prometheusSpec.ruleSelectorNilUsesHelmValues }} + ruleSelector: + matchLabels: + release: {{ $.Release.Name | quote }} +{{ else }} + ruleSelector: {} +{{- end }} +{{- if .Values.prometheus.prometheusSpec.storageSpec }} + storage: +{{ tpl (toYaml .Values.prometheus.prometheusSpec.storageSpec | indent 4) . }} +{{- end }} +{{- if .Values.prometheus.prometheusSpec.podMetadata }} + podMetadata: +{{ tpl (toYaml .Values.prometheus.prometheusSpec.podMetadata | indent 4) . }} +{{- end }} +{{- if .Values.prometheus.prometheusSpec.query }} + query: +{{ toYaml .Values.prometheus.prometheusSpec.query | indent 4}} +{{- end }} +{{- if or .Values.prometheus.prometheusSpec.podAntiAffinity .Values.prometheus.prometheusSpec.affinity }} + affinity: +{{- if .Values.prometheus.prometheusSpec.affinity }} +{{ toYaml .Values.prometheus.prometheusSpec.affinity | indent 4 }} +{{- end }} +{{- if eq .Values.prometheus.prometheusSpec.podAntiAffinity "hard" }} + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - topologyKey: {{ .Values.prometheus.prometheusSpec.podAntiAffinityTopologyKey }} + labelSelector: + matchExpressions: + - {key: app.kubernetes.io/name, operator: In, values: [prometheus]} + - {key: prometheus, operator: In, values: [{{ template "project-prometheus-stack.fullname" . }}-prometheus]} +{{- else if eq .Values.prometheus.prometheusSpec.podAntiAffinity "soft" }} + podAntiAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - weight: 100 + podAffinityTerm: + topologyKey: {{ .Values.prometheus.prometheusSpec.podAntiAffinityTopologyKey }} + labelSelector: + matchExpressions: + - {key: app.kubernetes.io/name, operator: In, values: [prometheus]} + - {key: prometheus, operator: In, values: [{{ template "project-prometheus-stack.fullname" . }}-prometheus]} +{{- end }} +{{- end }} + tolerations: {{ include "linux-node-tolerations" . | nindent 4 }} +{{- if .Values.prometheus.prometheusSpec.tolerations }} +{{ toYaml .Values.prometheus.prometheusSpec.tolerations | indent 4 }} +{{- end }} +{{- if .Values.prometheus.prometheusSpec.topologySpreadConstraints }} + topologySpreadConstraints: +{{ toYaml .Values.prometheus.prometheusSpec.topologySpreadConstraints | indent 4 }} +{{- end }} +{{- if .Values.global.imagePullSecrets }} + imagePullSecrets: +{{ include "project-prometheus-stack.imagePullSecrets" . | trim | indent 4 }} +{{- end }} +{{- if .Values.federate.enabled }} + additionalScrapeConfigs: + name: {{ template "project-prometheus-stack.fullname" . }}-federate + key: federate-scrape-config.yaml +{{- end }} +{{- if .Values.prometheus.prometheusSpec.containers }} + containers: +{{ tpl .Values.prometheus.prometheusSpec.containers $ | indent 4 }} +{{- end }} +{{- if .Values.prometheus.prometheusSpec.initContainers }} + initContainers: +{{ toYaml .Values.prometheus.prometheusSpec.initContainers | indent 4 }} +{{- end }} +{{- if .Values.prometheus.prometheusSpec.priorityClassName }} + priorityClassName: {{ .Values.prometheus.prometheusSpec.priorityClassName }} +{{- end }} +{{- if .Values.prometheus.prometheusSpec.disableCompaction }} + disableCompaction: {{ .Values.prometheus.prometheusSpec.disableCompaction }} +{{- end }} + portName: {{ .Values.prometheus.prometheusSpec.portName }} +{{- if .Values.prometheus.prometheusSpec.volumes }} + volumes: +{{ toYaml .Values.prometheus.prometheusSpec.volumes | indent 4 }} +{{- end }} +{{- if .Values.prometheus.prometheusSpec.volumeMounts }} + volumeMounts: +{{ toYaml .Values.prometheus.prometheusSpec.volumeMounts | indent 4 }} +{{- end }} +{{- if .Values.prometheus.prometheusSpec.arbitraryFSAccessThroughSMs }} + arbitraryFSAccessThroughSMs: +{{ toYaml .Values.prometheus.prometheusSpec.arbitraryFSAccessThroughSMs | indent 4 }} +{{- end }} +{{- if .Values.prometheus.prometheusSpec.overrideHonorLabels }} + overrideHonorLabels: {{ .Values.prometheus.prometheusSpec.overrideHonorLabels }} +{{- end }} +{{- if .Values.prometheus.prometheusSpec.overrideHonorTimestamps }} + overrideHonorTimestamps: {{ .Values.prometheus.prometheusSpec.overrideHonorTimestamps }} +{{- end }} + ignoreNamespaceSelectors: true # always hard-coded to true for security reasons +{{- if .Values.prometheus.prometheusSpec.enforcedNamespaceLabel }} + enforcedNamespaceLabel: {{ .Values.prometheus.prometheusSpec.enforcedNamespaceLabel }} +{{- $prometheusDefaultRulesExcludedFromEnforce := (include "rules.names" .) | fromYaml }} + prometheusRulesExcludedFromEnforce: +{{- range $prometheusDefaultRulesExcludedFromEnforce.rules }} + - ruleNamespace: "{{ template "project-prometheus-stack.namespace" $ }}" + ruleName: "{{ printf "%s-%s" (include "project-prometheus-stack.fullname" $) . | trunc 63 | trimSuffix "-" }}" +{{- end }} +{{- if .Values.prometheus.prometheusSpec.prometheusRulesExcludedFromEnforce }} +{{ toYaml .Values.prometheus.prometheusSpec.prometheusRulesExcludedFromEnforce | indent 4 }} +{{- end }} + excludedFromEnforcement: +{{- range $prometheusDefaultRulesExcludedFromEnforce.rules }} + - resource: prometheusrules + namespace: "{{ template "project-prometheus-stack.namespace" $ }}" + name: "{{ printf "%s-%s" (include "project-prometheus-stack.fullname" $) . | trunc 63 | trimSuffix "-" }}" +{{- end }} +{{- if .Values.prometheus.prometheusSpec.excludedFromEnforcement }} +{{ tpl (toYaml .Values.prometheus.prometheusSpec.excludedFromEnforcement | indent 4) . }} +{{- end }} +{{- end }} +{{- if .Values.prometheus.prometheusSpec.queryLogFile }} + queryLogFile: {{ .Values.prometheus.prometheusSpec.queryLogFile }} +{{- end }} +{{- if .Values.prometheus.prometheusSpec.enforcedSampleLimit }} + enforcedSampleLimit: {{ .Values.prometheus.prometheusSpec.enforcedSampleLimit }} +{{- end }} +{{- if .Values.prometheus.prometheusSpec.enforcedTargetLimit }} + enforcedTargetLimit: {{ .Values.prometheus.prometheusSpec.enforcedTargetLimit }} +{{- end }} +{{- if .Values.prometheus.prometheusSpec.enforcedLabelLimit }} + enforcedLabelLimit: {{ .Values.prometheus.prometheusSpec.enforcedLabelLimit }} +{{- end }} +{{- if .Values.prometheus.prometheusSpec.enforcedLabelNameLengthLimit }} + enforcedLabelNameLengthLimit: {{ .Values.prometheus.prometheusSpec.enforcedLabelNameLengthLimit }} +{{- end }} +{{- if .Values.prometheus.prometheusSpec.enforcedLabelValueLengthLimit}} + enforcedLabelValueLengthLimit: {{ .Values.prometheus.prometheusSpec.enforcedLabelValueLengthLimit }} +{{- end }} +{{- if .Values.prometheus.prometheusSpec.allowOverlappingBlocks }} + allowOverlappingBlocks: {{ .Values.prometheus.prometheusSpec.allowOverlappingBlocks }} +{{- end }} +{{- if .Values.prometheus.prometheusSpec.minReadySeconds }} + minReadySeconds: {{ .Values.prometheus.prometheusSpec.minReadySeconds }} +{{- end }} +{{- end }} \ No newline at end of file diff --git a/charts/rancher-project-monitoring/0.2.0-rc1/templates/prometheus/psp-clusterrole.yaml b/charts/rancher-project-monitoring/0.2.0-rc1/templates/prometheus/psp-clusterrole.yaml new file mode 100644 index 00000000..ba16973b --- /dev/null +++ b/charts/rancher-project-monitoring/0.2.0-rc1/templates/prometheus/psp-clusterrole.yaml @@ -0,0 +1,20 @@ +{{- if and .Values.prometheus.enabled .Values.global.rbac.create .Values.global.rbac.pspEnabled }} +kind: ClusterRole +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: {{ template "project-prometheus-stack.fullname" . }}-prometheus-psp + labels: + app: {{ template "project-prometheus-stack.name" . }}-prometheus +{{ include "project-prometheus-stack.labels" . | indent 4 }} +rules: +{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} +{{- if semverCompare "> 1.15.0-0" $kubeTargetVersion }} +- apiGroups: ['policy'] +{{- else }} +- apiGroups: ['extensions'] +{{- end }} + resources: ['podsecuritypolicies'] + verbs: ['use'] + resourceNames: + - {{ template "project-prometheus-stack.fullname" . }}-prometheus +{{- end }} diff --git a/charts/rancher-project-monitoring/0.2.0-rc1/templates/prometheus/psp-clusterrolebinding.yaml b/charts/rancher-project-monitoring/0.2.0-rc1/templates/prometheus/psp-clusterrolebinding.yaml new file mode 100644 index 00000000..340cef24 --- /dev/null +++ b/charts/rancher-project-monitoring/0.2.0-rc1/templates/prometheus/psp-clusterrolebinding.yaml @@ -0,0 +1,18 @@ +{{- if and .Values.prometheus.enabled .Values.global.rbac.create .Values.global.rbac.pspEnabled }} +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: {{ template "project-prometheus-stack.fullname" . }}-prometheus-psp + labels: + app: {{ template "project-prometheus-stack.name" . }}-prometheus +{{ include "project-prometheus-stack.labels" . | indent 4 }} +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: {{ template "project-prometheus-stack.fullname" . }}-prometheus-psp +subjects: + - kind: ServiceAccount + name: {{ template "project-prometheus-stack.prometheus.serviceAccountName" . }} + namespace: {{ template "project-prometheus-stack.namespace" . }} +{{- end }} + diff --git a/charts/rancher-project-monitoring/0.2.0-rc1/templates/prometheus/psp.yaml b/charts/rancher-project-monitoring/0.2.0-rc1/templates/prometheus/psp.yaml new file mode 100644 index 00000000..47db42ea --- /dev/null +++ b/charts/rancher-project-monitoring/0.2.0-rc1/templates/prometheus/psp.yaml @@ -0,0 +1,52 @@ +{{- if and .Values.prometheus.enabled .Values.global.rbac.create .Values.global.rbac.pspEnabled }} +apiVersion: policy/v1beta1 +kind: PodSecurityPolicy +metadata: + name: {{ template "project-prometheus-stack.fullname" . }}-prometheus + labels: + app: {{ template "project-prometheus-stack.name" . }}-prometheus +{{- if .Values.global.rbac.pspAnnotations }} + annotations: +{{ toYaml .Values.global.rbac.pspAnnotations | indent 4 }} +{{- end }} +{{ include "project-prometheus-stack.labels" . | indent 4 }} +spec: + privileged: false + # Allow core volume types. + volumes: + - 'configMap' + - 'emptyDir' + - 'projected' + - 'secret' + - 'downwardAPI' + - 'persistentVolumeClaim' +{{- if .Values.prometheus.podSecurityPolicy.volumes }} +{{ toYaml .Values.prometheus.podSecurityPolicy.volumes | indent 4 }} +{{- end }} + hostNetwork: false + hostIPC: false + hostPID: false + runAsUser: + # Permits the container to run with root privileges as well. + rule: 'RunAsAny' + seLinux: + # This policy assumes the nodes are using AppArmor rather than SELinux. + rule: 'RunAsAny' + supplementalGroups: + rule: 'MustRunAs' + ranges: + # Allow adding the root group. + - min: 0 + max: 65535 + fsGroup: + rule: 'MustRunAs' + ranges: + # Allow adding the root group. + - min: 0 + max: 65535 + readOnlyRootFilesystem: false +{{- if .Values.prometheus.podSecurityPolicy.allowedCapabilities }} + allowedCapabilities: +{{ toYaml .Values.prometheus.podSecurityPolicy.allowedCapabilities | indent 4 }} +{{- end }} +{{- end }} diff --git a/charts/rancher-project-monitoring/0.2.0-rc1/templates/prometheus/rules-1.14/alertmanager.rules.yaml b/charts/rancher-project-monitoring/0.2.0-rc1/templates/prometheus/rules-1.14/alertmanager.rules.yaml new file mode 100644 index 00000000..0cca1fb3 --- /dev/null +++ b/charts/rancher-project-monitoring/0.2.0-rc1/templates/prometheus/rules-1.14/alertmanager.rules.yaml @@ -0,0 +1,217 @@ +{{- /* +Generated from 'alertmanager.rules' group from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/alertmanager-prometheusRule.yaml +Do not change in-place! In order to change this file first read following link: +https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack +*/ -}} +{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} +{{- if and (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.defaultRules.create .Values.defaultRules.rules.alertmanager }} +{{- $alertmanagerJob := printf "%s-%s" (include "project-prometheus-stack.fullname" .) "alertmanager" }} +{{- $namespace := printf "%s" (include "project-prometheus-stack.namespace" .) }} +{{- if and .Values.alertmanager.enabled .Values.alertmanager.serviceMonitor.selfMonitor }} +apiVersion: monitoring.coreos.com/v1 +kind: PrometheusRule +metadata: + name: {{ printf "%s-%s" (include "project-prometheus-stack.fullname" .) "alertmanager.rules" | trunc 63 | trimSuffix "-" }} + namespace: {{ template "project-prometheus-stack.namespace" . }} + labels: + app: {{ template "project-prometheus-stack.name" . }} +{{ include "project-prometheus-stack.labels" . | indent 4 }} +{{- if .Values.defaultRules.labels }} +{{ toYaml .Values.defaultRules.labels | indent 4 }} +{{- end }} +{{- if .Values.defaultRules.annotations }} + annotations: +{{ toYaml .Values.defaultRules.annotations | indent 4 }} +{{- end }} +spec: + groups: + - name: alertmanager.rules + rules: +{{- if not (.Values.defaultRules.disabled.AlertmanagerFailedReload | default false) }} + - alert: AlertmanagerFailedReload + annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} + description: Configuration has failed to load for {{`{{`}} $labels.namespace {{`}}`}}/{{`{{`}} $labels.pod{{`}}`}}. + runbook_url: {{ .Values.defaultRules.runbookUrl }}/alertmanager/alertmanagerfailedreload + summary: Reloading an Alertmanager configuration has failed. + expr: |- + # Without max_over_time, failed scrapes could create false negatives, see + # https://www.robustperception.io/alerting-on-gauges-in-prometheus-2-0 for details. + max_over_time(alertmanager_config_last_reload_successful{job="{{ $alertmanagerJob }}",namespace="{{ $namespace }}"}[5m]) == 0 + for: 10m + labels: + severity: critical +{{- if .Values.defaultRules.additionalRuleLabels }} +{{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} +{{- end }} +{{- end }} +{{- if not (.Values.defaultRules.disabled.AlertmanagerMembersInconsistent | default false) }} + - alert: AlertmanagerMembersInconsistent + annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} + description: Alertmanager {{`{{`}} $labels.namespace {{`}}`}}/{{`{{`}} $labels.pod{{`}}`}} has only found {{`{{`}} $value {{`}}`}} members of the {{`{{`}}$labels.job{{`}}`}} cluster. + runbook_url: {{ .Values.defaultRules.runbookUrl }}/alertmanager/alertmanagermembersinconsistent + summary: A member of an Alertmanager cluster has not found all other cluster members. + expr: |- + # Without max_over_time, failed scrapes could create false negatives, see + # https://www.robustperception.io/alerting-on-gauges-in-prometheus-2-0 for details. + max_over_time(alertmanager_cluster_members{job="{{ $alertmanagerJob }}",namespace="{{ $namespace }}"}[5m]) + < on (namespace,service) group_left + count by (namespace,service) (max_over_time(alertmanager_cluster_members{job="{{ $alertmanagerJob }}",namespace="{{ $namespace }}"}[5m])) + for: 15m + labels: + severity: critical +{{- if .Values.defaultRules.additionalRuleLabels }} +{{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} +{{- end }} +{{- end }} +{{- if not (.Values.defaultRules.disabled.AlertmanagerFailedToSendAlerts | default false) }} + - alert: AlertmanagerFailedToSendAlerts + annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} + description: Alertmanager {{`{{`}} $labels.namespace {{`}}`}}/{{`{{`}} $labels.pod{{`}}`}} failed to send {{`{{`}} $value | humanizePercentage {{`}}`}} of notifications to {{`{{`}} $labels.integration {{`}}`}}. + runbook_url: {{ .Values.defaultRules.runbookUrl }}/alertmanager/alertmanagerfailedtosendalerts + summary: An Alertmanager instance failed to send notifications. + expr: |- + ( + rate(alertmanager_notifications_failed_total{job="{{ $alertmanagerJob }}",namespace="{{ $namespace }}"}[5m]) + / + rate(alertmanager_notifications_total{job="{{ $alertmanagerJob }}",namespace="{{ $namespace }}"}[5m]) + ) + > 0.01 + for: 5m + labels: + severity: warning +{{- if .Values.defaultRules.additionalRuleLabels }} +{{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} +{{- end }} +{{- end }} +{{- if not (.Values.defaultRules.disabled.AlertmanagerClusterFailedToSendAlerts | default false) }} + - alert: AlertmanagerClusterFailedToSendAlerts + annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} + description: The minimum notification failure rate to {{`{{`}} $labels.integration {{`}}`}} sent from any instance in the {{`{{`}}$labels.job{{`}}`}} cluster is {{`{{`}} $value | humanizePercentage {{`}}`}}. + runbook_url: {{ .Values.defaultRules.runbookUrl }}/alertmanager/alertmanagerclusterfailedtosendalerts + summary: All Alertmanager instances in a cluster failed to send notifications to a critical integration. + expr: |- + min by (namespace,service, integration) ( + rate(alertmanager_notifications_failed_total{job="{{ $alertmanagerJob }}",namespace="{{ $namespace }}", integration=~`.*`}[5m]) + / + rate(alertmanager_notifications_total{job="{{ $alertmanagerJob }}",namespace="{{ $namespace }}", integration=~`.*`}[5m]) + ) + > 0.01 + for: 5m + labels: + severity: critical +{{- if .Values.defaultRules.additionalRuleLabels }} +{{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} +{{- end }} +{{- end }} +{{- if not (.Values.defaultRules.disabled.AlertmanagerClusterFailedToSendAlerts | default false) }} + - alert: AlertmanagerClusterFailedToSendAlerts + annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} + description: The minimum notification failure rate to {{`{{`}} $labels.integration {{`}}`}} sent from any instance in the {{`{{`}}$labels.job{{`}}`}} cluster is {{`{{`}} $value | humanizePercentage {{`}}`}}. + runbook_url: {{ .Values.defaultRules.runbookUrl }}/alertmanager/alertmanagerclusterfailedtosendalerts + summary: All Alertmanager instances in a cluster failed to send notifications to a non-critical integration. + expr: |- + min by (namespace,service, integration) ( + rate(alertmanager_notifications_failed_total{job="{{ $alertmanagerJob }}",namespace="{{ $namespace }}", integration!~`.*`}[5m]) + / + rate(alertmanager_notifications_total{job="{{ $alertmanagerJob }}",namespace="{{ $namespace }}", integration!~`.*`}[5m]) + ) + > 0.01 + for: 5m + labels: + severity: warning +{{- if .Values.defaultRules.additionalRuleLabels }} +{{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} +{{- end }} +{{- end }} +{{- if not (.Values.defaultRules.disabled.AlertmanagerConfigInconsistent | default false) }} + - alert: AlertmanagerConfigInconsistent + annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} + description: Alertmanager instances within the {{`{{`}}$labels.job{{`}}`}} cluster have different configurations. + runbook_url: {{ .Values.defaultRules.runbookUrl }}/alertmanager/alertmanagerconfiginconsistent + summary: Alertmanager instances within the same cluster have different configurations. + expr: |- + count by (namespace,service) ( + count_values by (namespace,service) ("config_hash", alertmanager_config_hash{job="{{ $alertmanagerJob }}",namespace="{{ $namespace }}"}) + ) + != 1 + for: 20m + labels: + severity: critical +{{- if .Values.defaultRules.additionalRuleLabels }} +{{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} +{{- end }} +{{- end }} +{{- if not (.Values.defaultRules.disabled.AlertmanagerClusterDown | default false) }} + - alert: AlertmanagerClusterDown + annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} + description: '{{`{{`}} $value | humanizePercentage {{`}}`}} of Alertmanager instances within the {{`{{`}}$labels.job{{`}}`}} cluster have been up for less than half of the last 5m.' + runbook_url: {{ .Values.defaultRules.runbookUrl }}/alertmanager/alertmanagerclusterdown + summary: Half or more of the Alertmanager instances within the same cluster are down. + expr: |- + ( + count by (namespace,service) ( + avg_over_time(up{job="{{ $alertmanagerJob }}",namespace="{{ $namespace }}"}[5m]) < 0.5 + ) + / + count by (namespace,service) ( + up{job="{{ $alertmanagerJob }}",namespace="{{ $namespace }}"} + ) + ) + >= 0.5 + for: 5m + labels: + severity: critical +{{- if .Values.defaultRules.additionalRuleLabels }} +{{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} +{{- end }} +{{- end }} +{{- if not (.Values.defaultRules.disabled.AlertmanagerClusterCrashlooping | default false) }} + - alert: AlertmanagerClusterCrashlooping + annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} + description: '{{`{{`}} $value | humanizePercentage {{`}}`}} of Alertmanager instances within the {{`{{`}}$labels.job{{`}}`}} cluster have restarted at least 5 times in the last 10m.' + runbook_url: {{ .Values.defaultRules.runbookUrl }}/alertmanager/alertmanagerclustercrashlooping + summary: Half or more of the Alertmanager instances within the same cluster are crashlooping. + expr: |- + ( + count by (namespace,service) ( + changes(process_start_time_seconds{job="{{ $alertmanagerJob }}",namespace="{{ $namespace }}"}[10m]) > 4 + ) + / + count by (namespace,service) ( + up{job="{{ $alertmanagerJob }}",namespace="{{ $namespace }}"} + ) + ) + >= 0.5 + for: 5m + labels: + severity: critical +{{- if .Values.defaultRules.additionalRuleLabels }} +{{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} +{{- end }} +{{- end }} +{{- end }} +{{- end }} diff --git a/charts/rancher-project-monitoring/0.2.0-rc1/templates/prometheus/rules-1.14/general.rules.yaml b/charts/rancher-project-monitoring/0.2.0-rc1/templates/prometheus/rules-1.14/general.rules.yaml new file mode 100644 index 00000000..13c158c0 --- /dev/null +++ b/charts/rancher-project-monitoring/0.2.0-rc1/templates/prometheus/rules-1.14/general.rules.yaml @@ -0,0 +1,98 @@ +{{- /* +Generated from 'general.rules' group from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/kubePrometheus-prometheusRule.yaml +Do not change in-place! In order to change this file first read following link: +https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack +*/ -}} +{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} +{{- if and (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.defaultRules.create .Values.defaultRules.rules.general }} +apiVersion: monitoring.coreos.com/v1 +kind: PrometheusRule +metadata: + name: {{ printf "%s-%s" (include "project-prometheus-stack.fullname" .) "general.rules" | trunc 63 | trimSuffix "-" }} + namespace: {{ template "project-prometheus-stack.namespace" . }} + labels: + app: {{ template "project-prometheus-stack.name" . }} +{{ include "project-prometheus-stack.labels" . | indent 4 }} +{{- if .Values.defaultRules.labels }} +{{ toYaml .Values.defaultRules.labels | indent 4 }} +{{- end }} +{{- if .Values.defaultRules.annotations }} + annotations: +{{ toYaml .Values.defaultRules.annotations | indent 4 }} +{{- end }} +spec: + groups: + - name: general.rules + rules: +{{- if not (.Values.defaultRules.disabled.TargetDown | default false) }} + - alert: TargetDown + annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} + description: '{{`{{`}} printf "%.4g" $value {{`}}`}}% of the {{`{{`}} $labels.job {{`}}`}}/{{`{{`}} $labels.service {{`}}`}} targets in {{`{{`}} $labels.namespace {{`}}`}} namespace are down.' + runbook_url: {{ .Values.defaultRules.runbookUrl }}/general/targetdown + summary: One or more targets are unreachable. + expr: 100 * (count(up == 0) BY (job, namespace, service) / count(up) BY (job, namespace, service)) > 10 + for: 10m + labels: + severity: warning +{{- if .Values.defaultRules.additionalRuleLabels }} +{{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} +{{- end }} +{{- end }} +{{- if not (.Values.defaultRules.disabled.Watchdog | default false) }} + - alert: Watchdog + annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} + description: 'This is an alert meant to ensure that the entire alerting pipeline is functional. + + This alert is always firing, therefore it should always be firing in Alertmanager + + and always fire against a receiver. There are integrations with various notification + + mechanisms that send a notification when this alert is not firing. For example the + + "DeadMansSnitch" integration in PagerDuty. + + ' + runbook_url: {{ .Values.defaultRules.runbookUrl }}/general/watchdog + summary: An alert that should always be firing to certify that Alertmanager is working properly. + expr: vector(1) + labels: + severity: none +{{- if .Values.defaultRules.additionalRuleLabels }} +{{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} +{{- end }} +{{- end }} +{{- if not (.Values.defaultRules.disabled.InfoInhibitor | default false) }} + - alert: InfoInhibitor + annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} + description: 'This is an alert that is used to inhibit info alerts. + + By themselves, the info-level alerts are sometimes very noisy, but they are relevant when combined with + + other alerts. + + This alert fires whenever there''s a severity="info" alert, and stops firing when another alert with a + + severity of ''warning'' or ''critical'' starts firing on the same namespace. + + This alert should be routed to a null receiver and configured to inhibit alerts with severity="info". + + ' + runbook_url: {{ .Values.defaultRules.runbookUrl }}/general/infoinhibitor + summary: Info-level alert inhibition. + expr: ALERTS{severity = "info"} == 1 unless on(namespace) ALERTS{alertname != "InfoInhibitor", severity =~ "warning|critical", alertstate="firing"} == 1 + labels: + severity: none +{{- if .Values.defaultRules.additionalRuleLabels }} +{{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} +{{- end }} +{{- end }} +{{- end }} \ No newline at end of file diff --git a/charts/rancher-project-monitoring/0.2.0-rc1/templates/prometheus/rules-1.14/kubernetes-apps.yaml b/charts/rancher-project-monitoring/0.2.0-rc1/templates/prometheus/rules-1.14/kubernetes-apps.yaml new file mode 100644 index 00000000..c956157e --- /dev/null +++ b/charts/rancher-project-monitoring/0.2.0-rc1/templates/prometheus/rules-1.14/kubernetes-apps.yaml @@ -0,0 +1,375 @@ +{{- /* +Generated from 'kubernetes-apps' group from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/kubernetesControlPlane-prometheusRule.yaml +Do not change in-place! In order to change this file first read following link: +https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack +*/ -}} +{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} +{{- if and (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.defaultRules.create .Values.defaultRules.rules.kubernetesApps }} +{{- $targetNamespace := .Values.defaultRules.appNamespacesTarget }} +apiVersion: monitoring.coreos.com/v1 +kind: PrometheusRule +metadata: + name: {{ printf "%s-%s" (include "project-prometheus-stack.fullname" .) "kubernetes-apps" | trunc 63 | trimSuffix "-" }} + namespace: {{ template "project-prometheus-stack.namespace" . }} + labels: + app: {{ template "project-prometheus-stack.name" . }} +{{ include "project-prometheus-stack.labels" . | indent 4 }} +{{- if .Values.defaultRules.labels }} +{{ toYaml .Values.defaultRules.labels | indent 4 }} +{{- end }} +{{- if .Values.defaultRules.annotations }} + annotations: +{{ toYaml .Values.defaultRules.annotations | indent 4 }} +{{- end }} +spec: + groups: + - name: kubernetes-apps + rules: +{{- if not (.Values.defaultRules.disabled.KubePodCrashLooping | default false) }} + - alert: KubePodCrashLooping + annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} + description: 'Pod {{`{{`}} $labels.namespace {{`}}`}}/{{`{{`}} $labels.pod {{`}}`}} ({{`{{`}} $labels.container {{`}}`}}) is in waiting state (reason: "CrashLoopBackOff").' + runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubepodcrashlooping + summary: Pod is crash looping. + expr: max_over_time(kube_pod_container_status_waiting_reason{reason="CrashLoopBackOff", job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"}[5m]) >= 1 + for: 15m + labels: + severity: warning +{{- if .Values.defaultRules.additionalRuleLabels }} +{{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} +{{- end }} +{{- end }} +{{- if not (.Values.defaultRules.disabled.KubePodNotReady | default false) }} + - alert: KubePodNotReady + annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} + description: Pod {{`{{`}} $labels.namespace {{`}}`}}/{{`{{`}} $labels.pod {{`}}`}} has been in a non-ready state for longer than 15 minutes. + runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubepodnotready + summary: Pod has been in a non-ready state for more than 15 minutes. + expr: |- + sum by (namespace, pod, cluster) ( + max by(namespace, pod, cluster) ( + kube_pod_status_phase{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}", phase=~"Pending|Unknown"} + ) * on(namespace, pod, cluster) group_left(owner_kind) topk by(namespace, pod, cluster) ( + 1, max by(namespace, pod, owner_kind, cluster) (kube_pod_owner{owner_kind!="Job"}) + ) + ) > 0 + for: 15m + labels: + severity: warning +{{- if .Values.defaultRules.additionalRuleLabels }} +{{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} +{{- end }} +{{- end }} +{{- if not (.Values.defaultRules.disabled.KubeDeploymentGenerationMismatch | default false) }} + - alert: KubeDeploymentGenerationMismatch + annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} + description: Deployment generation for {{`{{`}} $labels.namespace {{`}}`}}/{{`{{`}} $labels.deployment {{`}}`}} does not match, this indicates that the Deployment has failed but has not been rolled back. + runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubedeploymentgenerationmismatch + summary: Deployment generation mismatch due to possible roll-back + expr: |- + kube_deployment_status_observed_generation{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"} + != + kube_deployment_metadata_generation{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"} + for: 15m + labels: + severity: warning +{{- if .Values.defaultRules.additionalRuleLabels }} +{{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} +{{- end }} +{{- end }} +{{- if not (.Values.defaultRules.disabled.KubeDeploymentReplicasMismatch | default false) }} + - alert: KubeDeploymentReplicasMismatch + annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} + description: Deployment {{`{{`}} $labels.namespace {{`}}`}}/{{`{{`}} $labels.deployment {{`}}`}} has not matched the expected number of replicas for longer than 15 minutes. + runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubedeploymentreplicasmismatch + summary: Deployment has not matched the expected number of replicas. + expr: |- + ( + kube_deployment_spec_replicas{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"} + > + kube_deployment_status_replicas_available{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"} + ) and ( + changes(kube_deployment_status_replicas_updated{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"}[10m]) + == + 0 + ) + for: 15m + labels: + severity: warning +{{- if .Values.defaultRules.additionalRuleLabels }} +{{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} +{{- end }} +{{- end }} +{{- if not (.Values.defaultRules.disabled.KubeStatefulSetReplicasMismatch | default false) }} + - alert: KubeStatefulSetReplicasMismatch + annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} + description: StatefulSet {{`{{`}} $labels.namespace {{`}}`}}/{{`{{`}} $labels.statefulset {{`}}`}} has not matched the expected number of replicas for longer than 15 minutes. + runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubestatefulsetreplicasmismatch + summary: Deployment has not matched the expected number of replicas. + expr: |- + ( + kube_statefulset_status_replicas_ready{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"} + != + kube_statefulset_status_replicas{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"} + ) and ( + changes(kube_statefulset_status_replicas_updated{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"}[10m]) + == + 0 + ) + for: 15m + labels: + severity: warning +{{- if .Values.defaultRules.additionalRuleLabels }} +{{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} +{{- end }} +{{- end }} +{{- if not (.Values.defaultRules.disabled.KubeStatefulSetGenerationMismatch | default false) }} + - alert: KubeStatefulSetGenerationMismatch + annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} + description: StatefulSet generation for {{`{{`}} $labels.namespace {{`}}`}}/{{`{{`}} $labels.statefulset {{`}}`}} does not match, this indicates that the StatefulSet has failed but has not been rolled back. + runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubestatefulsetgenerationmismatch + summary: StatefulSet generation mismatch due to possible roll-back + expr: |- + kube_statefulset_status_observed_generation{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"} + != + kube_statefulset_metadata_generation{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"} + for: 15m + labels: + severity: warning +{{- if .Values.defaultRules.additionalRuleLabels }} +{{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} +{{- end }} +{{- end }} +{{- if not (.Values.defaultRules.disabled.KubeStatefulSetUpdateNotRolledOut | default false) }} + - alert: KubeStatefulSetUpdateNotRolledOut + annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} + description: StatefulSet {{`{{`}} $labels.namespace {{`}}`}}/{{`{{`}} $labels.statefulset {{`}}`}} update has not been rolled out. + runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubestatefulsetupdatenotrolledout + summary: StatefulSet update has not been rolled out. + expr: |- + ( + max without (revision) ( + kube_statefulset_status_current_revision{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"} + unless + kube_statefulset_status_update_revision{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"} + ) + * + ( + kube_statefulset_replicas{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"} + != + kube_statefulset_status_replicas_updated{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"} + ) + ) and ( + changes(kube_statefulset_status_replicas_updated{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"}[5m]) + == + 0 + ) + for: 15m + labels: + severity: warning +{{- if .Values.defaultRules.additionalRuleLabels }} +{{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} +{{- end }} +{{- end }} +{{- if not (.Values.defaultRules.disabled.KubeDaemonSetRolloutStuck | default false) }} + - alert: KubeDaemonSetRolloutStuck + annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} + description: DaemonSet {{`{{`}} $labels.namespace {{`}}`}}/{{`{{`}} $labels.daemonset {{`}}`}} has not finished or progressed for at least 15 minutes. + runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubedaemonsetrolloutstuck + summary: DaemonSet rollout is stuck. + expr: |- + ( + ( + kube_daemonset_status_current_number_scheduled{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"} + != + kube_daemonset_status_desired_number_scheduled{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"} + ) or ( + kube_daemonset_status_number_misscheduled{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"} + != + 0 + ) or ( + kube_daemonset_status_updated_number_scheduled{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"} + != + kube_daemonset_status_desired_number_scheduled{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"} + ) or ( + kube_daemonset_status_number_available{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"} + != + kube_daemonset_status_desired_number_scheduled{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"} + ) + ) and ( + changes(kube_daemonset_status_updated_number_scheduled{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"}[5m]) + == + 0 + ) + for: 15m + labels: + severity: warning +{{- if .Values.defaultRules.additionalRuleLabels }} +{{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} +{{- end }} +{{- end }} +{{- if not (.Values.defaultRules.disabled.KubeContainerWaiting | default false) }} + - alert: KubeContainerWaiting + annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} + description: pod/{{`{{`}} $labels.pod {{`}}`}} in namespace {{`{{`}} $labels.namespace {{`}}`}} on container {{`{{`}} $labels.container{{`}}`}} has been in waiting state for longer than 1 hour. + runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubecontainerwaiting + summary: Pod container waiting longer than 1 hour + expr: sum by (namespace, pod, container, cluster) (kube_pod_container_status_waiting_reason{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"}) > 0 + for: 1h + labels: + severity: warning +{{- if .Values.defaultRules.additionalRuleLabels }} +{{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} +{{- end }} +{{- end }} +{{- if not (.Values.defaultRules.disabled.KubeDaemonSetNotScheduled | default false) }} + - alert: KubeDaemonSetNotScheduled + annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} + description: '{{`{{`}} $value {{`}}`}} Pods of DaemonSet {{`{{`}} $labels.namespace {{`}}`}}/{{`{{`}} $labels.daemonset {{`}}`}} are not scheduled.' + runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubedaemonsetnotscheduled + summary: DaemonSet pods are not scheduled. + expr: |- + kube_daemonset_status_desired_number_scheduled{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"} + - + kube_daemonset_status_current_number_scheduled{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"} > 0 + for: 10m + labels: + severity: warning +{{- if .Values.defaultRules.additionalRuleLabels }} +{{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} +{{- end }} +{{- end }} +{{- if not (.Values.defaultRules.disabled.KubeDaemonSetMisScheduled | default false) }} + - alert: KubeDaemonSetMisScheduled + annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} + description: '{{`{{`}} $value {{`}}`}} Pods of DaemonSet {{`{{`}} $labels.namespace {{`}}`}}/{{`{{`}} $labels.daemonset {{`}}`}} are running where they are not supposed to run.' + runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubedaemonsetmisscheduled + summary: DaemonSet pods are misscheduled. + expr: kube_daemonset_status_number_misscheduled{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"} > 0 + for: 15m + labels: + severity: warning +{{- if .Values.defaultRules.additionalRuleLabels }} +{{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} +{{- end }} +{{- end }} +{{- if not (.Values.defaultRules.disabled.KubeJobNotCompleted | default false) }} + - alert: KubeJobNotCompleted + annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} + description: Job {{`{{`}} $labels.namespace {{`}}`}}/{{`{{`}} $labels.job_name {{`}}`}} is taking more than {{`{{`}} "43200" | humanizeDuration {{`}}`}} to complete. + runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubejobnotcompleted + summary: Job did not complete in time + expr: |- + time() - max by(namespace, job_name, cluster) (kube_job_status_start_time{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"} + and + kube_job_status_active{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"} > 0) > 43200 + labels: + severity: warning +{{- if .Values.defaultRules.additionalRuleLabels }} +{{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} +{{- end }} +{{- end }} +{{- if not (.Values.defaultRules.disabled.KubeJobFailed | default false) }} + - alert: KubeJobFailed + annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} + description: Job {{`{{`}} $labels.namespace {{`}}`}}/{{`{{`}} $labels.job_name {{`}}`}} failed to complete. Removing failed job after investigation should clear this alert. + runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubejobfailed + summary: Job failed to complete. + expr: kube_job_failed{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"} > 0 + for: 15m + labels: + severity: warning +{{- if .Values.defaultRules.additionalRuleLabels }} +{{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} +{{- end }} +{{- end }} +{{- if not (.Values.defaultRules.disabled.KubeHpaReplicasMismatch | default false) }} + - alert: KubeHpaReplicasMismatch + annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} + description: HPA {{`{{`}} $labels.namespace {{`}}`}}/{{`{{`}} $labels.horizontalpodautoscaler {{`}}`}} has not matched the desired number of replicas for longer than 15 minutes. + runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubehpareplicasmismatch + summary: HPA has not matched desired number of replicas. + expr: |- + (kube_horizontalpodautoscaler_status_desired_replicas{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"} + != + kube_horizontalpodautoscaler_status_current_replicas{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"}) + and + (kube_horizontalpodautoscaler_status_current_replicas{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"} + > + kube_horizontalpodautoscaler_spec_min_replicas{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"}) + and + (kube_horizontalpodautoscaler_status_current_replicas{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"} + < + kube_horizontalpodautoscaler_spec_max_replicas{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"}) + and + changes(kube_horizontalpodautoscaler_status_current_replicas{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"}[15m]) == 0 + for: 15m + labels: + severity: warning +{{- if .Values.defaultRules.additionalRuleLabels }} +{{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} +{{- end }} +{{- end }} +{{- if not (.Values.defaultRules.disabled.KubeHpaMaxedOut | default false) }} + - alert: KubeHpaMaxedOut + annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} + description: HPA {{`{{`}} $labels.namespace {{`}}`}}/{{`{{`}} $labels.horizontalpodautoscaler {{`}}`}} has been running at max replicas for longer than 15 minutes. + runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubehpamaxedout + summary: HPA is running at max replicas + expr: |- + kube_horizontalpodautoscaler_status_current_replicas{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"} + == + kube_horizontalpodautoscaler_spec_max_replicas{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"} + for: 15m + labels: + severity: warning +{{- if .Values.defaultRules.additionalRuleLabels }} +{{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} +{{- end }} +{{- end }} +{{- end }} \ No newline at end of file diff --git a/charts/rancher-project-monitoring/0.2.0-rc1/templates/prometheus/rules-1.14/kubernetes-storage.yaml b/charts/rancher-project-monitoring/0.2.0-rc1/templates/prometheus/rules-1.14/kubernetes-storage.yaml new file mode 100644 index 00000000..b6fe43fb --- /dev/null +++ b/charts/rancher-project-monitoring/0.2.0-rc1/templates/prometheus/rules-1.14/kubernetes-storage.yaml @@ -0,0 +1,160 @@ +{{- /* +Generated from 'kubernetes-storage' group from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/kubernetesControlPlane-prometheusRule.yaml +Do not change in-place! In order to change this file first read following link: +https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack +*/ -}} +{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} +{{- if and (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.defaultRules.create .Values.defaultRules.rules.kubernetesStorage }} +{{- $targetNamespace := .Values.defaultRules.appNamespacesTarget }} +apiVersion: monitoring.coreos.com/v1 +kind: PrometheusRule +metadata: + name: {{ printf "%s-%s" (include "project-prometheus-stack.fullname" .) "kubernetes-storage" | trunc 63 | trimSuffix "-" }} + namespace: {{ template "project-prometheus-stack.namespace" . }} + labels: + app: {{ template "project-prometheus-stack.name" . }} +{{ include "project-prometheus-stack.labels" . | indent 4 }} +{{- if .Values.defaultRules.labels }} +{{ toYaml .Values.defaultRules.labels | indent 4 }} +{{- end }} +{{- if .Values.defaultRules.annotations }} + annotations: +{{ toYaml .Values.defaultRules.annotations | indent 4 }} +{{- end }} +spec: + groups: + - name: kubernetes-storage + rules: +{{- if not (.Values.defaultRules.disabled.KubePersistentVolumeFillingUp | default false) }} + - alert: KubePersistentVolumeFillingUp + annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} + description: The PersistentVolume claimed by {{`{{`}} $labels.persistentvolumeclaim {{`}}`}} in Namespace {{`{{`}} $labels.namespace {{`}}`}} is only {{`{{`}} $value | humanizePercentage {{`}}`}} free. + runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubepersistentvolumefillingup + summary: PersistentVolume is filling up. + expr: |- + kubelet_volume_stats_available_bytes{namespace=~"{{ $targetNamespace }}", metrics_path="/metrics"} + / + kubelet_volume_stats_capacity_bytes{namespace=~"{{ $targetNamespace }}", metrics_path="/metrics"} + < 0.03 + and + kubelet_volume_stats_used_bytes{namespace=~"{{ $targetNamespace }}", metrics_path="/metrics"} > 0 + unless on(namespace, persistentvolumeclaim) + kube_persistentvolumeclaim_access_mode{ access_mode="ReadOnlyMany"} == 1 + unless on(namespace, persistentvolumeclaim) + kube_persistentvolumeclaim_labels{label_excluded_from_alerts="true"} == 1 + for: 1m + labels: + severity: critical +{{- if .Values.defaultRules.additionalRuleLabels }} +{{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} +{{- end }} +{{- end }} +{{- if not (.Values.defaultRules.disabled.KubePersistentVolumeFillingUp | default false) }} + - alert: KubePersistentVolumeFillingUp + annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} + description: Based on recent sampling, the PersistentVolume claimed by {{`{{`}} $labels.persistentvolumeclaim {{`}}`}} in Namespace {{`{{`}} $labels.namespace {{`}}`}} is expected to fill up within four days. Currently {{`{{`}} $value | humanizePercentage {{`}}`}} is available. + runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubepersistentvolumefillingup + summary: PersistentVolume is filling up. + expr: |- + ( + kubelet_volume_stats_available_bytes{namespace=~"{{ $targetNamespace }}", metrics_path="/metrics"} + / + kubelet_volume_stats_capacity_bytes{namespace=~"{{ $targetNamespace }}", metrics_path="/metrics"} + ) < 0.15 + and + kubelet_volume_stats_used_bytes{namespace=~"{{ $targetNamespace }}", metrics_path="/metrics"} > 0 + and + predict_linear(kubelet_volume_stats_available_bytes{namespace=~"{{ $targetNamespace }}", metrics_path="/metrics"}[6h], 4 * 24 * 3600) < 0 + unless on(namespace, persistentvolumeclaim) + kube_persistentvolumeclaim_access_mode{ access_mode="ReadOnlyMany"} == 1 + unless on(namespace, persistentvolumeclaim) + kube_persistentvolumeclaim_labels{label_excluded_from_alerts="true"} == 1 + for: 1h + labels: + severity: warning +{{- if .Values.defaultRules.additionalRuleLabels }} +{{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} +{{- end }} +{{- end }} +{{- if not (.Values.defaultRules.disabled.KubePersistentVolumeInodesFillingUp | default false) }} + - alert: KubePersistentVolumeInodesFillingUp + annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} + description: The PersistentVolume claimed by {{`{{`}} $labels.persistentvolumeclaim {{`}}`}} in Namespace {{`{{`}} $labels.namespace {{`}}`}} only has {{`{{`}} $value | humanizePercentage {{`}}`}} free inodes. + runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubepersistentvolumeinodesfillingup + summary: PersistentVolumeInodes are filling up. + expr: |- + ( + kubelet_volume_stats_inodes_free{namespace=~"{{ $targetNamespace }}", metrics_path="/metrics"} + / + kubelet_volume_stats_inodes{namespace=~"{{ $targetNamespace }}", metrics_path="/metrics"} + ) < 0.03 + and + kubelet_volume_stats_inodes_used{namespace=~"{{ $targetNamespace }}", metrics_path="/metrics"} > 0 + unless on(namespace, persistentvolumeclaim) + kube_persistentvolumeclaim_access_mode{ access_mode="ReadOnlyMany"} == 1 + unless on(namespace, persistentvolumeclaim) + kube_persistentvolumeclaim_labels{label_excluded_from_alerts="true"} == 1 + for: 1m + labels: + severity: critical +{{- if .Values.defaultRules.additionalRuleLabels }} +{{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} +{{- end }} +{{- end }} +{{- if not (.Values.defaultRules.disabled.KubePersistentVolumeInodesFillingUp | default false) }} + - alert: KubePersistentVolumeInodesFillingUp + annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} + description: Based on recent sampling, the PersistentVolume claimed by {{`{{`}} $labels.persistentvolumeclaim {{`}}`}} in Namespace {{`{{`}} $labels.namespace {{`}}`}} is expected to run out of inodes within four days. Currently {{`{{`}} $value | humanizePercentage {{`}}`}} of its inodes are free. + runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubepersistentvolumeinodesfillingup + summary: PersistentVolumeInodes are filling up. + expr: |- + ( + kubelet_volume_stats_inodes_free{namespace=~"{{ $targetNamespace }}", metrics_path="/metrics"} + / + kubelet_volume_stats_inodes{namespace=~"{{ $targetNamespace }}", metrics_path="/metrics"} + ) < 0.15 + and + kubelet_volume_stats_inodes_used{namespace=~"{{ $targetNamespace }}", metrics_path="/metrics"} > 0 + and + predict_linear(kubelet_volume_stats_inodes_free{namespace=~"{{ $targetNamespace }}", metrics_path="/metrics"}[6h], 4 * 24 * 3600) < 0 + unless on(namespace, persistentvolumeclaim) + kube_persistentvolumeclaim_access_mode{ access_mode="ReadOnlyMany"} == 1 + unless on(namespace, persistentvolumeclaim) + kube_persistentvolumeclaim_labels{label_excluded_from_alerts="true"} == 1 + for: 1h + labels: + severity: warning +{{- if .Values.defaultRules.additionalRuleLabels }} +{{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} +{{- end }} +{{- end }} +{{- if not (.Values.defaultRules.disabled.KubePersistentVolumeErrors | default false) }} + - alert: KubePersistentVolumeErrors + annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} + description: The persistent volume {{`{{`}} $labels.persistentvolume {{`}}`}} has status {{`{{`}} $labels.phase {{`}}`}}. + runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubepersistentvolumeerrors + summary: PersistentVolume is having issues with provisioning. + expr: kube_persistentvolume_status_phase{phase=~"Failed|Pending",job="kube-state-metrics"} > 0 + for: 5m + labels: + severity: critical +{{- if .Values.defaultRules.additionalRuleLabels }} +{{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} +{{- end }} +{{- end }} +{{- end }} \ No newline at end of file diff --git a/charts/rancher-project-monitoring/0.2.0-rc1/templates/prometheus/rules-1.14/prometheus.yaml b/charts/rancher-project-monitoring/0.2.0-rc1/templates/prometheus/rules-1.14/prometheus.yaml new file mode 100644 index 00000000..d3aa167d --- /dev/null +++ b/charts/rancher-project-monitoring/0.2.0-rc1/templates/prometheus/rules-1.14/prometheus.yaml @@ -0,0 +1,448 @@ +{{- /* +Generated from 'prometheus' group from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/prometheus-prometheusRule.yaml +Do not change in-place! In order to change this file first read following link: +https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack +*/ -}} +{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} +{{- if and (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.defaultRules.create .Values.defaultRules.rules.prometheus }} +{{- $prometheusJob := printf "%s-%s" (include "project-prometheus-stack.fullname" .) "prometheus" }} +{{- $namespace := printf "%s" (include "project-prometheus-stack.namespace" .) }} +apiVersion: monitoring.coreos.com/v1 +kind: PrometheusRule +metadata: + name: {{ printf "%s-%s" (include "project-prometheus-stack.fullname" .) "prometheus" | trunc 63 | trimSuffix "-" }} + namespace: {{ template "project-prometheus-stack.namespace" . }} + labels: + app: {{ template "project-prometheus-stack.name" . }} +{{ include "project-prometheus-stack.labels" . | indent 4 }} +{{- if .Values.defaultRules.labels }} +{{ toYaml .Values.defaultRules.labels | indent 4 }} +{{- end }} +{{- if .Values.defaultRules.annotations }} + annotations: +{{ toYaml .Values.defaultRules.annotations | indent 4 }} +{{- end }} +spec: + groups: + - name: prometheus + rules: +{{- if not (.Values.defaultRules.disabled.PrometheusBadConfig | default false) }} + - alert: PrometheusBadConfig + annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} + description: Prometheus {{`{{`}}$labels.namespace{{`}}`}}/{{`{{`}}$labels.pod{{`}}`}} has failed to reload its configuration. + runbook_url: {{ .Values.defaultRules.runbookUrl }}/prometheus/prometheusbadconfig + summary: Failed Prometheus configuration reload. + expr: |- + # Without max_over_time, failed scrapes could create false negatives, see + # https://www.robustperception.io/alerting-on-gauges-in-prometheus-2-0 for details. + max_over_time(prometheus_config_last_reload_successful{job="{{ $prometheusJob }}",namespace="{{ $namespace }}"}[5m]) == 0 + for: 10m + labels: + severity: critical +{{- if .Values.defaultRules.additionalRuleLabels }} +{{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} +{{- end }} +{{- end }} +{{- if not (.Values.defaultRules.disabled.PrometheusNotificationQueueRunningFull | default false) }} + - alert: PrometheusNotificationQueueRunningFull + annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} + description: Alert notification queue of Prometheus {{`{{`}}$labels.namespace{{`}}`}}/{{`{{`}}$labels.pod{{`}}`}} is running full. + runbook_url: {{ .Values.defaultRules.runbookUrl }}/prometheus/prometheusnotificationqueuerunningfull + summary: Prometheus alert notification queue predicted to run full in less than 30m. + expr: |- + # Without min_over_time, failed scrapes could create false negatives, see + # https://www.robustperception.io/alerting-on-gauges-in-prometheus-2-0 for details. + ( + predict_linear(prometheus_notifications_queue_length{job="{{ $prometheusJob }}",namespace="{{ $namespace }}"}[5m], 60 * 30) + > + min_over_time(prometheus_notifications_queue_capacity{job="{{ $prometheusJob }}",namespace="{{ $namespace }}"}[5m]) + ) + for: 15m + labels: + severity: warning +{{- if .Values.defaultRules.additionalRuleLabels }} +{{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} +{{- end }} +{{- end }} +{{- if not (.Values.defaultRules.disabled.PrometheusErrorSendingAlertsToSomeAlertmanagers | default false) }} + - alert: PrometheusErrorSendingAlertsToSomeAlertmanagers + annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} + description: '{{`{{`}} printf "%.1f" $value {{`}}`}}% errors while sending alerts from Prometheus {{`{{`}}$labels.namespace{{`}}`}}/{{`{{`}}$labels.pod{{`}}`}} to Alertmanager {{`{{`}}$labels.alertmanager{{`}}`}}.' + runbook_url: {{ .Values.defaultRules.runbookUrl }}/prometheus/prometheuserrorsendingalertstosomealertmanagers + summary: Prometheus has encountered more than 1% errors sending alerts to a specific Alertmanager. + expr: |- + ( + rate(prometheus_notifications_errors_total{job="{{ $prometheusJob }}",namespace="{{ $namespace }}"}[5m]) + / + rate(prometheus_notifications_sent_total{job="{{ $prometheusJob }}",namespace="{{ $namespace }}"}[5m]) + ) + * 100 + > 1 + for: 15m + labels: + severity: warning +{{- if .Values.defaultRules.additionalRuleLabels }} +{{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} +{{- end }} +{{- end }} +{{- if not (.Values.defaultRules.disabled.PrometheusNotConnectedToAlertmanagers | default false) }} + - alert: PrometheusNotConnectedToAlertmanagers + annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} + description: Prometheus {{`{{`}}$labels.namespace{{`}}`}}/{{`{{`}}$labels.pod{{`}}`}} is not connected to any Alertmanagers. + runbook_url: {{ .Values.defaultRules.runbookUrl }}/prometheus/prometheusnotconnectedtoalertmanagers + summary: Prometheus is not connected to any Alertmanagers. + expr: |- + # Without max_over_time, failed scrapes could create false negatives, see + # https://www.robustperception.io/alerting-on-gauges-in-prometheus-2-0 for details. + max_over_time(prometheus_notifications_alertmanagers_discovered{job="{{ $prometheusJob }}",namespace="{{ $namespace }}"}[5m]) < 1 + for: 10m + labels: + severity: warning +{{- if .Values.defaultRules.additionalRuleLabels }} +{{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} +{{- end }} +{{- end }} +{{- if not (.Values.defaultRules.disabled.PrometheusTSDBReloadsFailing | default false) }} + - alert: PrometheusTSDBReloadsFailing + annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} + description: Prometheus {{`{{`}}$labels.namespace{{`}}`}}/{{`{{`}}$labels.pod{{`}}`}} has detected {{`{{`}}$value | humanize{{`}}`}} reload failures over the last 3h. + runbook_url: {{ .Values.defaultRules.runbookUrl }}/prometheus/prometheustsdbreloadsfailing + summary: Prometheus has issues reloading blocks from disk. + expr: increase(prometheus_tsdb_reloads_failures_total{job="{{ $prometheusJob }}",namespace="{{ $namespace }}"}[3h]) > 0 + for: 4h + labels: + severity: warning +{{- if .Values.defaultRules.additionalRuleLabels }} +{{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} +{{- end }} +{{- end }} +{{- if not (.Values.defaultRules.disabled.PrometheusTSDBCompactionsFailing | default false) }} + - alert: PrometheusTSDBCompactionsFailing + annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} + description: Prometheus {{`{{`}}$labels.namespace{{`}}`}}/{{`{{`}}$labels.pod{{`}}`}} has detected {{`{{`}}$value | humanize{{`}}`}} compaction failures over the last 3h. + runbook_url: {{ .Values.defaultRules.runbookUrl }}/prometheus/prometheustsdbcompactionsfailing + summary: Prometheus has issues compacting blocks. + expr: increase(prometheus_tsdb_compactions_failed_total{job="{{ $prometheusJob }}",namespace="{{ $namespace }}"}[3h]) > 0 + for: 4h + labels: + severity: warning +{{- if .Values.defaultRules.additionalRuleLabels }} +{{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} +{{- end }} +{{- end }} +{{- if not (.Values.defaultRules.disabled.PrometheusNotIngestingSamples | default false) }} + - alert: PrometheusNotIngestingSamples + annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} + description: Prometheus {{`{{`}}$labels.namespace{{`}}`}}/{{`{{`}}$labels.pod{{`}}`}} is not ingesting samples. + runbook_url: {{ .Values.defaultRules.runbookUrl }}/prometheus/prometheusnotingestingsamples + summary: Prometheus is not ingesting samples. + expr: |- + ( + rate(prometheus_tsdb_head_samples_appended_total{job="{{ $prometheusJob }}",namespace="{{ $namespace }}"}[5m]) <= 0 + and + ( + sum without(scrape_job) (prometheus_target_metadata_cache_entries{job="{{ $prometheusJob }}",namespace="{{ $namespace }}"}) > 0 + or + sum without(rule_group) (prometheus_rule_group_rules{job="{{ $prometheusJob }}",namespace="{{ $namespace }}"}) > 0 + ) + ) + for: 10m + labels: + severity: warning +{{- if .Values.defaultRules.additionalRuleLabels }} +{{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} +{{- end }} +{{- end }} +{{- if not (.Values.defaultRules.disabled.PrometheusDuplicateTimestamps | default false) }} + - alert: PrometheusDuplicateTimestamps + annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} + description: Prometheus {{`{{`}}$labels.namespace{{`}}`}}/{{`{{`}}$labels.pod{{`}}`}} is dropping {{`{{`}} printf "%.4g" $value {{`}}`}} samples/s with different values but duplicated timestamp. + runbook_url: {{ .Values.defaultRules.runbookUrl }}/prometheus/prometheusduplicatetimestamps + summary: Prometheus is dropping samples with duplicate timestamps. + expr: rate(prometheus_target_scrapes_sample_duplicate_timestamp_total{job="{{ $prometheusJob }}",namespace="{{ $namespace }}"}[5m]) > 0 + for: 10m + labels: + severity: warning +{{- if .Values.defaultRules.additionalRuleLabels }} +{{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} +{{- end }} +{{- end }} +{{- if not (.Values.defaultRules.disabled.PrometheusOutOfOrderTimestamps | default false) }} + - alert: PrometheusOutOfOrderTimestamps + annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} + description: Prometheus {{`{{`}}$labels.namespace{{`}}`}}/{{`{{`}}$labels.pod{{`}}`}} is dropping {{`{{`}} printf "%.4g" $value {{`}}`}} samples/s with timestamps arriving out of order. + runbook_url: {{ .Values.defaultRules.runbookUrl }}/prometheus/prometheusoutofordertimestamps + summary: Prometheus drops samples with out-of-order timestamps. + expr: rate(prometheus_target_scrapes_sample_out_of_order_total{job="{{ $prometheusJob }}",namespace="{{ $namespace }}"}[5m]) > 0 + for: 10m + labels: + severity: warning +{{- if .Values.defaultRules.additionalRuleLabels }} +{{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} +{{- end }} +{{- end }} +{{- if not (.Values.defaultRules.disabled.PrometheusRemoteStorageFailures | default false) }} + - alert: PrometheusRemoteStorageFailures + annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} + description: Prometheus {{`{{`}}$labels.namespace{{`}}`}}/{{`{{`}}$labels.pod{{`}}`}} failed to send {{`{{`}} printf "%.1f" $value {{`}}`}}% of the samples to {{`{{`}} $labels.remote_name{{`}}`}}:{{`{{`}} $labels.url {{`}}`}} + runbook_url: {{ .Values.defaultRules.runbookUrl }}/prometheus/prometheusremotestoragefailures + summary: Prometheus fails to send samples to remote storage. + expr: |- + ( + (rate(prometheus_remote_storage_failed_samples_total{job="{{ $prometheusJob }}",namespace="{{ $namespace }}"}[5m]) or rate(prometheus_remote_storage_samples_failed_total{job="{{ $prometheusJob }}",namespace="{{ $namespace }}"}[5m])) + / + ( + (rate(prometheus_remote_storage_failed_samples_total{job="{{ $prometheusJob }}",namespace="{{ $namespace }}"}[5m]) or rate(prometheus_remote_storage_samples_failed_total{job="{{ $prometheusJob }}",namespace="{{ $namespace }}"}[5m])) + + + (rate(prometheus_remote_storage_succeeded_samples_total{job="{{ $prometheusJob }}",namespace="{{ $namespace }}"}[5m]) or rate(prometheus_remote_storage_samples_total{job="{{ $prometheusJob }}",namespace="{{ $namespace }}"}[5m])) + ) + ) + * 100 + > 1 + for: 15m + labels: + severity: critical +{{- if .Values.defaultRules.additionalRuleLabels }} +{{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} +{{- end }} +{{- end }} +{{- if not (.Values.defaultRules.disabled.PrometheusRemoteWriteBehind | default false) }} + - alert: PrometheusRemoteWriteBehind + annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} + description: Prometheus {{`{{`}}$labels.namespace{{`}}`}}/{{`{{`}}$labels.pod{{`}}`}} remote write is {{`{{`}} printf "%.1f" $value {{`}}`}}s behind for {{`{{`}} $labels.remote_name{{`}}`}}:{{`{{`}} $labels.url {{`}}`}}. + runbook_url: {{ .Values.defaultRules.runbookUrl }}/prometheus/prometheusremotewritebehind + summary: Prometheus remote write is behind. + expr: |- + # Without max_over_time, failed scrapes could create false negatives, see + # https://www.robustperception.io/alerting-on-gauges-in-prometheus-2-0 for details. + ( + max_over_time(prometheus_remote_storage_highest_timestamp_in_seconds{job="{{ $prometheusJob }}",namespace="{{ $namespace }}"}[5m]) + - ignoring(remote_name, url) group_right + max_over_time(prometheus_remote_storage_queue_highest_sent_timestamp_seconds{job="{{ $prometheusJob }}",namespace="{{ $namespace }}"}[5m]) + ) + > 120 + for: 15m + labels: + severity: critical +{{- if .Values.defaultRules.additionalRuleLabels }} +{{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} +{{- end }} +{{- end }} +{{- if not (.Values.defaultRules.disabled.PrometheusRemoteWriteDesiredShards | default false) }} + - alert: PrometheusRemoteWriteDesiredShards + annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} + description: Prometheus {{`{{`}}$labels.namespace{{`}}`}}/{{`{{`}}$labels.pod{{`}}`}} remote write desired shards calculation wants to run {{`{{`}} $value {{`}}`}} shards for queue {{`{{`}} $labels.remote_name{{`}}`}}:{{`{{`}} $labels.url {{`}}`}}, which is more than the max of {{`{{`}} printf `prometheus_remote_storage_shards_max{instance="%s",job="{{ $prometheusJob }}",namespace="{{ $namespace }}"}` $labels.instance | query | first | value {{`}}`}}. + runbook_url: {{ .Values.defaultRules.runbookUrl }}/prometheus/prometheusremotewritedesiredshards + summary: Prometheus remote write desired shards calculation wants to run more than configured max shards. + expr: |- + # Without max_over_time, failed scrapes could create false negatives, see + # https://www.robustperception.io/alerting-on-gauges-in-prometheus-2-0 for details. + ( + max_over_time(prometheus_remote_storage_shards_desired{job="{{ $prometheusJob }}",namespace="{{ $namespace }}"}[5m]) + > + max_over_time(prometheus_remote_storage_shards_max{job="{{ $prometheusJob }}",namespace="{{ $namespace }}"}[5m]) + ) + for: 15m + labels: + severity: warning +{{- if .Values.defaultRules.additionalRuleLabels }} +{{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} +{{- end }} +{{- end }} +{{- if not (.Values.defaultRules.disabled.PrometheusRuleFailures | default false) }} + - alert: PrometheusRuleFailures + annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} + description: Prometheus {{`{{`}}$labels.namespace{{`}}`}}/{{`{{`}}$labels.pod{{`}}`}} has failed to evaluate {{`{{`}} printf "%.0f" $value {{`}}`}} rules in the last 5m. + runbook_url: {{ .Values.defaultRules.runbookUrl }}/prometheus/prometheusrulefailures + summary: Prometheus is failing rule evaluations. + expr: increase(prometheus_rule_evaluation_failures_total{job="{{ $prometheusJob }}",namespace="{{ $namespace }}"}[5m]) > 0 + for: 15m + labels: + severity: critical +{{- if .Values.defaultRules.additionalRuleLabels }} +{{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} +{{- end }} +{{- end }} +{{- if not (.Values.defaultRules.disabled.PrometheusMissingRuleEvaluations | default false) }} + - alert: PrometheusMissingRuleEvaluations + annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} + description: Prometheus {{`{{`}}$labels.namespace{{`}}`}}/{{`{{`}}$labels.pod{{`}}`}} has missed {{`{{`}} printf "%.0f" $value {{`}}`}} rule group evaluations in the last 5m. + runbook_url: {{ .Values.defaultRules.runbookUrl }}/prometheus/prometheusmissingruleevaluations + summary: Prometheus is missing rule evaluations due to slow rule group evaluation. + expr: increase(prometheus_rule_group_iterations_missed_total{job="{{ $prometheusJob }}",namespace="{{ $namespace }}"}[5m]) > 0 + for: 15m + labels: + severity: warning +{{- if .Values.defaultRules.additionalRuleLabels }} +{{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} +{{- end }} +{{- end }} +{{- if not (.Values.defaultRules.disabled.PrometheusTargetLimitHit | default false) }} + - alert: PrometheusTargetLimitHit + annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} + description: Prometheus {{`{{`}}$labels.namespace{{`}}`}}/{{`{{`}}$labels.pod{{`}}`}} has dropped {{`{{`}} printf "%.0f" $value {{`}}`}} targets because the number of targets exceeded the configured target_limit. + runbook_url: {{ .Values.defaultRules.runbookUrl }}/prometheus/prometheustargetlimithit + summary: Prometheus has dropped targets because some scrape configs have exceeded the targets limit. + expr: increase(prometheus_target_scrape_pool_exceeded_target_limit_total{job="{{ $prometheusJob }}",namespace="{{ $namespace }}"}[5m]) > 0 + for: 15m + labels: + severity: warning +{{- if .Values.defaultRules.additionalRuleLabels }} +{{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} +{{- end }} +{{- end }} +{{- if not (.Values.defaultRules.disabled.PrometheusLabelLimitHit | default false) }} + - alert: PrometheusLabelLimitHit + annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} + description: Prometheus {{`{{`}}$labels.namespace{{`}}`}}/{{`{{`}}$labels.pod{{`}}`}} has dropped {{`{{`}} printf "%.0f" $value {{`}}`}} targets because some samples exceeded the configured label_limit, label_name_length_limit or label_value_length_limit. + runbook_url: {{ .Values.defaultRules.runbookUrl }}/prometheus/prometheuslabellimithit + summary: Prometheus has dropped targets because some scrape configs have exceeded the labels limit. + expr: increase(prometheus_target_scrape_pool_exceeded_label_limits_total{job="{{ $prometheusJob }}",namespace="{{ $namespace }}"}[5m]) > 0 + for: 15m + labels: + severity: warning +{{- if .Values.defaultRules.additionalRuleLabels }} +{{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} +{{- end }} +{{- end }} +{{- if not (.Values.defaultRules.disabled.PrometheusScrapeBodySizeLimitHit | default false) }} + - alert: PrometheusScrapeBodySizeLimitHit + annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} + description: Prometheus {{`{{`}}$labels.namespace{{`}}`}}/{{`{{`}}$labels.pod{{`}}`}} has failed {{`{{`}} printf "%.0f" $value {{`}}`}} scrapes in the last 5m because some targets exceeded the configured body_size_limit. + runbook_url: {{ .Values.defaultRules.runbookUrl }}/prometheus/prometheusscrapebodysizelimithit + summary: Prometheus has dropped some targets that exceeded body size limit. + expr: increase(prometheus_target_scrapes_exceeded_body_size_limit_total{job="{{ $prometheusJob }}",namespace="{{ $namespace }}"}[5m]) > 0 + for: 15m + labels: + severity: warning +{{- if .Values.defaultRules.additionalRuleLabels }} +{{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} +{{- end }} +{{- end }} +{{- if not (.Values.defaultRules.disabled.PrometheusScrapeSampleLimitHit | default false) }} + - alert: PrometheusScrapeSampleLimitHit + annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} + description: Prometheus {{`{{`}}$labels.namespace{{`}}`}}/{{`{{`}}$labels.pod{{`}}`}} has failed {{`{{`}} printf "%.0f" $value {{`}}`}} scrapes in the last 5m because some targets exceeded the configured sample_limit. + runbook_url: {{ .Values.defaultRules.runbookUrl }}/prometheus/prometheusscrapesamplelimithit + summary: Prometheus has failed scrapes that have exceeded the configured sample limit. + expr: increase(prometheus_target_scrapes_exceeded_sample_limit_total{job="{{ $prometheusJob }}",namespace="{{ $namespace }}"}[5m]) > 0 + for: 15m + labels: + severity: warning +{{- if .Values.defaultRules.additionalRuleLabels }} +{{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} +{{- end }} +{{- end }} +{{- if not (.Values.defaultRules.disabled.PrometheusTargetSyncFailure | default false) }} + - alert: PrometheusTargetSyncFailure + annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} + description: '{{`{{`}} printf "%.0f" $value {{`}}`}} targets in Prometheus {{`{{`}}$labels.namespace{{`}}`}}/{{`{{`}}$labels.pod{{`}}`}} have failed to sync because invalid configuration was supplied.' + runbook_url: {{ .Values.defaultRules.runbookUrl }}/prometheus/prometheustargetsyncfailure + summary: Prometheus has failed to sync targets. + expr: increase(prometheus_target_sync_failed_total{job="{{ $prometheusJob }}",namespace="{{ $namespace }}"}[30m]) > 0 + for: 5m + labels: + severity: critical +{{- if .Values.defaultRules.additionalRuleLabels }} +{{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} +{{- end }} +{{- end }} +{{- if not (.Values.defaultRules.disabled.PrometheusHighQueryLoad | default false) }} + - alert: PrometheusHighQueryLoad + annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} + description: Prometheus {{`{{`}}$labels.namespace{{`}}`}}/{{`{{`}}$labels.pod{{`}}`}} query API has less than 20% available capacity in its query engine for the last 15 minutes. + runbook_url: {{ .Values.defaultRules.runbookUrl }}/prometheus/prometheushighqueryload + summary: Prometheus is reaching its maximum capacity serving concurrent requests. + expr: avg_over_time(prometheus_engine_queries{job="{{ $prometheusJob }}",namespace="{{ $namespace }}"}[5m]) / max_over_time(prometheus_engine_queries_concurrent_max{job="{{ $prometheusJob }}",namespace="{{ $namespace }}"}[5m]) > 0.8 + for: 15m + labels: + severity: warning +{{- if .Values.defaultRules.additionalRuleLabels }} +{{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} +{{- end }} +{{- end }} +{{- if not (.Values.defaultRules.disabled.PrometheusErrorSendingAlertsToAnyAlertmanager | default false) }} + - alert: PrometheusErrorSendingAlertsToAnyAlertmanager + annotations: +{{- if .Values.defaultRules.additionalRuleAnnotations }} +{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }} +{{- end }} + description: '{{`{{`}} printf "%.1f" $value {{`}}`}}% minimum errors while sending alerts from Prometheus {{`{{`}}$labels.namespace{{`}}`}}/{{`{{`}}$labels.pod{{`}}`}} to any Alertmanager.' + runbook_url: {{ .Values.defaultRules.runbookUrl }}/prometheus/prometheuserrorsendingalertstoanyalertmanager + summary: Prometheus encounters more than 3% errors sending alerts to any Alertmanager. + expr: |- + min without (alertmanager) ( + rate(prometheus_notifications_errors_total{job="{{ $prometheusJob }}",namespace="{{ $namespace }}",alertmanager!~``}[5m]) + / + rate(prometheus_notifications_sent_total{job="{{ $prometheusJob }}",namespace="{{ $namespace }}",alertmanager!~``}[5m]) + ) + * 100 + > 3 + for: 15m + labels: + severity: critical +{{- if .Values.defaultRules.additionalRuleLabels }} +{{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} +{{- end }} +{{- end }} +{{- end }} \ No newline at end of file diff --git a/charts/rancher-project-monitoring/0.2.0-rc1/templates/prometheus/service.yaml b/charts/rancher-project-monitoring/0.2.0-rc1/templates/prometheus/service.yaml new file mode 100644 index 00000000..411ec5fa --- /dev/null +++ b/charts/rancher-project-monitoring/0.2.0-rc1/templates/prometheus/service.yaml @@ -0,0 +1,56 @@ +{{- if .Values.prometheus.enabled }} +apiVersion: v1 +kind: Service +metadata: + name: {{ template "project-prometheus-stack.fullname" . }}-prometheus + namespace: {{ template "project-prometheus-stack.namespace" . }} + labels: + app: {{ template "project-prometheus-stack.name" . }}-prometheus + self-monitor: {{ .Values.prometheus.serviceMonitor.selfMonitor | quote }} +{{ include "project-prometheus-stack.labels" . | indent 4 }} +{{- if .Values.prometheus.service.labels }} +{{ toYaml .Values.prometheus.service.labels | indent 4 }} +{{- end }} +{{- if .Values.prometheus.service.annotations }} + annotations: +{{ toYaml .Values.prometheus.service.annotations | indent 4 }} +{{- end }} +spec: +{{- if .Values.prometheus.service.clusterIP }} + clusterIP: {{ .Values.prometheus.service.clusterIP }} +{{- end }} +{{- if .Values.prometheus.service.externalIPs }} + externalIPs: +{{ toYaml .Values.prometheus.service.externalIPs | indent 4 }} +{{- end }} +{{- if .Values.prometheus.service.loadBalancerIP }} + loadBalancerIP: {{ .Values.prometheus.service.loadBalancerIP }} +{{- end }} +{{- if .Values.prometheus.service.loadBalancerSourceRanges }} + loadBalancerSourceRanges: + {{- range $cidr := .Values.prometheus.service.loadBalancerSourceRanges }} + - {{ $cidr }} + {{- end }} +{{- end }} +{{- if ne .Values.prometheus.service.type "ClusterIP" }} + externalTrafficPolicy: {{ .Values.prometheus.service.externalTrafficPolicy }} +{{- end }} + ports: + - name: {{ .Values.prometheus.prometheusSpec.portName }} + {{- if eq .Values.prometheus.service.type "NodePort" }} + nodePort: {{ .Values.prometheus.service.nodePort }} + {{- end }} + port: {{ .Values.prometheus.service.port }} + targetPort: {{ .Values.prometheus.service.targetPort }} +{{- if .Values.prometheus.service.additionalPorts }} +{{ toYaml .Values.prometheus.service.additionalPorts | indent 2 }} +{{- end }} + publishNotReadyAddresses: {{ .Values.prometheus.service.publishNotReadyAddresses }} + selector: + app.kubernetes.io/name: prometheus + prometheus: {{ template "project-prometheus-stack.prometheus.crname" . }} +{{- if .Values.prometheus.service.sessionAffinity }} + sessionAffinity: {{ .Values.prometheus.service.sessionAffinity }} +{{- end }} + type: "{{ .Values.prometheus.service.type }}" +{{- end }} diff --git a/charts/rancher-project-monitoring/0.2.0-rc1/templates/prometheus/serviceaccount.yaml b/charts/rancher-project-monitoring/0.2.0-rc1/templates/prometheus/serviceaccount.yaml new file mode 100644 index 00000000..b4d44164 --- /dev/null +++ b/charts/rancher-project-monitoring/0.2.0-rc1/templates/prometheus/serviceaccount.yaml @@ -0,0 +1,20 @@ +{{- if and .Values.prometheus.enabled .Values.prometheus.serviceAccount.create }} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ template "project-prometheus-stack.prometheus.serviceAccountName" . }} + namespace: {{ template "project-prometheus-stack.namespace" . }} + labels: + app: {{ template "project-prometheus-stack.name" . }}-prometheus + app.kubernetes.io/name: {{ template "project-prometheus-stack.name" . }}-prometheus + app.kubernetes.io/component: prometheus +{{ include "project-prometheus-stack.labels" . | indent 4 }} +{{- if .Values.prometheus.serviceAccount.annotations }} + annotations: +{{ toYaml .Values.prometheus.serviceAccount.annotations | indent 4 }} +{{- end }} +{{- if .Values.global.imagePullSecrets }} +imagePullSecrets: +{{ include "project-prometheus-stack.imagePullSecrets" . | trim | indent 2 }} +{{- end }} +{{- end }} diff --git a/charts/rancher-project-monitoring/0.2.0-rc1/templates/prometheus/servicemonitor.yaml b/charts/rancher-project-monitoring/0.2.0-rc1/templates/prometheus/servicemonitor.yaml new file mode 100644 index 00000000..b1190701 --- /dev/null +++ b/charts/rancher-project-monitoring/0.2.0-rc1/templates/prometheus/servicemonitor.yaml @@ -0,0 +1,42 @@ +{{- if and .Values.prometheus.enabled .Values.prometheus.serviceMonitor.selfMonitor }} +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + name: {{ template "project-prometheus-stack.fullname" . }}-prometheus + namespace: {{ template "project-prometheus-stack.namespace" . }} + labels: + app: {{ template "project-prometheus-stack.name" . }}-prometheus +{{ include "project-prometheus-stack.labels" . | indent 4 }} +spec: + selector: + matchLabels: + app: {{ template "project-prometheus-stack.name" . }}-prometheus + release: {{ $.Release.Name | quote }} + self-monitor: "true" + namespaceSelector: + matchNames: + - {{ printf "%s" (include "project-prometheus-stack.namespace" .) | quote }} + endpoints: + - port: {{ .Values.prometheus.prometheusSpec.portName }} + {{- if .Values.prometheus.serviceMonitor.interval }} + interval: {{ .Values.prometheus.serviceMonitor.interval }} + {{- end }} + {{- if .Values.prometheus.serviceMonitor.scheme }} + scheme: {{ .Values.prometheus.serviceMonitor.scheme }} + {{- end }} + {{- if .Values.prometheus.serviceMonitor.tlsConfig }} + tlsConfig: {{ toYaml .Values.prometheus.serviceMonitor.tlsConfig | nindent 6 }} + {{- end }} + {{- if .Values.prometheus.serviceMonitor.bearerTokenFile }} + bearerTokenFile: {{ .Values.prometheus.serviceMonitor.bearerTokenFile }} + {{- end }} + path: "{{ trimSuffix "/" .Values.prometheus.prometheusSpec.routePrefix }}/metrics" +{{- if .Values.prometheus.serviceMonitor.metricRelabelings }} + metricRelabelings: +{{ tpl (toYaml .Values.prometheus.serviceMonitor.metricRelabelings | indent 6) . }} +{{- end }} +{{- if .Values.prometheus.serviceMonitor.relabelings }} + relabelings: +{{ toYaml .Values.prometheus.serviceMonitor.relabelings | indent 6 }} +{{- end }} +{{- end }} diff --git a/charts/rancher-project-monitoring/0.2.0-rc1/templates/validate-install-crd.yaml b/charts/rancher-project-monitoring/0.2.0-rc1/templates/validate-install-crd.yaml new file mode 100644 index 00000000..b0dcf188 --- /dev/null +++ b/charts/rancher-project-monitoring/0.2.0-rc1/templates/validate-install-crd.yaml @@ -0,0 +1,21 @@ +#{{- if gt (len (lookup "rbac.authorization.k8s.io/v1" "ClusterRole" "" "")) 0 -}} +# {{- $found := dict -}} +# {{- set $found "monitoring.coreos.com/v1alpha1/AlertmanagerConfig" false -}} +# {{- set $found "monitoring.coreos.com/v1/Alertmanager" false -}} +# {{- set $found "monitoring.coreos.com/v1/PodMonitor" false -}} +# {{- set $found "monitoring.coreos.com/v1/Probe" false -}} +# {{- set $found "monitoring.coreos.com/v1/Prometheus" false -}} +# {{- set $found "monitoring.coreos.com/v1/PrometheusRule" false -}} +# {{- set $found "monitoring.coreos.com/v1/ServiceMonitor" false -}} +# {{- set $found "monitoring.coreos.com/v1/ThanosRuler" false -}} +# {{- range .Capabilities.APIVersions -}} +# {{- if hasKey $found (toString .) -}} +# {{- set $found (toString .) true -}} +# {{- end -}} +# {{- end -}} +# {{- range $_, $exists := $found -}} +# {{- if (eq $exists false) -}} +# {{- required "Required Prometheus Operator CRDs are missing. Please install Prometheus Operator (e.g. rancher-monitoring) before installing this chart." "" -}} +# {{- end -}} +# {{- end -}} +#{{- end -}} \ No newline at end of file diff --git a/charts/rancher-project-monitoring/0.2.0-rc1/values.yaml b/charts/rancher-project-monitoring/0.2.0-rc1/values.yaml new file mode 100644 index 00000000..6bc9d6b8 --- /dev/null +++ b/charts/rancher-project-monitoring/0.2.0-rc1/values.yaml @@ -0,0 +1,1521 @@ +# Default values for project-prometheus-stack. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +# Rancher Project Monitoring Configuration + +## Provide a name in place of project-prometheus-stack for `app:` labels +## NOTE: If you change this value, you must update the prometheus-adapter.prometheus.url +## +nameOverride: "rancher-project-monitoring" + +## Override the deployment namespace +## NOTE: If you change this value, you must update the prometheus-adapter.prometheus.url +## +namespaceOverride: "" + +## Provide a k8s version to auto dashboard import script example: kubeTargetVersionOverride: 1.16.6 +## +kubeTargetVersionOverride: "" + +## Allow kubeVersion to be overridden while creating the ingress +## +kubeVersionOverride: "" + +## Provide a name to substitute for the full names of resources +## +fullnameOverride: "" + +## Labels to apply to all resources +## +commonLabels: {} +# scmhash: abc123 +# myLabel: aakkmd + +## Create default rules for monitoring the cluster +## +defaultRules: + create: true + rules: + general: true + prometheus: true + alertmanager: true + kubernetesApps: true + kubernetesStorage: true + + ## Reduce app namespace alert scope + appNamespacesTarget: ".*" + + ## Labels for default rules + labels: {} + ## Annotations for default rules + annotations: {} + + ## Additional labels for PrometheusRule alerts + additionalRuleLabels: {} + + ## Additional annotations for PrometheusRule alerts + additionalRuleAnnotations: {} + + ## Prefix for runbook URLs. Use this to override the first part of the runbookURLs that is common to all rules. + runbookUrl: "https://runbooks.prometheus-operator.dev/runbooks" + + ## Disabled PrometheusRule alerts + disabled: {} + +## +global: + cattle: + systemDefaultRegistry: "" + projectNamespaceSelector: {} + projectNamespaces: [] + kubectl: + repository: rancher/kubectl + tag: v1.20.2 + pullPolicy: IfNotPresent + rbac: + ## Create RBAC resources for ServiceAccounts and users + ## + create: true + + userRoles: + ## Create default user Roles that the Helm Project Operator will automatically create RoleBindings for + ## + ## How does this work? + ## + ## The operator will watch for all subjects bound to each Kubernetes default ClusterRole in the project registration namespace + ## where the ProjectHelmChart that deployed this chart belongs to; if it observes a subject bound to a particular role in + ## the project registration namespace (e.g. edit) and if a Role exists that is deployed by this chart with the label + ## 'helm.cattle.io/project-helm-chart-role-aggregate-from': '', it will automaticaly create a RoleBinding + ## in the release namespace binding all such subjects to that Role. + ## + ## Note: while the default behavior is to use the Kubernetes default ClusterRole, the operator deployment (prometheus-federator) + ## can be configured to use a different set of ClusterRoles as the source of truth for admin, edit, and view permissions. + ## + create: true + ## Add labels to Roles + aggregateToDefaultRoles: true + + pspEnabled: true + pspAnnotations: {} + ## Specify pod annotations + ## Ref: https://kubernetes.io/docs/concepts/policy/pod-security-policy/#apparmor + ## Ref: https://kubernetes.io/docs/concepts/policy/pod-security-policy/#seccomp + ## Ref: https://kubernetes.io/docs/concepts/policy/pod-security-policy/#sysctl + ## + # seccomp.security.alpha.kubernetes.io/allowedProfileNames: '*' + # seccomp.security.alpha.kubernetes.io/defaultProfileName: 'docker/default' + # apparmor.security.beta.kubernetes.io/defaultProfileName: 'runtime/default' + + ## Reference to one or more secrets to be used when pulling images + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ + ## + imagePullSecrets: [] + # - name: "image-pull-secret" + # or + # - "image-pull-secret" + +federate: + ## enabled indicates whether to add federation to any Project Prometheus Stacks by default + ## If not enabled, no federation will be turned on + enabled: true + + # Change this to point at all Prometheuses you want all your Project Prometheus Stacks to federate from + # By default, this matches the default deployment of Rancher Monitoring + targets: + - rancher-monitoring-prometheus.cattle-monitoring-system.svc:9090 + + ## Scrape interval + interval: "15s" + +## Configuration for alertmanager +## ref: https://prometheus.io/docs/alerting/alertmanager/ +## +alertmanager: + + ## Deploy alertmanager + ## + enabled: true + + ## Annotations for Alertmanager + ## + annotations: {} + + ## Api that prometheus will use to communicate with alertmanager. Possible values are v1, v2 + ## + apiVersion: v2 + + ## Service account for Alertmanager to use. + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ + ## + serviceAccount: + create: true + name: "" + annotations: {} + + ## Configure pod disruption budgets for Alertmanager + ## ref: https://kubernetes.io/docs/tasks/run-application/configure-pdb/#specifying-a-poddisruptionbudget + ## This configuration is immutable once created and will require the PDB to be deleted to be changed + ## https://github.com/kubernetes/kubernetes/issues/45398 + ## + podDisruptionBudget: + enabled: false + minAvailable: 1 + maxUnavailable: "" + + ## Alertmanager configuration directives + ## ref: https://prometheus.io/docs/alerting/configuration/#configuration-file + ## https://prometheus.io/webtools/alerting/routing-tree-editor/ + ## + config: + global: + resolve_timeout: 5m + inhibit_rules: + - source_matchers: + - 'severity = critical' + target_matchers: + - 'severity =~ warning|info' + equal: + - 'namespace' + - 'alertname' + - source_matchers: + - 'severity = warning' + target_matchers: + - 'severity = info' + equal: + - 'namespace' + - 'alertname' + - source_matchers: + - 'alertname = InfoInhibitor' + target_matchers: + - 'severity = info' + equal: + - 'namespace' + route: + group_by: ['namespace'] + group_wait: 30s + group_interval: 5m + repeat_interval: 12h + receiver: 'null' + routes: + - receiver: 'null' + matchers: + - alertname =~ "InfoInhibitor|Watchdog" + receivers: + - name: 'null' + templates: + - '/etc/alertmanager/config/*.tmpl' + + ## Pass the Alertmanager configuration directives through Helm's templating + ## engine. If the Alertmanager configuration contains Alertmanager templates, + ## they'll need to be properly escaped so that they are not interpreted by + ## Helm + ## ref: https://helm.sh/docs/developing_charts/#using-the-tpl-function + ## https://prometheus.io/docs/alerting/configuration/#tmpl_string + ## https://prometheus.io/docs/alerting/notifications/ + ## https://prometheus.io/docs/alerting/notification_examples/ + tplConfig: false + + ## Alertmanager template files to format alerts + ## By default, templateFiles are placed in /etc/alertmanager/config/ and if + ## they have a .tmpl file suffix will be loaded. See config.templates above + ## to change, add other suffixes. If adding other suffixes, be sure to update + ## config.templates above to include those suffixes. + ## ref: https://prometheus.io/docs/alerting/notifications/ + ## https://prometheus.io/docs/alerting/notification_examples/ + ## + + templateFiles: + rancher_defaults.tmpl: |- + {{- define "slack.rancher.text" -}} + {{ template "rancher.text_multiple" . }} + {{- end -}} + + {{- define "rancher.text_multiple" -}} + *[GROUP - Details]* + One or more alarms in this group have triggered a notification. + + {{- if gt (len .GroupLabels.Values) 0 }} + *Group Labels:* + {{- range .GroupLabels.SortedPairs }} + • *{{ .Name }}:* `{{ .Value }}` + {{- end }} + {{- end }} + {{- if .ExternalURL }} + *Link to AlertManager:* {{ .ExternalURL }} + {{- end }} + + {{- range .Alerts }} + {{ template "rancher.text_single" . }} + {{- end }} + {{- end -}} + + {{- define "rancher.text_single" -}} + {{- if .Labels.alertname }} + *[ALERT - {{ .Labels.alertname }}]* + {{- else }} + *[ALERT]* + {{- end }} + {{- if .Labels.severity }} + *Severity:* `{{ .Labels.severity }}` + {{- end }} + {{- if .Labels.cluster }} + *Cluster:* {{ .Labels.cluster }} + {{- end }} + {{- if .Annotations.summary }} + *Summary:* {{ .Annotations.summary }} + {{- end }} + {{- if .Annotations.message }} + *Message:* {{ .Annotations.message }} + {{- end }} + {{- if .Annotations.description }} + *Description:* {{ .Annotations.description }} + {{- end }} + {{- if .Annotations.runbook_url }} + *Runbook URL:* <{{ .Annotations.runbook_url }}|:spiral_note_pad:> + {{- end }} + {{- with .Labels }} + {{- with .Remove (stringSlice "alertname" "severity" "cluster") }} + {{- if gt (len .) 0 }} + *Additional Labels:* + {{- range .SortedPairs }} + • *{{ .Name }}:* `{{ .Value }}` + {{- end }} + {{- end }} + {{- end }} + {{- end }} + {{- with .Annotations }} + {{- with .Remove (stringSlice "summary" "message" "description" "runbook_url") }} + {{- if gt (len .) 0 }} + *Additional Annotations:* + {{- range .SortedPairs }} + • *{{ .Name }}:* `{{ .Value }}` + {{- end }} + {{- end }} + {{- end }} + {{- end }} + {{- end -}} + + ingress: + enabled: false + + # For Kubernetes >= 1.18 you should specify the ingress-controller via the field ingressClassName + # See https://kubernetes.io/blog/2020/04/02/improvements-to-the-ingress-api-in-kubernetes-1.18/#specifying-the-class-of-an-ingress + # ingressClassName: nginx + + annotations: {} + + labels: {} + + ## Redirect ingress to an additional defined port on the service + # servicePort: 8081 + + ## Hosts must be provided if Ingress is enabled. + ## + hosts: [] + # - alertmanager.domain.com + + ## Paths to use for ingress rules - one path should match the alertmanagerSpec.routePrefix + ## + paths: [] + # - / + + ## For Kubernetes >= 1.18 you should specify the pathType (determines how Ingress paths should be matched) + ## See https://kubernetes.io/blog/2020/04/02/improvements-to-the-ingress-api-in-kubernetes-1.18/#better-path-matching-with-path-types + # pathType: ImplementationSpecific + + ## TLS configuration for Alertmanager Ingress + ## Secret must be manually created in the namespace + ## + tls: [] + # - secretName: alertmanager-general-tls + # hosts: + # - alertmanager.example.com + + ## Configuration for Alertmanager secret + ## + secret: + annotations: {} + + ## Configuration for Alertmanager service + ## + service: + annotations: {} + labels: {} + clusterIP: "" + + ## Port for Alertmanager Service to listen on + ## + port: 9093 + ## To be used with a proxy extraContainer port + ## + targetPort: 9093 + ## Port to expose on each node + ## Only used if service.type is 'NodePort' + ## + nodePort: 30903 + ## List of IP addresses at which the Prometheus server service is available + ## Ref: https://kubernetes.io/docs/user-guide/services/#external-ips + ## + + ## Additional ports to open for Alertmanager service + additionalPorts: [] + # additionalPorts: + # - name: authenticated + # port: 8081 + # targetPort: 8081 + + externalIPs: [] + loadBalancerIP: "" + loadBalancerSourceRanges: [] + + ## Denotes if this Service desires to route external traffic to node-local or cluster-wide endpoints + ## + externalTrafficPolicy: Cluster + + ## Service type + ## + type: ClusterIP + + ## If true, create a serviceMonitor for alertmanager + ## + serviceMonitor: + ## Scrape interval. If not set, the Prometheus default scrape interval is used. + ## + interval: "" + selfMonitor: true + + ## proxyUrl: URL of a proxy that should be used for scraping. + ## + proxyUrl: "" + + ## scheme: HTTP scheme to use for scraping. Can be used with `tlsConfig` for example if using istio mTLS. + scheme: "" + + ## tlsConfig: TLS configuration to use when scraping the endpoint. For example if using istio mTLS. + ## Of type: https://github.com/coreos/prometheus-operator/blob/main/Documentation/api.md#tlsconfig + tlsConfig: {} + + bearerTokenFile: + + ## MetricRelabelConfigs to apply to samples after scraping, but before ingestion. + ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#relabelconfig + ## + metricRelabelings: [] + # - action: keep + # regex: 'kube_(daemonset|deployment|pod|namespace|node|statefulset).+' + # sourceLabels: [__name__] + + ## RelabelConfigs to apply to samples before scraping + ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#relabelconfig + ## + relabelings: [] + # - sourceLabels: [__meta_kubernetes_pod_node_name] + # separator: ; + # regex: ^(.*)$ + # targetLabel: nodename + # replacement: $1 + # action: replace + + ## Settings affecting alertmanagerSpec + ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#alertmanagerspec + ## + alertmanagerSpec: + ## Standard object's metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata + ## Metadata Labels and Annotations gets propagated to the Alertmanager pods. + ## + podMetadata: {} + + ## Image of Alertmanager + ## + image: + repository: rancher/mirrored-prometheus-alertmanager + tag: v0.24.0 + sha: "" + + ## Secrets is a list of Secrets in the same namespace as the Alertmanager object, which shall be mounted into the + ## Alertmanager Pods. The Secrets are mounted into /etc/alertmanager/secrets/. + ## + secrets: [] + + ## ConfigMaps is a list of ConfigMaps in the same namespace as the Alertmanager object, which shall be mounted into the Alertmanager Pods. + ## The ConfigMaps are mounted into /etc/alertmanager/configmaps/. + ## + configMaps: [] + + ## ConfigSecret is the name of a Kubernetes Secret in the same namespace as the Alertmanager object, which contains configuration for + ## this Alertmanager instance. Defaults to 'alertmanager-' The secret is mounted into /etc/alertmanager/config. + ## + # configSecret: + + ## WebTLSConfig defines the TLS parameters for HTTPS + ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#alertmanagerwebspec + web: {} + + ## AlertmanagerConfigs to be selected to merge and configure Alertmanager with. + ## + alertmanagerConfigSelector: + # default ignores resources created by Rancher Monitoring + matchExpressions: + - key: release + operator: NotIn + values: + - rancher-monitoring + + ## AlermanagerConfig to be used as top level configuration + ## + alertmanagerConfiguration: {} + ## Example with select a global alertmanagerconfig + # alertmanagerConfiguration: + # name: global-alertmanager-Configuration + + ## Define Log Format + # Use logfmt (default) or json logging + logFormat: logfmt + + ## Log level for Alertmanager to be configured with. + ## + logLevel: info + + ## Size is the expected size of the alertmanager cluster. The controller will eventually make the size of the + ## running cluster equal to the expected size. + replicas: 1 + + ## Time duration Alertmanager shall retain data for. Default is '120h', and must match the regular expression + ## [0-9]+(ms|s|m|h) (milliseconds seconds minutes hours). + ## + retention: 120h + + ## Storage is the definition of how storage will be used by the Alertmanager instances. + ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/user-guides/storage.md + ## + storage: {} + # volumeClaimTemplate: + # spec: + # storageClassName: gluster + # accessModes: ["ReadWriteOnce"] + # resources: + # requests: + # storage: 50Gi + # selector: {} + + + ## The external URL the Alertmanager instances will be available under. This is necessary to generate correct URLs. This is necessary if Alertmanager is not served from root of a DNS name. string false + ## + externalUrl: + + ## The route prefix Alertmanager registers HTTP handlers for. This is useful, if using ExternalURL and a proxy is rewriting HTTP routes of a request, and the actual ExternalURL is still true, + ## but the server serves requests under a different route prefix. For example for use with kubectl proxy. + ## + routePrefix: / + + ## If set to true all actions on the underlying managed objects are not going to be performed, except for delete actions. + ## + paused: false + + ## Define which Nodes the Pods are scheduled on. + ## ref: https://kubernetes.io/docs/user-guide/node-selection/ + ## + nodeSelector: {} + + ## Define resources requests and limits for single Pods. + ## ref: https://kubernetes.io/docs/user-guide/compute-resources/ + ## + resources: + limits: + memory: 500Mi + cpu: 1000m + requests: + memory: 100Mi + cpu: 100m + + ## Pod anti-affinity can prevent the scheduler from placing Prometheus replicas on the same node. + ## The default value "soft" means that the scheduler should *prefer* to not schedule two replica pods onto the same node but no guarantee is provided. + ## The value "hard" means that the scheduler is *required* to not schedule two replica pods onto the same node. + ## The value "" will disable pod anti-affinity so that no anti-affinity rules will be configured. + ## + podAntiAffinity: "" + + ## If anti-affinity is enabled sets the topologyKey to use for anti-affinity. + ## This can be changed to, for example, failure-domain.beta.kubernetes.io/zone + ## + podAntiAffinityTopologyKey: kubernetes.io/hostname + + ## Assign custom affinity rules to the alertmanager instance + ## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ + ## + affinity: {} + # nodeAffinity: + # requiredDuringSchedulingIgnoredDuringExecution: + # nodeSelectorTerms: + # - matchExpressions: + # - key: kubernetes.io/e2e-az-name + # operator: In + # values: + # - e2e-az1 + # - e2e-az2 + + ## If specified, the pod's tolerations. + ## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ + ## + tolerations: [] + # - key: "key" + # operator: "Equal" + # value: "value" + # effect: "NoSchedule" + + ## If specified, the pod's topology spread constraints. + ## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/ + ## + topologySpreadConstraints: [] + # - maxSkew: 1 + # topologyKey: topology.kubernetes.io/zone + # whenUnsatisfiable: DoNotSchedule + # labelSelector: + # matchLabels: + # app: alertmanager + + ## SecurityContext holds pod-level security attributes and common container settings. + ## This defaults to non root user with uid 1000 and gid 2000. *v1.PodSecurityContext false + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ + ## + securityContext: + runAsGroup: 2000 + runAsNonRoot: true + runAsUser: 1000 + fsGroup: 2000 + + ## ListenLocal makes the Alertmanager server listen on loopback, so that it does not bind against the Pod IP. + ## Note this is only for the Alertmanager UI, not the gossip communication. + ## + listenLocal: false + + ## Containers allows injecting additional containers. This is meant to allow adding an authentication proxy to an Alertmanager pod. + ## + containers: [] + # containers: + # - name: oauth-proxy + # image: quay.io/oauth2-proxy/oauth2-proxy:v7.3.0 + # args: + # - --upstream=http://127.0.0.1:9093 + # - --http-address=0.0.0.0:8081 + # - ... + # ports: + # - containerPort: 8081 + # name: oauth-proxy + # protocol: TCP + # resources: {} + + # Additional volumes on the output StatefulSet definition. + volumes: [] + + # Additional VolumeMounts on the output StatefulSet definition. + volumeMounts: [] + + ## InitContainers allows injecting additional initContainers. This is meant to allow doing some changes + ## (permissions, dir tree) on mounted volumes before starting prometheus + initContainers: [] + + ## Priority class assigned to the Pods + ## + priorityClassName: "" + + ## AdditionalPeers allows injecting a set of additional Alertmanagers to peer with to form a highly available cluster. + ## + additionalPeers: [] + + ## PortName to use for Alert Manager. + ## + portName: "http-web" + + ## ClusterAdvertiseAddress is the explicit address to advertise in cluster. Needs to be provided for non RFC1918 [1] (public) addresses. [1] RFC1918: https://tools.ietf.org/html/rfc1918 + ## + clusterAdvertiseAddress: false + + ## ForceEnableClusterMode ensures Alertmanager does not deactivate the cluster mode when running with a single replica. + ## Use case is e.g. spanning an Alertmanager cluster across Kubernetes clusters with a single replica in each. + forceEnableClusterMode: false + + ## Minimum number of seconds for which a newly created pod should be ready without any of its container crashing for it to + ## be considered available. Defaults to 0 (pod will be considered available as soon as it is ready). + minReadySeconds: 0 + + ## ExtraSecret can be used to store various data in an extra secret + ## (use it for example to store hashed basic auth credentials) + extraSecret: + ## if not set, name will be auto generated + # name: "" + annotations: {} + data: {} + # auth: | + # foo:$apr1$OFG3Xybp$ckL0FHDAkoXYIlH9.cysT0 + # someoneelse:$apr1$DMZX2Z4q$6SbQIfyuLQd.xmo/P0m2c. + +## Using default values from https://github.com/grafana/helm-charts/blob/main/charts/grafana/values.yaml +## +grafana: + enabled: true + namespaceOverride: "" + + ## Grafana's primary configuration + ## NOTE: values in map will be converted to ini format + ## ref: http://docs.grafana.org/installation/configuration/ + ## + grafana.ini: + users: + auto_assign_org_role: Viewer + auth: + disable_login_form: false + auth.anonymous: + enabled: true + org_role: Viewer + auth.basic: + enabled: false + security: + # Required to embed dashboards in Rancher Cluster Overview Dashboard on Cluster Explorer + allow_embedding: true + + deploymentStrategy: + type: Recreate + + ## ForceDeployDatasources Create datasource configmap even if grafana deployment has been disabled + ## + forceDeployDatasources: false + + ## ForceDeployDashboard Create dashboard configmap even if grafana deployment has been disabled + ## + forceDeployDashboards: false + + ## Deploy default dashboards + ## + defaultDashboardsEnabled: true + + ## Timezone for the default dashboards + ## Other options are: browser or a specific timezone, i.e. Europe/Luxembourg + ## + defaultDashboardsTimezone: utc + + adminPassword: prom-operator + + ingress: + ## If true, Grafana Ingress will be created + ## + enabled: false + + ## IngressClassName for Grafana Ingress. + ## Should be provided if Ingress is enable. + ## + # ingressClassName: nginx + + ## Annotations for Grafana Ingress + ## + annotations: {} + # kubernetes.io/ingress.class: nginx + # kubernetes.io/tls-acme: "true" + + ## Labels to be added to the Ingress + ## + labels: {} + + ## Hostnames. + ## Must be provided if Ingress is enable. + ## + # hosts: + # - grafana.domain.com + hosts: [] + + ## Path for grafana ingress + path: / + + ## TLS configuration for grafana Ingress + ## Secret must be manually created in the namespace + ## + tls: [] + # - secretName: grafana-general-tls + # hosts: + # - grafana.example.com + + sidecar: + dashboards: + enabled: true + label: grafana_dashboard + labelValue: "1" + + ## Annotations for Grafana dashboard configmaps + ## + annotations: {} + provider: + allowUiUpdates: false + datasources: + enabled: true + defaultDatasourceEnabled: true + + uid: prometheus + + ## URL of prometheus datasource + ## + # url: http://prometheus-stack-prometheus:9090/ + + # If not defined, will use prometheus.prometheusSpec.scrapeInterval or its default + # defaultDatasourceScrapeInterval: 15s + + ## Annotations for Grafana datasource configmaps + ## + annotations: {} + + label: grafana_datasource + labelValue: "1" + + ## Field with internal link pointing to existing data source in Grafana. + ## Can be provisioned via additionalDataSources + exemplarTraceIdDestinations: {} + # datasourceUid: Jaeger + # traceIdLabelName: trace_id + + extraConfigmapMounts: [] + # - name: certs-configmap + # mountPath: /etc/grafana/ssl/ + # configMap: certs-configmap + # readOnly: true + + deleteDatasources: [] + # - name: example-datasource + # orgId: 1 + + ## Configure additional grafana datasources (passed through tpl) + ## ref: http://docs.grafana.org/administration/provisioning/#datasources + additionalDataSources: [] + # - name: prometheus-sample + # access: proxy + # basicAuth: true + # basicAuthPassword: pass + # basicAuthUser: daco + # editable: false + # jsonData: + # tlsSkipVerify: true + # orgId: 1 + # type: prometheus + # url: https://{{ printf "%s-prometheus.svc" .Release.Name }}:9090 + # version: 1 + + ## Passed to grafana subchart and used by servicemonitor below + ## + service: + portName: nginx-http + ## Port for Grafana Service to listen on + ## + port: 80 + ## To be used with a proxy extraContainer port + ## + targetPort: 8080 + ## Port to expose on each node + ## Only used if service.type is 'NodePort' + ## + nodePort: 30950 + ## Service type + ## + type: ClusterIP + + proxy: + image: + repository: rancher/mirrored-library-nginx + tag: 1.21.1-alpine + + ## Enable an Specify container in extraContainers. This is meant to allow adding an authentication proxy to a grafana pod + extraContainers: | + - name: grafana-proxy + args: + - nginx + - -g + - daemon off; + - -c + - /nginx/nginx.conf + image: "{{ template "system_default_registry" . }}{{ .Values.proxy.image.repository }}:{{ .Values.proxy.image.tag }}" + ports: + - containerPort: 8080 + name: nginx-http + protocol: TCP + volumeMounts: + - mountPath: /nginx + name: grafana-nginx + - mountPath: /var/cache/nginx + name: nginx-home + securityContext: + runAsUser: 101 + runAsGroup: 101 + + ## Volumes that can be used in containers + extraContainerVolumes: + - name: nginx-home + emptyDir: {} + - name: grafana-nginx + configMap: + name: grafana-nginx-proxy-config + items: + - key: nginx.conf + mode: 438 + path: nginx.conf + + ## If true, create a serviceMonitor for grafana + ## + serviceMonitor: + # If true, a ServiceMonitor CRD is created for a prometheus operator + # https://github.com/coreos/prometheus-operator + # + enabled: true + + # Path to use for scraping metrics. Might be different if server.root_url is set + # in grafana.ini + path: "/metrics" + + # namespace: monitoring (defaults to use the namespace this chart is deployed to) + + # labels for the ServiceMonitor + labels: {} + + # Scrape interval. If not set, the Prometheus default scrape interval is used. + # + interval: "" + scheme: http + tlsConfig: {} + scrapeTimeout: 30s + + ## MetricRelabelConfigs to apply to samples after scraping, but before ingestion. + ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#relabelconfig + ## + metricRelabelings: [] + # - action: keep + # regex: 'kube_(daemonset|deployment|pod|namespace|node|statefulset).+' + # sourceLabels: [__name__] + + ## RelabelConfigs to apply to samples before scraping + ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#relabelconfig + ## + relabelings: [] + # - sourceLabels: [__meta_kubernetes_pod_node_name] + # separator: ; + # regex: ^(.*)$ + # targetLabel: nodename + # replacement: $1 + # action: replace + + resources: + limits: + memory: 200Mi + cpu: 200m + requests: + memory: 100Mi + cpu: 100m + + testFramework: + enabled: false + +## Deploy a Prometheus instance +## +prometheus: + + enabled: true + + ## Annotations for Prometheus + ## + annotations: {} + + ## Service account for Prometheuses to use. + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ + ## + serviceAccount: + create: true + name: "" + annotations: {} + + ## Configuration for Prometheus service + ## + service: + annotations: {} + labels: {} + clusterIP: "" + + ## Port for Prometheus Service to listen on + ## + port: 9090 + + ## To be used with a proxy extraContainer port + targetPort: 8081 + + ## List of IP addresses at which the Prometheus server service is available + ## Ref: https://kubernetes.io/docs/user-guide/services/#external-ips + ## + externalIPs: [] + + ## Port to expose on each node + ## Only used if service.type is 'NodePort' + ## + nodePort: 30090 + + ## Loadbalancer IP + ## Only use if service.type is "LoadBalancer" + loadBalancerIP: "" + loadBalancerSourceRanges: [] + + ## Denotes if this Service desires to route external traffic to node-local or cluster-wide endpoints + ## + externalTrafficPolicy: Cluster + + ## Service type + ## + type: ClusterIP + + ## Additional port to define in the Service + additionalPorts: [] + # additionalPorts: + # - name: authenticated + # port: 8081 + # targetPort: 8081 + + ## Consider that all endpoints are considered "ready" even if the Pods themselves are not + ## Ref: https://kubernetes.io/docs/reference/kubernetes-api/service-resources/service-v1/#ServiceSpec + publishNotReadyAddresses: false + + sessionAffinity: "" + + ## Configure pod disruption budgets for Prometheus + ## ref: https://kubernetes.io/docs/tasks/run-application/configure-pdb/#specifying-a-poddisruptionbudget + ## This configuration is immutable once created and will require the PDB to be deleted to be changed + ## https://github.com/kubernetes/kubernetes/issues/45398 + ## + podDisruptionBudget: + enabled: false + minAvailable: 1 + maxUnavailable: "" + + ## ExtraSecret can be used to store various data in an extra secret + ## (use it for example to store hashed basic auth credentials) + extraSecret: + ## if not set, name will be auto generated + # name: "" + annotations: {} + data: {} + # auth: | + # foo:$apr1$OFG3Xybp$ckL0FHDAkoXYIlH9.cysT0 + # someoneelse:$apr1$DMZX2Z4q$6SbQIfyuLQd.xmo/P0m2c. + + ingress: + enabled: false + + # For Kubernetes >= 1.18 you should specify the ingress-controller via the field ingressClassName + # See https://kubernetes.io/blog/2020/04/02/improvements-to-the-ingress-api-in-kubernetes-1.18/#specifying-the-class-of-an-ingress + # ingressClassName: nginx + + annotations: {} + labels: {} + + ## Redirect ingress to an additional defined port on the service + # servicePort: 8081 + + ## Hostnames. + ## Must be provided if Ingress is enabled. + ## + # hosts: + # - prometheus.domain.com + hosts: [] + + ## Paths to use for ingress rules - one path should match the prometheusSpec.routePrefix + ## + paths: [] + # - / + + ## For Kubernetes >= 1.18 you should specify the pathType (determines how Ingress paths should be matched) + ## See https://kubernetes.io/blog/2020/04/02/improvements-to-the-ingress-api-in-kubernetes-1.18/#better-path-matching-with-path-types + # pathType: ImplementationSpecific + + ## TLS configuration for Prometheus Ingress + ## Secret must be manually created in the namespace + ## + tls: [] + # - secretName: prometheus-general-tls + # hosts: + # - prometheus.example.com + + ## Configure additional options for default pod security policy for Prometheus + ## ref: https://kubernetes.io/docs/concepts/policy/pod-security-policy/ + podSecurityPolicy: + allowedCapabilities: [] + volumes: [] + + serviceMonitor: + ## Scrape interval. If not set, the Prometheus default scrape interval is used. + ## + interval: "" + selfMonitor: true + + ## scheme: HTTP scheme to use for scraping. Can be used with `tlsConfig` for example if using istio mTLS. + scheme: "" + + ## tlsConfig: TLS configuration to use when scraping the endpoint. For example if using istio mTLS. + ## Of type: https://github.com/coreos/prometheus-operator/blob/main/Documentation/api.md#tlsconfig + tlsConfig: {} + + bearerTokenFile: + + ## Metric relabel configs to apply to samples before ingestion. + ## + metricRelabelings: [] + # - action: keep + # regex: 'kube_(daemonset|deployment|pod|namespace|node|statefulset).+' + # sourceLabels: [__name__] + + # relabel configs to apply to samples before ingestion. + ## + relabelings: [] + # - sourceLabels: [__meta_kubernetes_pod_node_name] + # separator: ; + # regex: ^(.*)$ + # targetLabel: nodename + # replacement: $1 + # action: replace + + ## Settings affecting prometheusSpec + ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#prometheusspec + ## + prometheusSpec: + ## If true, pass --storage.tsdb.max-block-duration=2h to prometheus. This is already done if using Thanos + ## + disableCompaction: false + ## APIServerConfig + ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#apiserverconfig + ## + apiserverConfig: {} + + ## Interval between consecutive scrapes. + ## Defaults to 30s. + ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/release-0.44/pkg/prometheus/promcfg.go#L180-L183 + ## + scrapeInterval: "" + + ## Number of seconds to wait for target to respond before erroring + ## + scrapeTimeout: "" + + ## Interval between consecutive evaluations. + ## + evaluationInterval: "" + + ## ListenLocal makes the Prometheus server listen on loopback, so that it does not bind against the Pod IP. + ## + listenLocal: false + + ## EnableAdminAPI enables Prometheus the administrative HTTP API which includes functionality such as deleting time series. + ## This is disabled by default. + ## ref: https://prometheus.io/docs/prometheus/latest/querying/api/#tsdb-admin-apis + ## + enableAdminAPI: false + + ## WebTLSConfig defines the TLS parameters for HTTPS + ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#webtlsconfig + web: {} + + ## Exemplars related settings that are runtime reloadable. + ## It requires to enable the exemplar storage feature to be effective. + exemplars: "" + ## Maximum number of exemplars stored in memory for all series. + ## If not set, Prometheus uses its default value. + ## A value of zero or less than zero disables the storage. + # maxSize: 100000 + + # EnableFeatures API enables access to Prometheus disabled features. + # ref: https://prometheus.io/docs/prometheus/latest/disabled_features/ + enableFeatures: [] + # - exemplar-storage + + ## Image of Prometheus. + ## + image: + repository: rancher/mirrored-prometheus-prometheus + tag: v2.38.0 + sha: "" + + ## Tolerations for use with node taints + ## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ + ## + tolerations: [] + # - key: "key" + # operator: "Equal" + # value: "value" + # effect: "NoSchedule" + + ## If specified, the pod's topology spread constraints. + ## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/ + ## + topologySpreadConstraints: [] + # - maxSkew: 1 + # topologyKey: topology.kubernetes.io/zone + # whenUnsatisfiable: DoNotSchedule + # labelSelector: + # matchLabels: + # app: prometheus + + ## Alertmanagers to which alerts will be sent + ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#alertmanagerendpoints + ## + ## Default configuration will connect to the alertmanager deployed as part of this release + ## + alertingEndpoints: [] + # - name: "" + # namespace: "" + # port: http + # scheme: http + # pathPrefix: "" + # tlsConfig: {} + # bearerTokenFile: "" + # apiVersion: v2 + + ## External labels to add to any time series or alerts when communicating with external systems + ## + externalLabels: {} + + ## enable --web.enable-remote-write-receiver flag on prometheus-server + ## + enableRemoteWriteReceiver: false + + ## Name of the external label used to denote Prometheus instance name + ## + prometheusExternalLabelName: "" + + ## If true, the Operator won't add the external label used to denote Prometheus instance name + ## + prometheusExternalLabelNameClear: false + + ## External URL at which Prometheus will be reachable. + ## + externalUrl: "" + + ## Define which Nodes the Pods are scheduled on. + ## ref: https://kubernetes.io/docs/user-guide/node-selection/ + ## + nodeSelector: {} + + ## Secrets is a list of Secrets in the same namespace as the Prometheus object, which shall be mounted into the Prometheus Pods. + ## The Secrets are mounted into /etc/prometheus/secrets/. Secrets changes after initial creation of a Prometheus object are not + ## reflected in the running Pods. To change the secrets mounted into the Prometheus Pods, the object must be deleted and recreated + ## with the new list of secrets. + ## + secrets: [] + + ## ConfigMaps is a list of ConfigMaps in the same namespace as the Prometheus object, which shall be mounted into the Prometheus Pods. + ## The ConfigMaps are mounted into /etc/prometheus/configmaps/. + ## + configMaps: [] + + ## QuerySpec defines the query command line flags when starting Prometheus. + ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#queryspec + ## + query: {} + + ## If true, a nil or {} value for prometheus.prometheusSpec.ruleSelector will cause the + ## prometheus resource to be created with selectors based on values in the helm deployment, + ## which will also match the PrometheusRule resources created + ## + ruleSelectorNilUsesHelmValues: false + + ## PrometheusRules to be selected for target discovery. + ## If {}, select all PrometheusRules + ## + ruleSelector: + # default ignores resources created by Rancher Monitoring + matchExpressions: + - key: release + operator: NotIn + values: + - rancher-monitoring + + ## If true, a nil or {} value for prometheus.prometheusSpec.serviceMonitorSelector will cause the + ## prometheus resource to be created with selectors based on values in the helm deployment, + ## which will also match the servicemonitors created + ## + serviceMonitorSelectorNilUsesHelmValues: false + + ## ServiceMonitors to be selected for target discovery. + ## If {}, select all ServiceMonitors + ## + serviceMonitorSelector: + # default ignores resources created by Rancher Monitoring + matchExpressions: + - key: release + operator: NotIn + values: + - rancher-monitoring + + ## If true, a nil or {} value for prometheus.prometheusSpec.podMonitorSelector will cause the + ## prometheus resource to be created with selectors based on values in the helm deployment, + ## which will also match the podmonitors created + ## + podMonitorSelectorNilUsesHelmValues: false + + ## PodMonitors to be selected for target discovery. + ## If {}, select all PodMonitors + ## + podMonitorSelector: + # default ignores resources created by Rancher Monitoring + matchExpressions: + - key: release + operator: NotIn + values: + - rancher-monitoring + + ## If true, a nil or {} value for prometheus.prometheusSpec.probeSelector will cause the + ## prometheus resource to be created with selectors based on values in the helm deployment, + ## which will also match the probes created + ## + probeSelectorNilUsesHelmValues: true + + ## Probes to be selected for target discovery. + ## If {}, select all Probes + ## + probeSelector: + # default ignores resources created by Rancher Monitoring + matchExpressions: + - key: release + operator: NotIn + values: + - rancher-monitoring + + ## How long to retain metrics + ## + retention: 10d + + ## Maximum size of metrics + ## + retentionSize: "" + + ## Enable compression of the write-ahead log using Snappy. + ## + walCompression: true + + ## If true, the Operator won't process any Prometheus configuration changes + ## + paused: false + + ## Number of replicas of each shard to deploy for a Prometheus deployment. + ## Number of replicas multiplied by shards is the total number of Pods created. + ## + replicas: 1 + + ## EXPERIMENTAL: Number of shards to distribute targets onto. + ## Number of replicas multiplied by shards is the total number of Pods created. + ## Note that scaling down shards will not reshard data onto remaining instances, it must be manually moved. + ## Increasing shards will not reshard data either but it will continue to be available from the same instances. + ## To query globally use Thanos sidecar and Thanos querier or remote write data to a central location. + ## Sharding is done on the content of the `__address__` target meta-label. + ## + shards: 1 + + ## Log level for Prometheus be configured in + ## + logLevel: info + + ## Log format for Prometheus be configured in + ## + logFormat: logfmt + + ## Prefix used to register routes, overriding externalUrl route. + ## Useful for proxies that rewrite URLs. + ## + routePrefix: / + + ## Standard object's metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata + ## Metadata Labels and Annotations gets propagated to the prometheus pods. + ## + podMetadata: {} + # labels: + # app: prometheus + # k8s-app: prometheus + + ## Pod anti-affinity can prevent the scheduler from placing Prometheus replicas on the same node. + ## The default value "soft" means that the scheduler should *prefer* to not schedule two replica pods onto the same node but no guarantee is provided. + ## The value "hard" means that the scheduler is *required* to not schedule two replica pods onto the same node. + ## The value "" will disable pod anti-affinity so that no anti-affinity rules will be configured. + podAntiAffinity: "" + + ## If anti-affinity is enabled sets the topologyKey to use for anti-affinity. + ## This can be changed to, for example, failure-domain.beta.kubernetes.io/zone + ## + podAntiAffinityTopologyKey: kubernetes.io/hostname + + ## Assign custom affinity rules to the prometheus instance + ## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ + ## + affinity: {} + # nodeAffinity: + # requiredDuringSchedulingIgnoredDuringExecution: + # nodeSelectorTerms: + # - matchExpressions: + # - key: kubernetes.io/e2e-az-name + # operator: In + # values: + # - e2e-az1 + # - e2e-az2 + + ## Resource limits & requests + ## + resources: + limits: + memory: 3000Mi + cpu: 1000m + requests: + memory: 750Mi + cpu: 750m + + ## Prometheus StorageSpec for persistent data + ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/user-guides/storage.md + ## + storageSpec: {} + ## Using PersistentVolumeClaim + ## + # volumeClaimTemplate: + # spec: + # storageClassName: gluster + # accessModes: ["ReadWriteOnce"] + # resources: + # requests: + # storage: 50Gi + # selector: {} + + ## Using tmpfs volume + ## + # emptyDir: + # medium: Memory + + # Additional volumes on the output StatefulSet definition. + volumes: + - name: nginx-home + emptyDir: {} + - name: prometheus-nginx + configMap: + name: prometheus-nginx-proxy-config + defaultMode: 438 + + # Additional VolumeMounts on the output StatefulSet definition. + volumeMounts: [] + + ## SecurityContext holds pod-level security attributes and common container settings. + ## This defaults to non root user with uid 1000 and gid 2000. + ## https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md + ## + securityContext: + runAsGroup: 2000 + runAsNonRoot: true + runAsUser: 1000 + fsGroup: 2000 + + ## Priority class assigned to the Pods + ## + priorityClassName: "" + + proxy: + image: + repository: rancher/mirrored-library-nginx + tag: 1.21.1-alpine + + ## Containers allows injecting additional containers. This is meant to allow adding an authentication proxy to a Prometheus pod. + ## if using proxy extraContainer update targetPort with proxy container port + containers: | + - name: prometheus-proxy + args: + - nginx + - -g + - daemon off; + - -c + - /nginx/nginx.conf + image: "{{ template "system_default_registry" . }}{{ .Values.prometheus.prometheusSpec.proxy.image.repository }}:{{ .Values.prometheus.prometheusSpec.proxy.image.tag }}" + ports: + - containerPort: 8081 + name: nginx-http + protocol: TCP + volumeMounts: + - mountPath: /nginx + name: prometheus-nginx + - mountPath: /var/cache/nginx + name: nginx-home + securityContext: + runAsUser: 101 + runAsGroup: 101 + + ## InitContainers allows injecting additional initContainers. This is meant to allow doing some changes + ## (permissions, dir tree) on mounted volumes before starting prometheus + initContainers: [] + + ## PortName to use for Prometheus. + ## + portName: "http-web" + + ## ArbitraryFSAccessThroughSMs configures whether configuration based on a service monitor can access arbitrary files + ## on the file system of the Prometheus container e.g. bearer token files. + arbitraryFSAccessThroughSMs: false + + ## OverrideHonorLabels if set to true overrides all user configured honor_labels. If HonorLabels is set in ServiceMonitor + ## or PodMonitor to true, this overrides honor_labels to false. + overrideHonorLabels: false + + ## OverrideHonorTimestamps allows to globally enforce honoring timestamps in all scrape configs. + overrideHonorTimestamps: false + + ## EnforcedNamespaceLabel enforces adding a namespace label of origin for each alert and metric that is user created. + ## The label value will always be the namespace of the object that is being created. + ## Disabled by default + enforcedNamespaceLabel: "" + + ## PrometheusRulesExcludedFromEnforce - list of prometheus rules to be excluded from enforcing of adding namespace labels. + ## Works only if enforcedNamespaceLabel set to true. Make sure both ruleNamespace and ruleName are set for each pair + ## Deprecated, use `excludedFromEnforcement` instead + prometheusRulesExcludedFromEnforce: [] + + ## ExcludedFromEnforcement - list of object references to PodMonitor, ServiceMonitor, Probe and PrometheusRule objects + ## to be excluded from enforcing a namespace label of origin. + ## Works only if enforcedNamespaceLabel set to true. + ## See https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#objectreference + excludedFromEnforcement: [] + + ## QueryLogFile specifies the file to which PromQL queries are logged. Note that this location must be writable, + ## and can be persisted using an attached volume. Alternatively, the location can be set to a stdout location such + ## as /dev/stdout to log querie information to the default Prometheus log stream. This is only available in versions + ## of Prometheus >= 2.16.0. For more details, see the Prometheus docs (https://prometheus.io/docs/guides/query-log/) + queryLogFile: false + + ## EnforcedSampleLimit defines global limit on number of scraped samples that will be accepted. This overrides any SampleLimit + ## set per ServiceMonitor or/and PodMonitor. It is meant to be used by admins to enforce the SampleLimit to keep overall + ## number of samples/series under the desired limit. Note that if SampleLimit is lower that value will be taken instead. + enforcedSampleLimit: false + + ## EnforcedTargetLimit defines a global limit on the number of scraped targets. This overrides any TargetLimit set + ## per ServiceMonitor or/and PodMonitor. It is meant to be used by admins to enforce the TargetLimit to keep the overall + ## number of targets under the desired limit. Note that if TargetLimit is lower, that value will be taken instead, except + ## if either value is zero, in which case the non-zero value will be used. If both values are zero, no limit is enforced. + enforcedTargetLimit: false + + + ## Per-scrape limit on number of labels that will be accepted for a sample. If more than this number of labels are present + ## post metric-relabeling, the entire scrape will be treated as failed. 0 means no limit. Only valid in Prometheus versions + ## 2.27.0 and newer. + enforcedLabelLimit: false + + ## Per-scrape limit on length of labels name that will be accepted for a sample. If a label name is longer than this number + ## post metric-relabeling, the entire scrape will be treated as failed. 0 means no limit. Only valid in Prometheus versions + ## 2.27.0 and newer. + enforcedLabelNameLengthLimit: false + + ## Per-scrape limit on length of labels value that will be accepted for a sample. If a label value is longer than this + ## number post metric-relabeling, the entire scrape will be treated as failed. 0 means no limit. Only valid in Prometheus + ## versions 2.27.0 and newer. + enforcedLabelValueLengthLimit: false + + ## AllowOverlappingBlocks enables vertical compaction and vertical query merge in Prometheus. This is still experimental + ## in Prometheus so it may change in any upcoming release. + allowOverlappingBlocks: false + + ## Minimum number of seconds for which a newly created pod should be ready without any of its container crashing for it to + ## be considered available. Defaults to 0 (pod will be considered available as soon as it is ready). + minReadySeconds: 0 + +## Setting to true produces cleaner resource names, but requires a data migration because the name of the persistent volume changes. Therefore this should only be set once on initial installation. +## +cleanPrometheusOperatorObjectNames: false \ No newline at end of file diff --git a/index.yaml b/index.yaml index d0f78de6..2c1c5728 100755 --- a/index.yaml +++ b/index.yaml @@ -1,6 +1,30 @@ apiVersion: v1 entries: prometheus-federator: + - annotations: + catalog.cattle.io/certified: rancher + catalog.cattle.io/display-name: Prometheus Federator + catalog.cattle.io/kube-version: '>=1.16.0-0' + catalog.cattle.io/namespace: cattle-monitoring-system + catalog.cattle.io/os: linux,windows + catalog.cattle.io/permits-os: linux,windows + catalog.cattle.io/provides-gvr: helm.cattle.io.projecthelmchart/v1alpha1 + catalog.cattle.io/rancher-version: '>= 2.6.5-0 <= 2.6.100-0' + catalog.cattle.io/release-name: prometheus-federator + apiVersion: v2 + appVersion: 0.2.0-rc1 + created: "2022-12-01T10:28:07.173354-08:00" + dependencies: + - condition: helmProjectOperator.enabled + name: helmProjectOperator + repository: file://./charts/helmProjectOperator + description: Prometheus Federator + digest: c9ac176ba2f36bfad98c796eb9b547bed7b90de8dca1d2a70a63f6060250ed0c + icon: https://raw.githubusercontent.com/rancher/prometheus-federator/main/assets/logos/prometheus-federator.svg + name: prometheus-federator + urls: + - assets/prometheus-federator/prometheus-federator-0.2.0-rc1.tgz + version: 0.2.0-rc1 - annotations: catalog.cattle.io/certified: rancher catalog.cattle.io/display-name: Prometheus Federator @@ -74,6 +98,43 @@ entries: - assets/prometheus-federator/prometheus-federator-0.0.1.tgz version: 0.0.1 rancher-project-monitoring: + - annotations: + catalog.cattle.io/certified: rancher + catalog.cattle.io/display-name: Project Monitoring + catalog.cattle.io/hidden: "true" + catalog.cattle.io/kube-version: '>=1.16.0-0 < 1.25.0-0' + catalog.cattle.io/permits-os: linux,windows + catalog.cattle.io/rancher-version: '>= 2.6.5-0 <= 2.8.0-0' + catalog.cattle.io/release-name: rancher-project-monitoring + apiVersion: v2 + appVersion: 0.59.1 + created: "2022-11-28T16:57:04.138794-08:00" + dependencies: + - condition: grafana.enabled + name: grafana + repository: file://./charts/grafana + description: Collects several related Helm charts, Grafana dashboards, and Prometheus + rules combined with documentation and scripts to provide easy to operate end-to-end + Kubernetes cluster monitoring with Prometheus. Depends on the existence of a + Cluster Prometheus deployed via Prometheus Operator + digest: 0940daab68c8b327383c37a40feac8f4bcd2e54babb0ebc2d7533556c9ebb912 + home: https://github.com/prometheus-operator/kube-prometheus + icon: https://raw.githubusercontent.com/prometheus/prometheus.github.io/master/assets/prometheus_logo-cb55bb5c346.png + keywords: + - prometheus + - monitoring + kubeVersion: '>=1.16.0-0' + maintainers: + - email: arvind.iyengar@suse.com + name: Arvind + - email: amangeet.samra@suse.com + name: Geet + url: https://github.com/geethub97 + name: rancher-project-monitoring + type: application + urls: + - assets/rancher-project-monitoring/rancher-project-monitoring-0.2.0-rc1.tgz + version: 0.2.0-rc1 - annotations: catalog.cattle.io/certified: rancher catalog.cattle.io/display-name: Project Monitoring From 34b4831d952ed8c422c33f2fda910e81ccb66e32 Mon Sep 17 00:00:00 2001 From: Arvind Iyengar Date: Mon, 28 Nov 2022 16:45:22 -0800 Subject: [PATCH 14/20] Add docs on rebasing --- docs/experimental/rebasing.md | 44 +++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 docs/experimental/rebasing.md diff --git a/docs/experimental/rebasing.md b/docs/experimental/rebasing.md new file mode 100644 index 00000000..7ea9c214 --- /dev/null +++ b/docs/experimental/rebasing.md @@ -0,0 +1,44 @@ +# Experimental: Rebasing rancher-project-monitoring via scripts + +### Context + +The source of the [`rancher-project-monitoring` chart](../charts/rancher-project-monitoring/) is the [`rancher-monitoring` chart in the `rancher/charts` repository under the `dev-v2.7` branch](https://github.com/rancher/charts/tree/dev-v2.7/charts/rancher-monitoring), which itself is sourced from the Helm community's [`kube-prometheus-stack` chart](https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack). + +> **Note:** Why do we pull the source from `rancher-monitoring` in this convoluted process? +> +> While we could pull from `kube-prometheus-stack` directly, a lot more maintenence burden would be required to maintain the patches that we add onto the `rancher-monitoring` chart to get the upstream chart ready for deployment in a Rancher setup (such as adding nginx reverse proxy pods in front of Prometheus and Grafana or custom Rancher dashboards). +> +> The `rancher-monitoring` chart is also heavily tested in every release by Rancher's QA team within various Rancher setups. + +Therefore, in order to rebase the `rancher-project-monitoring` chart against the latest `rancher-monitoring` chart that will be released, you typically will need to run the following command: + +```bash +PACKAGE=rancher-monitoring TO_COMMIT= TO_DIR=charts/rancher-monitoring/ make rebase +``` + +On running this command locally, the script will automatically pull in the `rancher/charts` repository as a Git remote, construct the patch from the current chart base (listed in the [`package.yaml` of `rancher-project-monitoring`](../packages/rancher-project-monitoring/package.yaml)) to the new chart base (defined from the environment variables provided, namely `TO_REMOTE`, `TO_COMMIT` , `TO_DIR`), and try to `git apply -3` the patches onto the current version of the charts created by running the `make prepare` command. + +On applying the 3-way merge from the `git apply` command, the script will automatically create a shell (titled `interactive-rebase-shell`) that allows you to look through the changes that have been absorbed from upstream, resolve any conflicts (using the same Git conflict resolution experience you would have on executing a `git rebase -i`), and add all your changes to `staging` (`git add` **only**; the script will force you to stage any unstaged or committed changes if you try to). + +Once all your conflicts have been resolved (which you can check by running `git diff --check` **before** exiting the `interactive-rebase-shell`), you can simply run `exit` and the script will take care of updating everything else for you by running `make patch` on the new base to produce two new commits. + +### Once you have successfully run the scripts + +1. Bump the minor version listed under [`packages/prometheus-federator/charts/Chart.yaml`](../packages/prometheus-federator/charts/Chart.yaml) under `appVersion` and `version` and reset the patch version (i.e. `0.1.1` -> `0.2.0`); they should both match. +1. Update the tag in [`packages/prometheus-federator/charts/values.yaml`](../packages/prometheus-federator/charts/values.yaml) under `helmProjectOperator.image.tag` to `v`, where `` is the version you identified in the previous step (i.e. `0.2.0`) +1. Modify the `version` field under [`packages/rancher-project-monitoring/package.yaml`](../packages/rancher-project-monitoring/package.yaml) to the same version from above (i.e. `0.2.0`) +1. Modify the `VERSION` environment variable under [`scripts/build-chart`](../scripts/build-chart) to the same version (i.e. `0.2.0`) +1. Run `make charts`; this should produce: + - `assets/prometheus-federator/prometheus-federator-.tgz` + - `assets/rancher-project-monitoring/rancher-project-monitoring-.tgz` + - `charts/prometheus-federator//*` + - `charts/rancher-project-monitoring//*` + - `index.yaml` (modified) + +### Validating your chart and making changes before filing a PR + +Once you have created the new charts and assets, you should be ready to test your chart out locally to validate its functionality. To do so, you should take the following steps **at minimum** to ensure tht the functionality is not broken: + +1. Make sure that a basic `helm template` command on the underlying Helm chart that will be deployed passes: `VERSION= helm template rancher-project-monitoring -n cattle-monitoring-system charts/prometheus-federator/${VERSION}` +2. Make sure GitHub Workflow CI passes. +3. Spin up an RKE1 and RKE2 cluster and ensure that any tests that run on GitHub Workflow CI pass on those clusters. From 8b296d4c4b310f1174b63ed387ef31facdbb93e4 Mon Sep 17 00:00:00 2001 From: Arvind Iyengar Date: Thu, 17 Nov 2022 16:00:08 -0800 Subject: [PATCH 15/20] Add E2E GitHub Workflow --- .github/workflows/e2e-ci.yaml | 136 ++++++++++++++++ .github/workflows/e2e/package/Dockerfile | 17 ++ .../e2e/scripts/create-project-namespace.sh | 16 ++ .../e2e/scripts/create-projecthelmchart.sh | 21 +++ .../e2e/scripts/delete-projecthelmchart.sh | 27 ++++ .github/workflows/e2e/scripts/entry | 26 +++ .../e2e/scripts/install-federator.sh | 27 ++++ .../e2e/scripts/install-monitoring.sh | 33 ++++ .../e2e/scripts/uninstall-federator.sh | 10 ++ .../e2e/scripts/validate-federator.sh | 14 ++ .../e2e/scripts/validate-monitoring.sh | 107 +++++++++++++ .../scripts/validate-project-alertmanager.sh | 35 +++++ ...validate-project-grafana-dashboard-data.sh | 148 ++++++++++++++++++ .../validate-project-grafana-dashboards.sh | 59 +++++++ .../validate-project-grafana-datasource.sh | 41 +++++ .../scripts/validate-project-monitoring.sh | 36 +++++ .../validate-project-prometheus-alerts.sh | 41 +++++ .../validate-project-prometheus-targets.sh | 42 +++++ .github/workflows/pull-request.yaml | 12 +- examples/ci-example.yaml | 17 ++ examples/example.yaml | 2 +- scripts/e2e-ci | 109 +++++++++++++ 22 files changed, 974 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/e2e-ci.yaml create mode 100644 .github/workflows/e2e/package/Dockerfile create mode 100755 .github/workflows/e2e/scripts/create-project-namespace.sh create mode 100755 .github/workflows/e2e/scripts/create-projecthelmchart.sh create mode 100755 .github/workflows/e2e/scripts/delete-projecthelmchart.sh create mode 100755 .github/workflows/e2e/scripts/entry create mode 100755 .github/workflows/e2e/scripts/install-federator.sh create mode 100755 .github/workflows/e2e/scripts/install-monitoring.sh create mode 100755 .github/workflows/e2e/scripts/uninstall-federator.sh create mode 100755 .github/workflows/e2e/scripts/validate-federator.sh create mode 100755 .github/workflows/e2e/scripts/validate-monitoring.sh create mode 100755 .github/workflows/e2e/scripts/validate-project-alertmanager.sh create mode 100755 .github/workflows/e2e/scripts/validate-project-grafana-dashboard-data.sh create mode 100755 .github/workflows/e2e/scripts/validate-project-grafana-dashboards.sh create mode 100755 .github/workflows/e2e/scripts/validate-project-grafana-datasource.sh create mode 100755 .github/workflows/e2e/scripts/validate-project-monitoring.sh create mode 100755 .github/workflows/e2e/scripts/validate-project-prometheus-alerts.sh create mode 100755 .github/workflows/e2e/scripts/validate-project-prometheus-targets.sh create mode 100644 examples/ci-example.yaml create mode 100755 scripts/e2e-ci diff --git a/.github/workflows/e2e-ci.yaml b/.github/workflows/e2e-ci.yaml new file mode 100644 index 00000000..6987a326 --- /dev/null +++ b/.github/workflows/e2e-ci.yaml @@ -0,0 +1,136 @@ +name: E2E Prometheus Federator + +on: + workflow_dispatch: + inputs: + enable_tmate: + description: 'Enable debugging via tmate' + required: false + default: "false" + pull_request: + paths-ignore: + - 'docs/**' + - 'scripts/**' + - '*.md' + - '*.dapper' + - '.gitignore' + - 'CODEOWNERS' + - 'LICENSE' + - 'Makefile' + +env: + GOARCH: amd64 + CGO_ENABLED: 0 + SETUP_GO_VERSION: '^1.18' + YQ_VERSION: v4.25.1 + E2E_CI: true + REPO: rancher + TAG: dev + APISERVER_PORT: 8001 + DEFAULT_SLEEP_TIMEOUT_SECONDS: 10 + KUBECTL_WAIT_TIMEOUT: 120s + DEBUG: false + +permissions: + contents: write + +jobs: + e2e-prometheus-federator: + runs-on: ubuntu-latest + strategy: + matrix: + k3s_version: + # k3d version list k3s | sed 's/+/-/' | sort -h + - v1.20.15-k3s1 + steps: + - + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - + name: Install mikefarah/yq + run: | + sudo wget https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/yq_linux_amd64 -O /usr/bin/yq && sudo chmod +x /usr/bin/yq; + - + name: Perform CI + run: | + REPO=${REPO} TAG=${TAG} ./scripts/build; + REPO=${REPO} TAG=${TAG} ./scripts/package; + - + name: Provision k3d Cluster + uses: AbsaOSS/k3d-action@v2 + # k3d will automatically create a network named k3d-test-cluster-1 with the range 172.18.0.0/16 + with: + cluster-name: "e2e-ci-prometheus-federator" + args: >- + --agents 1 + --network "nw01" + --image docker.io/rancher/k3s:${{matrix.k3s_version}} + - + name: Import Images Into k3d + run: | + k3d image import ${REPO}/prometheus-federator:${TAG} -c e2e-ci-prometheus-federator; + - + name: Setup kubectl context + run: | + kubectl config use-context k3d-e2e-ci-prometheus-federator; + - + name: Set Up Tmate Debug Session + if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.enable_tmate == 'true' }} + uses: mxschmitt/action-tmate@v3 + timeout-minutes: 15 + with: + limit-access-to-actor: true + - + name: Install Rancher Monitoring + run: ./.github/workflows/e2e/scripts/install-monitoring.sh; + - + name: Check if Rancher Monitoring is up + run: ./.github/workflows/e2e/scripts/validate-monitoring.sh; + - + name: Install Prometheus Federator + run: ./.github/workflows/e2e/scripts/install-federator.sh; + - + name: Check if Prometheus Federator is up + run: ./.github/workflows/e2e/scripts/validate-federator.sh; + - + name: Check if Project Registration Namespace is auto-created on namespace detection + run: ./.github/workflows/e2e/scripts/create-project-namespace.sh; + - + name: Create Project Monitoring Stack via ProjectHelmChart CR + run: ./.github/workflows/e2e/scripts/create-projecthelmchart.sh; + - + name: Check if the Project Prometheus Stack is up + run: ./.github/workflows/e2e/scripts/validate-project-monitoring.sh; + - + name: Wait for 5 minutes for enough scraping to be done to continue + run: | + for i in {1..30}; do sleep 10; echo "Waited $((i*10)) seconds for metrics to be populated"...; done; + - + name: Validate Project Prometheus Targets + run: ./.github/workflows/e2e/scripts/validate-project-prometheus-targets.sh; + - + name: Validate Project Grafana Datasources + run: ./.github/workflows/e2e/scripts/validate-project-grafana-datasource.sh; + - + name: Validate Project Grafana Dashboards + run: ./.github/workflows/e2e/scripts/validate-project-grafana-dashboards.sh; + - + name: Validate Project Grafana Dashboard Data + run: ./.github/workflows/e2e/scripts/validate-project-grafana-dashboard-data.sh; + - + name: Validate Project Prometheus Alerts + run: ./.github/workflows/e2e/scripts/validate-project-prometheus-alerts.sh; + - + name: Validate Project Alertmanager + run: ./.github/workflows/e2e/scripts/validate-project-alertmanager.sh; + - + name: Delete Project Prometheus Stack + run: ./.github/workflows/e2e/scripts/delete-projecthelmchart.sh; + - + name: Uninstall Prometheus Federator + run: ./.github/workflows/e2e/scripts/uninstall-federator.sh; + - + name: Delete k3d cluster + if: always() + run: k3d cluster delete e2e-ci-prometheus-federator diff --git a/.github/workflows/e2e/package/Dockerfile b/.github/workflows/e2e/package/Dockerfile new file mode 100644 index 00000000..3666ac92 --- /dev/null +++ b/.github/workflows/e2e/package/Dockerfile @@ -0,0 +1,17 @@ +FROM registry.suse.com/bci/golang:1.19-18.33 AS helm +RUN zypper -n install git +RUN git -C / clone --branch release-v3.9.0 --depth=1 https://github.com/rancher/helm +RUN make -C /helm + +FROM registry.suse.com/bci/golang:1.17 + +ARG ARCH=amd64 +ENV KUBECTL_VERSION v1.21.8 + +# Install dependencies +RUN zypper -n install awk git docker curl wget nodejs sudo +RUN curl -LO https://storage.googleapis.com/kubernetes-release/release/${KUBECTL_VERSION}/bin/linux/${ARCH}/kubectl && \ + chmod +x kubectl && mv ./kubectl /usr/local/bin/kubectl +COPY --from=helm ./helm/bin/helm /usr/local/bin/helm + +CMD ["echo", "e2e-prometheus-federator"] diff --git a/.github/workflows/e2e/scripts/create-project-namespace.sh b/.github/workflows/e2e/scripts/create-project-namespace.sh new file mode 100755 index 00000000..2e6bad22 --- /dev/null +++ b/.github/workflows/e2e/scripts/create-project-namespace.sh @@ -0,0 +1,16 @@ +#!/bin/bash +set -e + +source $(dirname $0)/entry + +cd $(dirname $0)/../../../.. + +kubectl create namespace e2e-prometheus-federator || true +kubectl label namespace e2e-prometheus-federator field.cattle.io/projectId=p-example --overwrite +sleep "${DEFAULT_SLEEP_TIMEOUT_SECONDS}" +if ! kubectl get namespace cattle-project-p-example; then + echo "ERROR: Expected cattle-project-p-example namespace to exist after ${DEFAULT_SLEEP_TIMEOUT_SECONDS} seconds, not found" + exit 1 +fi + +echo "PASS: Project Registration Namespace was created" diff --git a/.github/workflows/e2e/scripts/create-projecthelmchart.sh b/.github/workflows/e2e/scripts/create-projecthelmchart.sh new file mode 100755 index 00000000..f8538c96 --- /dev/null +++ b/.github/workflows/e2e/scripts/create-projecthelmchart.sh @@ -0,0 +1,21 @@ +#!/bin/bash +set -e + +source $(dirname $0)/entry + +cd $(dirname $0)/../../../.. + +if [[ "${E2E_CI}" == "true" ]]; then + kubectl apply -f ./examples/ci-example.yaml +else + kubectl apply -f ./examples/example.yaml +fi +sleep ${DEFAULT_SLEEP_TIMEOUT_SECONDS}; +if ! kubectl wait --for=condition=complete --timeout="${KUBECTL_WAIT_TIMEOUT}" -n cattle-monitoring-system job/helm-install-cattle-project-p-example-monitoring; then + echo "ERROR: Helm Install Job for Project Monitoring Stack never completed after ${KUBECTL_WAIT_TIMEOUT} seconds" + kubectl logs job/helm-install-cattle-project-p-example-monitoring -n cattle-monitoring-system + exit 1 +fi +kubectl logs job/helm-install-cattle-project-p-example-monitoring -n cattle-monitoring-system + +echo "PASS: Adding ProjectHelmChart successfully installed Project Prometheus Stack" diff --git a/.github/workflows/e2e/scripts/delete-projecthelmchart.sh b/.github/workflows/e2e/scripts/delete-projecthelmchart.sh new file mode 100755 index 00000000..6f848514 --- /dev/null +++ b/.github/workflows/e2e/scripts/delete-projecthelmchart.sh @@ -0,0 +1,27 @@ +#!/bin/bash +set -e + +source $(dirname $0)/entry + +cd $(dirname $0)/../../../.. + +kubectl delete -f ./examples/ci-example.yaml +if kubectl get -n cattle-monitoring-system job/helm-delete-cattle-project-p-example-monitoring --ignore-not-found; then + if ! kubectl wait --for=condition=complete --timeout="${KUBECTL_WAIT_TIMEOUT}" -n cattle-monitoring-system job/helm-delete-cattle-project-p-example-monitoring; then + echo "ERROR: Helm Uninstall Job for Project Monitoring Stack never completed after ${KUBECTL_WAIT_TIMEOUT}" + kubectl logs job/helm-delete-cattle-project-p-example-monitoring -n cattle-monitoring-system + exit 1 + fi +fi + +if [[ $(kubectl get -n cattle-project-p-example -l "release=cattle-project-p-example-monitoring" secrets -o jsonpath='{.items[].metadata.name}' --ignore-not-found) != "cattle-project-p-example-m-alertmanager-secret" ]]; then + echo "ERROR: Expected Project Alertmanager Secret to be left behind in the namespace" + exit 1 +fi + +if [[ -n $(kubectl get -n cattle-project-p-example -l "release=cattle-project-p-example-monitoring" pods -o jsonpath='{.items[].metadata.name}' --ignore-not-found) ]]; then + echo "ERROR: Expected all pods of the Helm Release to be cleaned up on deleting the ProjectHelmChart" + exit 1 +fi + +echo "PASS: Removing ProjectHelmChart successfully uninstalled Project Prometheus Stack" diff --git a/.github/workflows/e2e/scripts/entry b/.github/workflows/e2e/scripts/entry new file mode 100755 index 00000000..08d4c453 --- /dev/null +++ b/.github/workflows/e2e/scripts/entry @@ -0,0 +1,26 @@ +#!/bin/bash +set -e + +cd $(dirname $0)/../../../.. + +DEFAULT_SLEEP_TIMEOUT_SECONDS=${DEFAULT_SLEEP_TIMEOUT_SECONDS:-10} +KUBECTL_WAIT_TIMEOUT=${KUBECTL_WAIT_TIMEOUT:-120s} + +if [[ ${DEBUG} == "true" ]]; then + echo "Enabling DEBUG mode..." + set -x +fi + +if [[ "${E2E_CI}" == "true" ]]; then + KUBERNETES_DISTRIBUTION_TYPE=k3s +fi + +if [[ -n ${RANCHER_URL} ]] && [[ -n ${RANCHER_CLUSTER} ]] && [[ -n ${RANCHER_TOKEN} ]]; then + API_SERVER_URL=${RANCHER_URL}/k8s/clusters/${RANCHER_CLUSTER} + API_SERVER_CURL_AUTH_HEADERS="-k -H 'Authorization: Bearer ${RANCHER_TOKEN}'" + RANCHER_HELM_ARGS="--set global.cattle.url=${RANCHER_URL} --set global.cattle.clusterId=${RANCHER_CLUSTER}" +else + kubectl proxy --port=${APISERVER_PORT:-8001} 2>/dev/null & + API_SERVER_URL=http://localhost:${APISERVER_PORT:-8001} + sleep 5 +fi diff --git a/.github/workflows/e2e/scripts/install-federator.sh b/.github/workflows/e2e/scripts/install-federator.sh new file mode 100755 index 00000000..9911fdbe --- /dev/null +++ b/.github/workflows/e2e/scripts/install-federator.sh @@ -0,0 +1,27 @@ +#!/bin/bash +set -e + +source $(dirname $0)/entry + +cd $(dirname $0)/../../../.. + +latest_chart=$(find ./charts/prometheus-federator -type d -maxdepth 1 -mindepth 1 | tr - \~ | sort -rV | tr \~ - | head -n1) + +case "${KUBERNETES_DISTRIBUTION_TYPE}" in +"k3s") + cluster_args="--set helmProjectOperator.helmController.enabled=false" + ;; +"rke") + cluster_args="" + ;; +"rke2") + cluster_args="--set helmProjectOperator.helmController.enabled=false" + ;; +*) + echo "KUBERNETES_DISTRIBUTION_TYPE=${KUBERNETES_DISTRIBUTION_TYPE} is unknown" + exit 1 +esac + +helm upgrade --install --create-namespace -n cattle-monitoring-system prometheus-federator --set helmProjectOperator.image.repository=${REPO:-rancher}/prometheus-federator --set helmProjectOperator.image.tag=${TAG:-dev} ${cluster_args} ${RANCHER_HELM_ARGS} ${latest_chart} + +echo "PASS: Prometheus Federator has been installed" diff --git a/.github/workflows/e2e/scripts/install-monitoring.sh b/.github/workflows/e2e/scripts/install-monitoring.sh new file mode 100755 index 00000000..283d9860 --- /dev/null +++ b/.github/workflows/e2e/scripts/install-monitoring.sh @@ -0,0 +1,33 @@ +#!/bin/bash +set -e + +source $(dirname $0)/entry + +cd $(dirname $0)/../../../.. + +helm repo add rancher-charts https://charts.rancher.io +helm repo update +helm upgrade --install --create-namespace -n cattle-monitoring-system rancher-monitoring-crd rancher-charts/rancher-monitoring-crd + +if [[ "${E2E_CI}" == "true" ]]; then + e2e_args="--set grafana.resources=null --set prometheus.prometheusSpec.resources=null --set alertmanager.alertmanagerSpec.resources=null" +fi + +case "${KUBERNETES_DISTRIBUTION_TYPE}" in +"k3s") + cluster_args="--set k3sServer.enabled=true" + ;; +"rke") + cluster_args="--set rkeControllerManager.enabled=true --set rkeScheduler.enabled=true --set rkeProxy.enabled=true --set rkeEtcd.enabled=true" + ;; +"rke2") + cluster_args="--set rke2ControllerManager.enabled=true --set rke2Scheduler.enabled=true --set rke2Proxy.enabled=true --set rke2Etcd.enabled=true" + ;; +*) + echo "KUBERNETES_DISTRIBUTION_TYPE=${KUBERNETES_DISTRIBUTION_TYPE} is unknown" + exit 1 +esac + +helm upgrade --install --create-namespace -n cattle-monitoring-system rancher-monitoring ${cluster_args} ${e2e_args} ${RANCHER_HELM_ARGS} rancher-charts/rancher-monitoring + +echo "PASS: Rancher Monitoring has been installed" diff --git a/.github/workflows/e2e/scripts/uninstall-federator.sh b/.github/workflows/e2e/scripts/uninstall-federator.sh new file mode 100755 index 00000000..dc30b1a8 --- /dev/null +++ b/.github/workflows/e2e/scripts/uninstall-federator.sh @@ -0,0 +1,10 @@ +#!/bin/bash +set -e + +source $(dirname $0)/entry + +cd $(dirname $0)/../../../.. + +helm uninstall --wait -n cattle-monitoring-system prometheus-federator + +echo "PASS: Prometheus Federator has been uninstalled" diff --git a/.github/workflows/e2e/scripts/validate-federator.sh b/.github/workflows/e2e/scripts/validate-federator.sh new file mode 100755 index 00000000..620089b2 --- /dev/null +++ b/.github/workflows/e2e/scripts/validate-federator.sh @@ -0,0 +1,14 @@ +#!/bin/bash +set -e + +source $(dirname $0)/entry + +cd $(dirname $0)/../../../.. + +if ! kubectl -n cattle-monitoring-system rollout status deployment prometheus-federator --timeout="${KUBECTL_WAIT_TIMEOUT}"; then + echo "ERROR: Prometheus Federator did not roll out" + kubectl get pods -n cattle-monitoring-system -o yaml + exit 1 +fi + +echo "PASS: Prometheus Federator is up and running" diff --git a/.github/workflows/e2e/scripts/validate-monitoring.sh b/.github/workflows/e2e/scripts/validate-monitoring.sh new file mode 100755 index 00000000..28bf6fdc --- /dev/null +++ b/.github/workflows/e2e/scripts/validate-monitoring.sh @@ -0,0 +1,107 @@ +#!/bin/bash +set -e + +source $(dirname $0)/entry + +cd $(dirname $0)/../../../.. + +if ! kubectl -n cattle-monitoring-system rollout status deployment rancher-monitoring-operator --timeout="${KUBECTL_WAIT_TIMEOUT}"; then + echo "ERROR: Prometheus Operator did not roll out" + kubectl get pods -n cattle-monitoring-system -o yaml + kubectl logs deployment/rancher-monitoring-operator -n cattle-monitoring-system + exit 1; +fi + +if ! kubectl -n cattle-monitoring-system rollout status statefulset alertmanager-rancher-monitoring-alertmanager --timeout="${KUBECTL_WAIT_TIMEOUT}"; then + echo "ERROR: Cluster Alertmanager did not roll out" + kubectl get pods -n cattle-monitoring-system -o yaml + kubectl logs statefulset/alertmanager-rancher-monitoring-alertmanager -n cattle-monitoring-system + exit 1; +fi + +if ! kubectl -n cattle-monitoring-system rollout status statefulset prometheus-rancher-monitoring-prometheus --timeout="${KUBECTL_WAIT_TIMEOUT}"; then + echo "ERROR: Cluster Prometheus did not roll out" + kubectl get pods -n cattle-monitoring-system -o yaml + kubectl logs statefulset/prometheus-rancher-monitoring-prometheus -n cattle-monitoring-system + exit 1; +fi + +if ! kubectl -n cattle-monitoring-system rollout status deployment rancher-monitoring-grafana --timeout="${KUBECTL_WAIT_TIMEOUT}"; then + echo "ERROR: Cluster Grafana did not roll out" + kubectl get pods -n cattle-monitoring-system -o yaml + echo "GRAFANA" + kubectl logs deployment/rancher-monitoring-grafana -n cattle-monitoring-system -c grafana + echo "GRAFANA-PROXY:" + kubectl logs deployment/rancher-monitoring-grafana -n cattle-monitoring-system -c grafana-proxy + echo "GRAFANA-SC-DASHBOARD:" + kubectl logs deployment/rancher-monitoring-grafana -n cattle-monitoring-system -c grafana-sc-dashboard + echo "GRAFANA-SC-DATASOURCES:" + kubectl logs deployment/rancher-monitoring-grafana -n cattle-monitoring-system -c grafana-sc-datasources + exit 1 +fi + +if ! kubectl -n cattle-monitoring-system rollout status deployment rancher-monitoring-kube-state-metrics --timeout="${KUBECTL_WAIT_TIMEOUT}"; then + echo "ERROR: Kube State Metrics did not roll out" + kubectl get pods -n cattle-monitoring-system -o yaml + kubectl logs deployment/rancher-monitoring-kube-state-metric -n cattle-monitoring-system + exit 1 +fi + +if ! kubectl -n cattle-monitoring-system rollout status daemonset rancher-monitoring-prometheus-node-exporter --timeout="${KUBECTL_WAIT_TIMEOUT}"; then + echo "ERROR: Node Exporter did not roll out" + kubectl get pods -n cattle-monitoring-system -o yaml + kubectl logs daemonset/rancher-monitoring-prometheus-node-exporter -n cattle-monitoring-system + exit 1 +fi + +if ! kubectl -n cattle-monitoring-system rollout status deployment rancher-monitoring-prometheus-adapter --timeout="${KUBECTL_WAIT_TIMEOUT}"; then + echo "ERROR: Prometheus Adapter did not roll out" + kubectl get pods -n cattle-monitoring-system -o yaml + kubectl logs deployment/rancher-monitoring-prometheus-adapter -n cattle-monitoring-system + exit 1 +fi + +case "${KUBERNETES_DISTRIBUTION_TYPE}" in +"k3s") + components=( + "k3s-server" + ) + ;; +"rke") + components=( + "kube-controller-manager" + "kube-scheduler" + "kube-proxy" + "kube-etcd" + ) + ;; +"rke2") + components=( + "kube-controller-manager" + "kube-scheduler" + "kube-proxy" + "kube-etcd" + ) + ;; +*) + echo "KUBERNETES_DISTRIBUTION_TYPE=${KUBERNETES_DISTRIBUTION_TYPE} is unknown" + exit 1 +esac + +for component in "${components[@]}"; do + if ! kubectl -n cattle-monitoring-system rollout status daemonset "pushprox-${component}-client" --timeout="${KUBECTL_WAIT_TIMEOUT}"; then + echo "ERROR: Pushprox Client for ${component} did not roll out" + kubectl get pods -n cattle-monitoring-system -o yaml + kubectl logs "daemonset/pushprox-${component}-client" -n cattle-monitoring-system + exit 1 + fi + + if ! kubectl -n cattle-monitoring-system rollout status deployment "pushprox-${component}-proxy" --timeout="${KUBECTL_WAIT_TIMEOUT}"; then + echo "ERROR: Pushprox Proxy for ${component} did not roll out" + kubectl get pods -n cattle-monitoring-system -o yaml + kubectl logs "deployment/pushprox-${component}-proxy" -n cattle-monitoring-system + exit 1 + fi +done + +echo "PASS: Rancher Monitoring is up and running" diff --git a/.github/workflows/e2e/scripts/validate-project-alertmanager.sh b/.github/workflows/e2e/scripts/validate-project-alertmanager.sh new file mode 100755 index 00000000..50f00fed --- /dev/null +++ b/.github/workflows/e2e/scripts/validate-project-alertmanager.sh @@ -0,0 +1,35 @@ +#!/bin/bash +set -e + +source $(dirname $0)/entry + +cd $(dirname $0)/../../../.. + +tmp_alerts_yaml=$(mktemp) +trap 'cleanup' EXIT +cleanup() { + set +e + rm ${tmp_alerts_yaml} +} + +if [[ -z "${RANCHER_TOKEN}" ]]; then + curl -s ${API_SERVER_URL}/api/v1/namespaces/cattle-project-p-example/services/http:cattle-project-p-example-m-alertmanager:9093/proxy/api/v2/alerts | yq -P - > ${tmp_alerts_yaml} +else + curl -s ${API_SERVER_URL}/api/v1/namespaces/cattle-project-p-example/services/http:cattle-project-p-example-m-alertmanager:9093/proxy/api/v2/alerts -k -H "Authorization: Bearer ${RANCHER_TOKEN}" | yq -P - > ${tmp_alerts_yaml} +fi + +if [[ $(yq '. | length' "${tmp_alerts_yaml}") != "1" ]]; then + echo "ERROR: Found the wrong number of alerts in Project Alertmanager, expected only 'Watchdog'" + cat ${tmp_alerts_yaml} + exit 1 +fi + +if [[ $(yq '.[0].labels.alertname' "${tmp_alerts_yaml}") != "Watchdog" ]]; then + echo "ERROR: Expected the only alert to be triggered on the Project Alertmanager to be 'Watchdog'" + cat ${tmp_alerts_yaml} + exit 1 +fi + +cat ${tmp_alerts_yaml} + +echo "PASS: Project Alertmanager is up and running" diff --git a/.github/workflows/e2e/scripts/validate-project-grafana-dashboard-data.sh b/.github/workflows/e2e/scripts/validate-project-grafana-dashboard-data.sh new file mode 100755 index 00000000..d34999fb --- /dev/null +++ b/.github/workflows/e2e/scripts/validate-project-grafana-dashboard-data.sh @@ -0,0 +1,148 @@ +#!/bin/bash +set -e + +source $(dirname $0)/entry + +cd $(dirname $0)/../../../.. + +tmp_dashboards_yaml=$(mktemp) +tmp_queries_yaml=$(mktemp) +trap 'cleanup' EXIT +cleanup() { + set +e + rm ${tmp_dashboards_yaml} + rm ${tmp_queries_yaml} +} + +if [[ -z "${RANCHER_TOKEN}" ]]; then + curl -s ${API_SERVER_URL}/api/v1/namespaces/cattle-project-p-example/services/http:cattle-project-p-example-monitoring-grafana:80/proxy/api/search | yq -P - > ${tmp_dashboards_yaml} +else + curl -s ${API_SERVER_URL}/api/v1/namespaces/cattle-project-p-example/services/http:cattle-project-p-example-monitoring-grafana:80/proxy/api/search -k -H "Authorization: Bearer ${RANCHER_TOKEN}" | yq -P - > ${tmp_dashboards_yaml} +fi + +dashboards=$(yq '.[].uri' ${tmp_dashboards_yaml}) + +# Collect all queries +for dashboard in ${dashboards[@]}; do + dashboard_uid=$(yq ".[] | select(.uri==\"${dashboard}\") | .uid" ${tmp_dashboards_yaml}); + if [[ -z "${RANCHER_TOKEN}" ]]; then + dashboard_json=$(curl -s ${API_SERVER_URL}/api/v1/namespaces/cattle-project-p-example/services/http:cattle-project-p-example-monitoring-grafana:80/proxy/api/dashboards/uid/${dashboard_uid} | yq '.dashboard' -) + else + dashboard_json=$(curl -s ${API_SERVER_URL}/api/v1/namespaces/cattle-project-p-example/services/http:cattle-project-p-example-monitoring-grafana:80/proxy/api/dashboards/uid/${dashboard_uid} -k -H "Authorization: Bearer ${RANCHER_TOKEN}" | yq '.dashboard' -) + fi + # TODO: Fix this to actually recursively utilize Grafana dashboard's yaml structure + # Today, it just looks for .expr entries in .panels[], .panels[].panels[], and .rows[].panels[], which should cover all dashboards in Monitoring today + echo "${dashboard_json}" | yq ".panels[].targets[].expr | { \"${dashboard}/\"+(parent|parent|parent|.title|sub(\" \", \"_\"))+\"_query\"+(parent|path|.[-1]) : (. | sub(\"\n\", \"\")) }" - >> ${tmp_queries_yaml} + echo "${dashboard_json}" | yq ".panels[] | .panels[].targets[].expr | { \"${dashboard}/\"+(parent|parent|parent|parent|parent|.title|sub(\" \", \"_\"))+\"/\"+(parent|parent|parent|.title|sub(\" \", \"_\"))+\"_query\"+(parent|path|.[-1]) : (. | sub(\"\n\", \"\")) }" - >> ${tmp_queries_yaml} + echo "${dashboard_json}" | yq ".rows[] | .panels[].targets[].expr | { \"${dashboard}/\"+(parent|parent|parent|.title|sub(\" \", \"_\"))+\"_query\"+(parent|path|.[-1]) : (. | sub(\"\n\", \"\")) }" - >> ${tmp_queries_yaml} +done + +echo "" + +exclude_queries=( + # Grafana Alerts + "db/grafana-overview/Firing_Alerts_query0" + + # CPU Throttling Metrics + "db/kubernetes-compute-resources-pod/CPU_Throttling_query0" + "db/rancher-pod/CPU_Utilization_query0" + "db/rancher-pod-containers/CPU_Utilization_query0" + "db/rancher-workload/CPU_Utilization_query0" + "db/rancher-workload-pods/CPU_Utilization_query0" + + # Persistent Volume Metrics + "db/kubernetes-persistent-volumes/Volume_Space_Usage_query0" + "db/kubernetes-persistent-volumes/Volume_Space_Usage_query1" + "db/kubernetes-persistent-volumes/Volume_Space_Usage_query0" + "db/kubernetes-persistent-volumes/Volume_inodes_Usage_query0" + "db/kubernetes-persistent-volumes/Volume_inodes_Usage_query1" + "db/kubernetes-persistent-volumes/Volume_inodes_Usage_query0" +) + + +unset FAILED +for query_key in $(yq "keys" ${tmp_queries_yaml} | cut -d' ' -f2-); do + unset skip + for exclude_query in "${exclude_queries[@]}"; do + if [[ "${query_key}" == "${exclude_query}" ]]; then + skip=1 + break + fi + done + [[ -n "${skip}" ]] && echo "WARN: Skipping ${query_key}" && echo "" && continue + + query=$(yq ".[\"${query_key}\"]" ${tmp_queries_yaml}) + normalized_query="${query}" + normalized_query=$(echo "${normalized_query}" | sed 's:$interval:5m:g') + normalized_query=$(echo "${normalized_query}" | sed 's:$resolution:1m:g') + normalized_query=$(echo "${normalized_query}" | sed 's:$__rate_interval:5m:g') + normalized_query=$(echo "${normalized_query}" | sed 's:=\"$namespace\":=~\".*\":g') + normalized_query=$(echo "${normalized_query}" | sed 's:$namespace:.*:g') + normalized_query=$(echo "${normalized_query}" | sed 's:=\"$type\":=~\".*\":g') + normalized_query=$(echo "${normalized_query}" | sed 's:$type:.*:g') + normalized_query=$(echo "${normalized_query}" | sed 's:=\"$kind\":=~\".*\":g') + normalized_query=$(echo "${normalized_query}" | sed 's:$kind:.*:g') + normalized_query=$(echo "${normalized_query}" | sed 's:=\"$instance\":=~\".*\":g') + normalized_query=$(echo "${normalized_query}" | sed 's:$instance:.*:g') + normalized_query=$(echo "${normalized_query}" | sed 's:=\"$node\":=~\".*\":g') + normalized_query=$(echo "${normalized_query}" | sed 's:$node:.*:g') + normalized_query=$(echo "${normalized_query}" | sed 's:=\"$workload\":=~\".*\":g') + normalized_query=$(echo "${normalized_query}" | sed 's:$workload:.*:g') + normalized_query=$(echo "${normalized_query}" | sed 's:=\"$pod\":=~\".*\":g') + normalized_query=$(echo "${normalized_query}" | sed 's:$pod:.*:g') + normalized_query=$(echo "${normalized_query}" | sed 's:=\"$job\":=~\".*\":g') + normalized_query=$(echo "${normalized_query}" | sed 's:$job:.*:g') + normalized_query=$(echo "${normalized_query}" | sed 's:=\"$service\":=~\".*\":g') + normalized_query=$(echo "${normalized_query}" | sed 's:$service:.*:g') + normalized_query=$(echo "${normalized_query}" | sed 's:=\"$volume\":=~\".*\":g') + normalized_query=$(echo "${normalized_query}" | sed 's:$volume:.*:g') + normalized_query=$(echo "${normalized_query}" | sed 's:=\"$integration\":=~\".*\":g') + normalized_query=$(echo "${normalized_query}" | sed 's:$integration:.*:g') + normalized_query=$(echo "${normalized_query}" | sed 's:":\\":g') + # normalized_query=$(echo "${normalized_query}" | sed -e 's:$[a-z]*:.*:g') + query_body="$(cat < ${tmp_dashboards_yaml} +else + curl -s ${API_SERVER_URL}/api/v1/namespaces/cattle-project-p-example/services/http:cattle-project-p-example-monitoring-grafana:80/proxy/api/search -k -H "Authorization: Bearer ${RANCHER_TOKEN}" | yq -P - > ${tmp_dashboards_yaml} +fi + +expected_dashboards=( + db/alertmanager-overview + db/grafana-overview + db/kubernetes-compute-resources-namespace-pods + db/kubernetes-compute-resources-namespace-workloads + db/kubernetes-compute-resources-node-pods + db/kubernetes-compute-resources-pod + db/kubernetes-compute-resources-project + db/kubernetes-compute-resources-workload + db/kubernetes-networking-namespace-pods + db/kubernetes-networking-namespace-workload + db/kubernetes-networking-pod + db/kubernetes-networking-project + db/kubernetes-networking-workload + db/kubernetes-persistent-volumes + db/prometheus-overview + db/rancher-pod + db/rancher-pod-containers + db/rancher-workload + db/rancher-workload-pods +); + +if [[ $(yq '.[].uri' ${tmp_dashboards_yaml} | wc -l | xargs) != "${#expected_dashboards[@]}" ]]; then + echo "ERROR: Found the wrong number of dashboards in Project Grafana, expected only the following: ${expected_dashboards[@]}" + cat ${tmp_dashboards_yaml} + exit 1 +fi + +for dashboard in "${expected_dashboards[@]}"; do + if ! yq '.[].uri' ${tmp_dashboards_yaml} | grep "${dashboard}" 1>/dev/null; then + echo "ERROR: Expected '${dashboard}' to exist amongst ${#expected_dashboards[@]} dashboards in Project Grafana" + cat ${tmp_dashboards_yaml} + exit 1 + fi +done + +cat ${tmp_dashboards_yaml} + +echo "PASS: Project Grafana has default dashboards loaded" diff --git a/.github/workflows/e2e/scripts/validate-project-grafana-datasource.sh b/.github/workflows/e2e/scripts/validate-project-grafana-datasource.sh new file mode 100755 index 00000000..d5cdc6f9 --- /dev/null +++ b/.github/workflows/e2e/scripts/validate-project-grafana-datasource.sh @@ -0,0 +1,41 @@ +#!/bin/bash +set -e + +source $(dirname $0)/entry + +cd $(dirname $0)/../../../.. + +tmp_datasources_yaml=$(mktemp) +trap 'cleanup' EXIT +cleanup() { + set +e + rm ${tmp_datasources_yaml} +} + +if [[ -z "${RANCHER_TOKEN}" ]]; then + curl -s ${API_SERVER_URL}/api/v1/namespaces/cattle-project-p-example/services/http:cattle-project-p-example-monitoring-grafana:80/proxy/api/datasources | yq -P - > ${tmp_datasources_yaml} +else + curl -s ${API_SERVER_URL}/api/v1/namespaces/cattle-project-p-example/services/http:cattle-project-p-example-monitoring-grafana:80/proxy/api/datasources -k -H "Authorization: Bearer ${RANCHER_TOKEN}" | yq -P - > ${tmp_datasources_yaml} +fi + +if [[ $(yq '. | length' ${tmp_datasources_yaml}) != "1" ]]; then + echo "ERROR: Found the wrong number of datasources in Project Grafana, expected only 'Prometheus'" + cat ${tmp_datasources_yaml} + exit 1 +fi + +if [[ $(yq '.[0].url' ${tmp_datasources_yaml}) != "http://cattle-project-p-example-m-prometheus.cattle-project-p-example:9090/" ]]; then + echo "ERROR: Expected the only datasource to be configured to point to Project Prometheus at Kubernetes DNS http://cattle-project-p-example-m-prometheus.cattle-project-p-example:9090/" + cat ${tmp_datasources_yaml} + exit 1 +fi + +if [[ $(yq '.[0].type' ${tmp_datasources_yaml}) != "prometheus" ]]; then + echo "ERROR: Expected the only datasource to be configured to be of type 'prometheus'" + cat ${tmp_datasources_yaml} + exit 1 +fi + +cat ${tmp_datasources_yaml} + +echo "PASS: Project Grafana has the default Prometheus datasource set up to point at Project Prometheus" diff --git a/.github/workflows/e2e/scripts/validate-project-monitoring.sh b/.github/workflows/e2e/scripts/validate-project-monitoring.sh new file mode 100755 index 00000000..0148e959 --- /dev/null +++ b/.github/workflows/e2e/scripts/validate-project-monitoring.sh @@ -0,0 +1,36 @@ +#!/bin/bash +set -e + +source $(dirname $0)/entry + +cd $(dirname $0)/../../../.. + +if ! kubectl -n cattle-project-p-example rollout status statefulset alertmanager-cattle-project-p-example-m-alertmanager --timeout="${KUBECTL_WAIT_TIMEOUT}"; then + echo "ERROR: Project Alertmanager did not roll out" + kubectl get pods -n cattle-project-p-example -o yaml + kubectl logs statefulset/alertmanager-cattle-project-p-example-m-alertmanager -n cattle-project-p-example + exit 1; +fi + +if ! kubectl -n cattle-project-p-example rollout status statefulset prometheus-cattle-project-p-example-m-prometheus --timeout="${KUBECTL_WAIT_TIMEOUT}"; then + echo "ERROR: Project Prometheus did not roll out" + kubectl get pods -n cattle-project-p-example -o yaml + kubectl logs statefulset/prometheus-cattle-project-p-example-m-prometheus -n cattle-project-p-example + exit 1; +fi + +if ! kubectl -n cattle-project-p-example rollout status deployment cattle-project-p-example-monitoring-grafana --timeout="${KUBECTL_WAIT_TIMEOUT}"; then + echo "ERROR: Project Grafana did not roll out" + kubectl get pods -n cattle-project-p-example -o yaml + echo "GRAFANA" + kubectl logs deployment/cattle-project-p-example-monitoring-grafana -n cattle-project-p-example -c grafana + echo "GRAFANA-PROXY:" + kubectl logs deployment/cattle-project-p-example-monitoring-grafana -n cattle-project-p-example -c grafana-proxy + echo "GRAFANA-SC-DASHBOARD:" + kubectl logs deployment/cattle-project-p-example-monitoring-grafana -n cattle-project-p-example -c grafana-sc-dashboard + echo "GRAFANA-SC-DATASOURCES:" + kubectl logs deployment/cattle-project-p-example-monitoring-grafana -n cattle-project-p-example -c grafana-sc-datasources + exit 1 +fi + +echo "PASS: Project Monitoring Stack is up and running" diff --git a/.github/workflows/e2e/scripts/validate-project-prometheus-alerts.sh b/.github/workflows/e2e/scripts/validate-project-prometheus-alerts.sh new file mode 100755 index 00000000..168ead06 --- /dev/null +++ b/.github/workflows/e2e/scripts/validate-project-prometheus-alerts.sh @@ -0,0 +1,41 @@ +#!/bin/bash +set -e + +source $(dirname $0)/entry + +cd $(dirname $0)/../../../.. + +tmp_rules_yaml=$(mktemp) +tmp_alert_rules_yaml=$(mktemp) +trap 'cleanup' EXIT +cleanup() { + set +e + rm ${tmp_rules_yaml} + rm ${tmp_alert_rules_yaml} +} + +if [[ -z "${RANCHER_TOKEN}" ]]; then + curl -s ${API_SERVER_URL}/api/v1/namespaces/cattle-project-p-example/services/http:cattle-project-p-example-m-prometheus:9090/proxy/api/v1/alerts | yq -P - > ${tmp_rules_yaml} +else + curl -s ${API_SERVER_URL}/api/v1/namespaces/cattle-project-p-example/services/http:cattle-project-p-example-m-prometheus:9090/proxy/api/v1/alerts -k -H "Authorization: Bearer ${RANCHER_TOKEN}" | yq -P - > ${tmp_rules_yaml} +fi + +yq '.data.alerts' ${tmp_rules_yaml} > ${tmp_alert_rules_yaml} + +if [[ $(yq '. | length' ${tmp_alert_rules_yaml}) != "1" ]]; then + echo "ERROR: Found the wrong number of alerts in Project Prometheus, expected only 'Watchdog'" + echo "ALERT RULES:" + cat ${tmp_alert_rules_yaml} + exit 1 +fi + +if [[ $(yq '.[0].labels.alertname' ${tmp_alert_rules_yaml}) != "Watchdog" ]]; then + echo "ERROR: Expected the only alert to be triggered on the Project Prometheus to be 'Watchdog'" + echo "ALERT RULES:" + cat ${tmp_alert_rules_yaml} + exit 1 +fi + +cat ${tmp_alert_rules_yaml}; + +echo "PASS: Project Prometheus has exactly one alert (Watchdog) active" diff --git a/.github/workflows/e2e/scripts/validate-project-prometheus-targets.sh b/.github/workflows/e2e/scripts/validate-project-prometheus-targets.sh new file mode 100755 index 00000000..bee0bdf1 --- /dev/null +++ b/.github/workflows/e2e/scripts/validate-project-prometheus-targets.sh @@ -0,0 +1,42 @@ +#!/bin/bash +set -e + +source $(dirname $0)/entry + +cd $(dirname $0)/../../../.. + +tmp_targets_yaml=$(mktemp) +tmp_targets_up_yaml=$(mktemp) +trap 'cleanup' EXIT +cleanup() { + set +e + rm ${tmp_targets_yaml} + rm ${tmp_targets_up_yaml} +} + +if [[ -z "${RANCHER_TOKEN}" ]]; then + curl -s ${API_SERVER_URL}/api/v1/namespaces/cattle-project-p-example/services/http:cattle-project-p-example-m-prometheus:9090/proxy/api/v1/targets | yq -P - > ${tmp_targets_yaml} +else + curl -s ${API_SERVER_URL}/api/v1/namespaces/cattle-project-p-example/services/http:cattle-project-p-example-m-prometheus:9090/proxy/api/v1/targets -k -H "Authorization: Bearer ${RANCHER_TOKEN}" | yq -P - > ${tmp_targets_yaml} +fi + +yq '.data.activeTargets[] | {.labels.job: .health}' ${tmp_targets_yaml} > ${tmp_targets_up_yaml}; + +echo "TARGETS:"; +if [[ $(yq '. | length' ${tmp_targets_up_yaml}) != "4" ]]; then + echo "ERROR: Expected exacty 4 targets to be up in Project Prometheus: federate, cattle-project-p-example-m-alertmanager, cattle-project-p-example-m-prometheus, cattle-project-p-example-monitoring-grafana" + echo "TARGETS:" + cat ${tmp_targets_up_yaml} + exit 1 +fi + +for expected_target in federate cattle-project-p-example-m-alertmanager cattle-project-p-example-m-prometheus cattle-project-p-example-monitoring-grafana; do + if ! grep "${expected_target}" ${tmp_targets_up_yaml}; then + echo "ERROR: Expected '${expected_target}' to exist amongst 4 targets in Project Prometheus" + echo "TARGETS:" + cat ${tmp_targets_up_yaml} + exit 1 + fi +done + +echo "PASS: Project Prometheus has all targets healthy" diff --git a/.github/workflows/pull-request.yaml b/.github/workflows/pull-request.yaml index a9a07c81..0006de77 100644 --- a/.github/workflows/pull-request.yaml +++ b/.github/workflows/pull-request.yaml @@ -1,6 +1,16 @@ name: CI-pullrequest -on: [pull_request] +on: + pull_request: + paths-ignore: + - 'docs/**' + - 'scripts/**' + - '*.md' + - '*.dapper' + - '.gitignore' + - 'CODEOWNERS' + - 'LICENSE' + - 'Makefile' jobs: build: diff --git a/examples/ci-example.yaml b/examples/ci-example.yaml new file mode 100644 index 00000000..536d9ded --- /dev/null +++ b/examples/ci-example.yaml @@ -0,0 +1,17 @@ +apiVersion: helm.cattle.io/v1alpha1 +kind: ProjectHelmChart +metadata: + name: project-monitoring + namespace: cattle-project-p-example +spec: + helmApiVersion: monitoring.cattle.io/v1alpha1 + values: + # Do not enforce resource requirements for CI + prometheus: + prometheusSpec: + resources: null + alertmanager: + alertmanagerSpec: + resources: null + grafana: + resources: null \ No newline at end of file diff --git a/examples/example.yaml b/examples/example.yaml index 58e2b4c2..fe7a013a 100644 --- a/examples/example.yaml +++ b/examples/example.yaml @@ -2,7 +2,7 @@ apiVersion: helm.cattle.io/v1alpha1 kind: ProjectHelmChart metadata: name: project-monitoring - namespace: cattle-monitoring-system + namespace: cattle-project-p-example spec: helmApiVersion: monitoring.cattle.io/v1alpha1 values: {} \ No newline at end of file diff --git a/scripts/e2e-ci b/scripts/e2e-ci new file mode 100755 index 00000000..183530df --- /dev/null +++ b/scripts/e2e-ci @@ -0,0 +1,109 @@ +#!/bin/bash +set -e + +source $(dirname $0)/version + +cd $(dirname $0)/.. + +if ! which yq 2>/dev/null 1>/dev/null; then + echo "ERROR: yq must be installed to run this script" + exit 1 +fi + +# Prompt Confirmation +unset proceed +while [[ -z ${proceed} ]]; do + if ! kubectl get nodes 2>/dev/null; then + echo "ERROR: kubectl must be pointing to valid cluster" + exit 1 + fi + echo "" + read -p "> Run e2e-scripts on cluster using image ${REPO}/prometheus-federator:${TAG} [y/n]? " -n 1 -r + echo + if ! [[ $REPLY =~ ^[Yy]$ ]]; then + if [[ $REPLY =~ ^[Nn]$ ]]; then + exit 0 + fi + else + proceed=1 + fi +done + +echo "" +echo "> Starting e2e-ci scripts on cluster..." + +# Detect Kubernetes distribution type +if [[ -z "${KUBERNETES_DISTRIBUTION_TYPE}" ]]; then + echo ">> KUBERNETES_DISTRIBUTION_TYPE is not set. Attempting to auto-infer from local cluster.management.cattle.io object..." + provider=$(kubectl get cluster.management.cattle.io local -o jsonpath={.status.provider}) + echo "Detected KUBERNETES_DISTRIBUTION_TYPE=${provider}" + export KUBERNETES_DISTRIBUTION_TYPE=${provider} +fi + +# Detect if Rancher is proxying the UI, which means kubectl proxy won't work +echo ">> Detecting if Rancher is proxying the cluster..." +current_context=$(kubectl config view | yq .current-context -) +API_SERVER_URL=$(kubectl config view | yq ".clusters[] | select(.name == \"${current_context}\") | .cluster.server" -) +if [[ ${API_SERVER_URL} =~ ^http[s]://.*/k8s/clusters/.*$ ]]; then + echo "Cluster access is being proxied through Rancher, passing in relevant values to e2e scripts to proxy via Rancher as well for checks" + RANCHER_URL_AND_CLUSTER=$(echo ${API_SERVER_URL} | sed -e 's:^\(.*\)/k8s/clusters/\(.*\)$:\1 \2:') + + # Set values for e2e scripts to use + export RANCHER_URL=$(echo ${RANCHER_URL_AND_CLUSTER} | cut -d' ' -f1) + export RANCHER_CLUSTER=$(echo ${RANCHER_URL_AND_CLUSTER} | cut -d' ' -f2) + export RANCHER_TOKEN=$(kubectl config view --raw | yq ".users[] | select(.name == \"${current_context}\") | .user.token" -) + + unset RANCHER_URL_AND_CLUSTER +fi + +if [[ -n ${STEP_NAME} ]]; then + filtered_steps="select(.name == \"${STEP_NAME}\")" +else + exclude_steps=( + "Install mikefarah/yq" + "Perform CI" + "Provision k3d Cluster" + "Import Images Into k3d" + "Setup kubectl context" + "Set Up Tmate Debug Session" + "Delete k3d cluster" + ) + + if [[ ${SKIP_UNINSTALL} == "true" ]]; then + exclude_steps+=("Delete Project Prometheus Stack") + exclude_steps+=("Uninstall Prometheus Federator") + fi + + filtered_steps="select(.name)" + for step in "${exclude_steps[@]}"; do + filtered_steps="${filtered_steps} | select(.name != \"${step}\")" + done +fi + +trap 'final_notes' EXIT + +final_notes() { + echo "" + if [[ -z ${RANCHER_URL} ]]; then + API_SERVER_URL=http://localhost:8001 + echo "> NOTE: If you retained your Project Prometheus Stack, you can access the UIs for your Project Prometheus Stack after running 'kubectl proxy' in another window at the following URLs:" + else + API_SERVER_URL=${RANCHER_URL}/k8s/clusters/${RANCHER_CLUSTER} + echo "> NOTE: If you retained your Project Prometheus Stack, you can access the UIs for your Project Prometheus Stack at the following URLs:" + fi + echo ">> Project Prometheus: ${API_SERVER_URL}/api/v1/namespaces/cattle-project-p-example/services/http:cattle-project-p-example-m-prometheus:9090/proxy" + echo ">> Project Alertmanager: ${API_SERVER_URL}/api/v1/namespaces/cattle-project-p-example/services/http:cattle-project-p-example-m-alertmanager:9093/proxy" + echo ">> Project Grafana: ${API_SERVER_URL}/api/v1/namespaces/cattle-project-p-example/services/http:cattle-project-p-example-monitoring-grafana:80/proxy" +} + +old_ifs=${IFS} +IFS=$'\n' +for step in $(yq ".jobs.e2e-prometheus-federator.steps[] | ${filtered_steps} | .run" .github/workflows/e2e-ci.yaml); do + echo "" + echo ">> Running '${step}'..." + bash -c "${step}" +done +IFS=${old_ifs} + +echo "" +echo "PASS: E2E CI successfully completed!" \ No newline at end of file From a06cddd58ebb6529174150350223ec3173434720 Mon Sep 17 00:00:00 2001 From: Arvind Iyengar Date: Mon, 31 Oct 2022 13:31:23 -0700 Subject: [PATCH 16/20] Update documentation for typos and add e2e CI docs --- docs/build.md | 3 -- docs/experimental/e2e.md | 75 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 75 insertions(+), 3 deletions(-) create mode 100644 docs/experimental/e2e.md diff --git a/docs/build.md b/docs/build.md index 61a5e2ed..d7fd37e6 100644 --- a/docs/build.md +++ b/docs/build.md @@ -19,9 +19,6 @@ base64 bin/${CHART}/${CHART}-${VERSION}.tgz > bin/${CHART}/${CHART}.tgz.base64 rm bin/${CHART}/${CHART}-${VERSION}.tgz ``` -Therefore, as a whole, the build process of Underlying Helm Chart looks as follows: - - ## The Project Operator Image To implement a Project Operator, Helm Project Operator expects a user to run the `operator.Init` command, which appears in Prometheus Federator's [`main.go`](../main.go) as follows: diff --git a/docs/experimental/e2e.md b/docs/experimental/e2e.md new file mode 100644 index 00000000..1cd6137f --- /dev/null +++ b/docs/experimental/e2e.md @@ -0,0 +1,75 @@ +# Experimental: E2E CI Tests + +## What does E2E CI do? + +The E2E CI described in [.github/scripts/](../../.github/workflows/e2e-ci.yaml) checks out the current Git repository, builds a Docker image using the repository's build scripts, sets up a [k3d](https://k3d.io) cluster, imports the built `prometheus-federator` image into the cluster (which automatically uses the latest `rancher-project-monitoring` chart since it is embedded into the binary as part of the build process), and then uses Helm to install both `rancher-monitoring` (using the latest released version) and `prometheus-federator` (using the Helm chart contained in the repository). + +Once both are installed, it will run checks to ensure that all workloads are up and running in both Helm installs and then mimic creating a Project (by creating a namespace with a particular label on it). + +On creating the Project, it asserts that the Registration Namespace is auto-created and installs the example ProjectHelmChart into that namespace, which triggers the deployment of the Project Monitoring Stack in that namespace. + +After performing those initial setup steps, it waits for **5 minutes** to give the Project Prometheus time to scrape enough metrics and settle any alerts that may appear due to initial conditions before things stabilize (i.e. alerting because Grafana is not up yet) and then performs in-depth checks to ensure everything is functional. Specifically, there are two areas of focus here: 1) that Grafana is configured correctly and that **every single query in every single dashboard that is expected contains data unless specifically excluded by the scripts** and 2) that Prometheus and Alertmanager's alerting pipeline is functional. + +Finally, it deletes the ProjectHelmChart, asserts the helm uninstall Job on the Project Monitoring Stack successfully completes, and then performs a Helm uninstall of the Prometheus Federator chart to ensure that it is not left hanging. + +## Running the Github Workflow CI locally for testing + +To run the end-to-end GitHub Workflow CI locally to test whether your changes work, it's recommended to install [`nektos/act`](https://github.com/nektos/act). + +An slim image has been defined in [`.github/workflows/e2e/package/Dockerfile`](../../.github/workflows/e2e/package/Dockerfile) that has the necessary dependencies to be used as a Runner for act for this GitHub Workflow. To build the image, run the following commmand (make sure you re-run it if you make any changes to add dependencies): + +```bash +docker build -f ./.github/workflows/e2e/package/Dockerfile -t rancher/prometheus-federator-e2e:latest . +``` + +Once you have built the image and installed `act`, simply run the following command on the root of this repository and it will run your GitHub workflow within a Docker container: + +```bash +act pull_request -j e2e-prometheus-federator -P ubuntu-latest=rancher/prometheus-federator-e2e:latest +``` + +> **Important Note**: When using local runs, `act` will create the k3d cluster locally in your system. It should automatically get deleted from your system at the end of a workflow run (failed or successful) at the end of CI, but if it does not execute make sure you clean it up manually via `k3d cluster delete e2e-ci-prometheus-federator`. + +## Running E2E Tests on an already provisioned cluster + +To verify that the functionality of Prometheus Federator on a live cluster that you have already configured your `KUBECONFIG` environment variable to point to, you can use the utility script found in [script/e2e-ci](../../scripts/e2e-ci) to run the relevant CI commands to install Monitoring, install Prometheus Federator using your forked image, and run the remaining CI steps. + +> **Note:** For now, this script only works on k3s, RKE1, and RKE2 clusters but it can be easily extended to work on different cluster types by supplying the right values in `install-federator.sh`, `install-monitoring.sh`, and `validate-monitoring.sh` to enable and verify the correct cluster-type specific testing. Contributions are welcome! + +However, to do this, your Prometheus Federator image will need to already be imported and accessible by the cluster you plan to run the scripts on, so make sure you push your image to a registry accessible by your cluster before running these scripts. + +For example, if you wanted to run your tests on the `arvindiyengar/prometheus-federator:dev` image, you would run the following command: + +```bash +KUBERNETES_DISTRIBUTION_TYPE= REPO=arvindiyengar TAG=dev ./scripts/e2e-ci +``` + +To enable debug logging, pass it in as an environment variable: + +```bash +DEBUG=true KUBERNETES_DISTRIBUTION_TYPE= REPO=arvindiyengar TAG=dev ./scripts/e2e-ci +``` + +If you are pointing at a Rancher 2.6+ downstream cluster, the `KUBERNETES_DISTRIBUTION_TYPE` will be auto-inferred from the `cluster.management.cattle.io` named `local` that exists in every downstream cluster, so it can be omitted: + +```bash +REPO=arvindiyengar TAG=dev ./scripts/e2e-ci +``` + +To skip uninstalling the Prometheus Federator chart (if you would like to perform some validations of your own after the fact), pass in `SKIP_UNINSTALL=true`: + +```bash +SKIP_UNINSTALL=true REPO=arvindiyengar TAG=dev ./scripts/e2e-ci +``` + +To run a particular step, run: + +```bash +STEP_NAME="Validate Project Grafana Dashboard Data" REPO=arvindiyengar TAG=dev ./scripts/e2e-ci +``` + +To run it against the latest image, just run: + +```bash +TAG= ./scripts/e2e-ci +``` From ffdb0f6c9c6655992b3d10864c9dc3bd79768113 Mon Sep 17 00:00:00 2001 From: Arvind Iyengar Date: Tue, 29 Nov 2022 12:26:02 -0800 Subject: [PATCH 17/20] Increase wait time before running validation in E2E CI --- .github/workflows/e2e-ci.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/e2e-ci.yaml b/.github/workflows/e2e-ci.yaml index 6987a326..2a56d3f5 100644 --- a/.github/workflows/e2e-ci.yaml +++ b/.github/workflows/e2e-ci.yaml @@ -103,9 +103,9 @@ jobs: name: Check if the Project Prometheus Stack is up run: ./.github/workflows/e2e/scripts/validate-project-monitoring.sh; - - name: Wait for 5 minutes for enough scraping to be done to continue + name: Wait for 8 minutes for enough scraping to be done to continue run: | - for i in {1..30}; do sleep 10; echo "Waited $((i*10)) seconds for metrics to be populated"...; done; + for i in {1..48}; do sleep 10; echo "Waited $((i*10)) seconds for metrics to be populated"...; done; - name: Validate Project Prometheus Targets run: ./.github/workflows/e2e/scripts/validate-project-prometheus-targets.sh; From e3e01c7e57561b0fcbe82eda2828cfa0ab9d1ab5 Mon Sep 17 00:00:00 2001 From: Arvind Iyengar Date: Tue, 29 Nov 2022 13:28:49 -0800 Subject: [PATCH 18/20] Allow users to pass in k3s_version and debug to manual workflow dispatches --- .github/workflows/e2e-ci.yaml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/e2e-ci.yaml b/.github/workflows/e2e-ci.yaml index 2a56d3f5..b2cadc48 100644 --- a/.github/workflows/e2e-ci.yaml +++ b/.github/workflows/e2e-ci.yaml @@ -7,6 +7,13 @@ on: description: 'Enable debugging via tmate' required: false default: "false" + debug: + description: "Enable debug logs" + required: false + default: "false" + k3s_version: + description: "Version of k3s to use for the underlying cluster, should exist in https://hub.docker.com/r/rancher/k3s/tags" + required: false pull_request: paths-ignore: - 'docs/**' @@ -29,7 +36,7 @@ env: APISERVER_PORT: 8001 DEFAULT_SLEEP_TIMEOUT_SECONDS: 10 KUBECTL_WAIT_TIMEOUT: 120s - DEBUG: false + DEBUG: ${{ github.event.inputs.debug || false }} permissions: contents: write @@ -41,7 +48,7 @@ jobs: matrix: k3s_version: # k3d version list k3s | sed 's/+/-/' | sort -h - - v1.20.15-k3s1 + - ${{ github.event.inputs.k3s_version || 'v1.20.15-k3s1' }} steps: - uses: actions/checkout@v3 From 905f2c4bfd6ab0d2e152c3b2449fe1470b643452 Mon Sep 17 00:00:00 2001 From: Arvind Iyengar Date: Tue, 29 Nov 2022 16:00:07 -0800 Subject: [PATCH 19/20] Add more error logs for failing to create ProjectHelmChart --- .../e2e/scripts/create-projecthelmchart.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/workflows/e2e/scripts/create-projecthelmchart.sh b/.github/workflows/e2e/scripts/create-projecthelmchart.sh index f8538c96..52491c63 100755 --- a/.github/workflows/e2e/scripts/create-projecthelmchart.sh +++ b/.github/workflows/e2e/scripts/create-projecthelmchart.sh @@ -11,6 +11,20 @@ else kubectl apply -f ./examples/example.yaml fi sleep ${DEFAULT_SLEEP_TIMEOUT_SECONDS}; + +if ! kubectl get -n cattle-monitoring-system job/helm-install-cattle-project-p-example-monitoring; then + echo "ERROR: Helm Install Job for Project Monitoring Stack was never created after ${KUBECTL_WAIT_TIMEOUT} seconds" + echo "PROJECT HELM CHARTS:" + kubectl get projecthelmchart -n cattle-project-p-example -o yaml + echo "HELM CHARTS:" + kubectl get helmcharts -n cattle-monitoring-system -o yaml + echo "HELM RELEASES:" + kubectl get helmreleases -n cattle-monitoring-system -o yaml + echo "PROMETHEUS FEDERATOR:" + kubectl logs deployment/prometheus-federator -n cattle-monitoring-system + exit 1 +fi + if ! kubectl wait --for=condition=complete --timeout="${KUBECTL_WAIT_TIMEOUT}" -n cattle-monitoring-system job/helm-install-cattle-project-p-example-monitoring; then echo "ERROR: Helm Install Job for Project Monitoring Stack never completed after ${KUBECTL_WAIT_TIMEOUT} seconds" kubectl logs job/helm-install-cattle-project-p-example-monitoring -n cattle-monitoring-system From 11fe1c71226928c8dbad22391770e337368fb71b Mon Sep 17 00:00:00 2001 From: Arvind Iyengar Date: Tue, 29 Nov 2022 16:00:30 -0800 Subject: [PATCH 20/20] Fix E2E CI to work on a k3s and rke2 cluster where the Helm Controller is fixed --- .../e2e/scripts/install-federator.sh | 46 ++++++++++++++++++- 1 file changed, 44 insertions(+), 2 deletions(-) diff --git a/.github/workflows/e2e/scripts/install-federator.sh b/.github/workflows/e2e/scripts/install-federator.sh index 9911fdbe..e1228be9 100755 --- a/.github/workflows/e2e/scripts/install-federator.sh +++ b/.github/workflows/e2e/scripts/install-federator.sh @@ -9,13 +9,55 @@ latest_chart=$(find ./charts/prometheus-federator -type d -maxdepth 1 -mindepth case "${KUBERNETES_DISTRIBUTION_TYPE}" in "k3s") - cluster_args="--set helmProjectOperator.helmController.enabled=false" + cluster_args="" + kubernetes_version=$(kubectl version --short | grep "Server Version" | cut -d ' ' -f3) + case "${kubernetes_version}" in + v1.23.*) + embedded_helm_controller_fixed_version="v1.23.14" + if [[ $(echo ${kubernetes_version} ${embedded_helm_controller_fixed_version} | tr " " "\n" | sort -rV | head -n 1 ) == "${embedded_helm_controller_fixed_version}" ]]; then + cluster_args="--set helmProjectOperator.helmController.enabled=false" + fi + ;; + v1.24.*) + embedded_helm_controller_fixed_version="v1.24.8" + if [[ $(echo ${kubernetes_version} ${embedded_helm_controller_fixed_version} | tr " " "\n" | sort -rV | head -n 1 ) == "${embedded_helm_controller_fixed_version}" ]]; then + cluster_args="--set helmProjectOperator.helmController.enabled=false" + fi + ;; + *) + embedded_helm_controller_fixed_version="v1.25.4" + if [[ $(echo ${kubernetes_version} ${embedded_helm_controller_fixed_version} | tr " " "\n" | sort -rV | head -n 1 ) == "${embedded_helm_controller_fixed_version}" ]]; then + cluster_args="--set helmProjectOperator.helmController.enabled=false" + fi + ;; + esac ;; "rke") cluster_args="" ;; "rke2") - cluster_args="--set helmProjectOperator.helmController.enabled=false" + cluster_args="" + kubernetes_version=$(kubectl version --short | grep "Server Version" | cut -d ' ' -f3) + case "${kubernetes_version}" in + v1.23.*) + embedded_helm_controller_fixed_version="v1.23.14" + if [[ $(echo ${kubernetes_version} ${embedded_helm_controller_fixed_version} | tr " " "\n" | sort -rV | head -n 1 ) == "${embedded_helm_controller_fixed_version}" ]]; then + cluster_args="--set helmProjectOperator.helmController.enabled=false" + fi + ;; + v1.24.*) + embedded_helm_controller_fixed_version="v1.24.8" + if [[ $(echo ${kubernetes_version} ${embedded_helm_controller_fixed_version} | tr " " "\n" | sort -rV | head -n 1 ) == "${embedded_helm_controller_fixed_version}" ]]; then + cluster_args="--set helmProjectOperator.helmController.enabled=false" + fi + ;; + *) + embedded_helm_controller_fixed_version="v1.25.4" + if [[ $(echo ${kubernetes_version} ${embedded_helm_controller_fixed_version} | tr " " "\n" | sort -rV | head -n 1 ) == "${embedded_helm_controller_fixed_version}" ]]; then + cluster_args="--set helmProjectOperator.helmController.enabled=false" + fi + ;; + esac ;; *) echo "KUBERNETES_DISTRIBUTION_TYPE=${KUBERNETES_DISTRIBUTION_TYPE} is unknown"